First of all, Im not sure if this is the correct section, so sorry if its not, and mod… feel free to move this thread if needed.
Now to the actual “task/problem”…
I would like to create some sort of “groth-like-ish” animation of a plant. So for instance… it starts as a seed, then grows into a stem and then it get leaves and then it blossom.
And I know this wont be an easy one as far as I can tell, so all feedback is more than welcome :).
I have been trying to figure this one out for a few days now, when it finally hit me… maybe its possible to do this using morph targets?
But since Im very new to morph targets… I have a few questions…
First of all… is it possible to add vertices during the morph?.. for instance for the leaves… it would be much easier for a modeller to not need to have the entire “end-meshes” vertices from the very start (when the model is just a seed) to keep in mind, but just simply add a few vertices once its needed… I guess this isnt possible since I really cant figure out how the engine should be able to “map” the new vertices… but well… I still figured I would ask anyway :).
My next question is… is it possible to have multiple morph-targets? I guess it it is since that’s basically what you would do with facial expressions and such when animating them in Maya…
Yes, that’s possible. Like you said, it is used for facial expressions.
First possibility that comes to my mind to achieve such an effect is multiple meshes with morph targets. E.g. the big plant in the video I would split up in two meshes. One with and one without leaves. Both meshes can have a multiple number of morph targets. Important part is that the last morph target of the first mesh and the first morph target of the second mesh match up as good as possible. So that you can switch those meshes at the appropriate time and make a seemless transition.
However, for plants shown in the video you might be able to use only one mesh with multiple morph targets. For bigger meshes, like a tree, I would recommend using multiple meshes.
I have definitely felt this. I had a model of a giant mushroom that when you stand on the cap it would kinda shrink down using morph targets, and it would tank my frame rate from 60 to 15. I haven’t run tests to see if it was because of the amount of vertices being animated or if it was just the model, but I would make sure to keep an eye on performance while working with them.
As a note the in editor (PIE) frame rate never dipped but the standalone game is where performance issues would show, so make sure to check there as well while working.
The downside to most morph target and even bone-based methods is that you’re stuck with a set quantity of vertices from the beginning - so your Seed has to have all the same vertices as the entire end result tree.
The biggest alternative is to use a masked material and unmask it through an animating panning mask shape. You drive that with a material parameter either in Blueprint or in Cascade (which is quite easy).
The downside to using a masked material solution is that your starting point and end point are the same, so you’d basically have a full sized tree trunk which just starts growing upwards (also with a giant hole in middle).
So…Your best bet is a hybrid approach to this problem. Use masked animated materials + either morph target or skeletal mesh animation to grow out the tree bit by bit. I’d break it up into multiple stages as well so you can fully transition from “seed to sapling” then “sapling to small tree” then “small tree to bigger tree” etc.
If you combine animated masked materials with some sort of mesh animation and you break it up into multiple stages, you should be able to achieve all of your goals.
Oh for sure and I suspect that hardware rendering of vertex animation is not going to happen and still bound to the CPU. Way to much data to upload to the card but still very useful for cut or QT events of exploding buildings as scripted.
By extension, just as a comment, not a good idea as to making player models talk in real time using morphs or for real time map object animations.
Best option in this case is since UE4 does support FBX which can bake your animations on the fly would be to rig the object and key frame by hand as to result which can be hardware rendered.