I’m pretty new to UE and am mainly focused on creating cinematics from a VFX / Motion Graphics point of view.
I am currently trying to find a way to grow foliage from a point on my landscape, outward until it fills the whole landscape. And have this animated over a certain period of time.
I’ve uploaded a screenshot of how the growth would start, but eventually i’d want the whole thing to be covered. In a 3D program I would normally use vertex maps to control the growth but just can’t find the work around in UE4 as yet. As I said, i’m new so could be missing something obvious.
–
Also I can’t seem to get the foliage visible in the distance even though it is painted there. Its not culling distance or screen density as I have tried these but any help would be amazing!
These are basically both the same question. If you could tweak the foliage view distance you could make it look like it spread over the whole landscape.
The foliage view distance is controlled both by the setting in the foliage tool, but also by the settings on the static mesh used for the foliage. It’s no good setting the foliage to draw all the way to the horizon if the mesh is LODding out 20 meters from the camera.
So you also have make sure the mesh you’re using for foliage doesn’t LOD.
I think to do it at runtime is going to be a bummer, not to put too fine a point on it.
I think one way would be to use a landscape grass type ( this is where you don’t paint foliage on the landscape but assign certain layers to automatically generate grass ), and use a parameter in the landscape material to ( probably with a sphere mask ) increase the amount of the layer generating the grass.
what do you mean animate growth?
From seedling to plant?
that’s interesting. I would make it with morph targets. Basically make the final tree, then grab a copy of it, compress all the vertex except a few that will get used to sprout the seedling to 0 without removing them. Then merge the 2, and step through the morph bit by bit correcting where things end up every 10 steps so you can fine tune the growth.
Obviously this takes ages.
Then in engine, because you need a skeletal mesh I would attempt to use the foliage tool with a blueprint.
What’s more, you could actually script the BP with a random value between 0 and 100 to determine when the plant starts to “grow” so that not every tree pops up at the same time.
While this may work, you should be aware that with a lot of skeletal meshes performance may degrade well past 24fps.
To the point that you may be better off capturing frames instead of just attempting to produce the final shot.
If by growth you mean having them just “pop in”, then, I would try the procedural foliage:
If you had to code it, it’s not too hard. You can actually break down the procedural foliage tools to get at how it’s done, but in essence you could set up collision, and remove the foliage that overlap a specific (invisible) mesh. Except in your case, instead of removing you would just be triggering the “hidden in game” variable.
Doing this at runtime over 100k instances could be an issue as well, but you can probably balance the rate of shrink of the mesh used to trigger them to balance out performance…
This is all so helpful! Thank you all. I am currently getting used to the limits of what I should do in engine or not.
I think this is going to be my best bet, even if its a bit tricky.
This is really helpful, thanks so much. I’m going to give everything a go over the next few days, its only for personal development so luckily, time is on my side. I think getting into the code would be really beneficial for ultimate control, its just a little scary to be at the moment but i’m sure i’ll get into it.
Big thanks again for the help for someone new here!