Understanding the foliage system

I have a question on the foliage and the underlying system. I would like the foliage to be affected by factors outside the level designer. For example, change the size of the foliage depending on the distance from a point, or have the size affected depending on whether it is inside a volume or not.

Playing around with blueprints, I think I understand the structure, which I’ve illustrated in a general manner here. Starting from the top, we have the main level with two streaming levels. Each streaming level has its own Instanced Foliage Actor (IFA) which handles all of the foliage in the streaming level. The IFA contains several Foliage Instanced Static Mesh Components (FISMC), each corresponding to an implemented foliage type. Each visible mesh we see in the level is an instance of a certain FISMC.

I’ve noticed that in this structure I haven’t seen any direct reference to the Foliage Type assets, the assets that we designate in the Foliage Mode and where we adjust the scale, rotation and other settings. I can only infer that for each implemented Foliage Type, an FISMC is added. Where do these fit in? I’ve been diving into the Blueprint/C++ documentation and I don’t really understand what exactly is going on. My guess is that the foliage we see while editing might be visual representations with the information on each instance saved somewhere else (The Foliage Type asset itself maybe?). At runtime then, the engine then accesses the baked information and spawns the foliage in an efficient manner.

Is my analysis of the system correct or completely off? My challenge is to find out how I can access and manipulate the instance object at the bottom. My current method has me iterating through a Foliage Instanced Static Mesh Component which works but isn’t really transparent.

I wanna get the answer too