A small update to this in 2021. This pertains!
(I have been meaning to give feedback to this for some time now)
Going to keep this info in bullet point so as to K.I.S.S. because I am stupid. This is really a difficult concept and has a lot of variables that only the team can plug together. My game is a simulation based mainly in space inside ships and stations and needs really solid fidelity with a flexible morph and extendable morph animation system to handle the small details.
Sorry…no TLDR for this one.
Preface:
I used to use DAZ G2 Female and Male and wanted to move on to G3 or G8 but in the end decided that I needed to be custom but still use DAZ Studio as a tool. So I/We ended up with a hybrid. The below information is what I found via lots of testing and trial and error.
(Applies in UE4.18+ and Unity 5.6+).
Even if you are using your own custom body & face solution DAZ Studio with G2 F/M and G3 F/M are very good sources for getting a good feeling and testing your own morph animation since there are a huge number of morphs for free included.
There is a HUGE difference between a Character Designer and a Character with Rigging and Morphs ready for play. The Character Designer could be rigged but morphs essentially need to be OBJ (clean and no bones) and transferred to the game rig. I did not understand the importance of this…5+ years later…now I do.
My base LOD0 models are running at ~32k tris. You can have a look here for the details of my Genesys (not DAZ Genesis ) models. These are the Fit body morph and from 2018 and in Unity 5.6. The skin has changed from shown (less cartoonish) but the body models are the same. I’ll paste a pic of what the Average (base) body and skin looks like now (2021 May).
Links are safe but for adult.
Genesys Female Base Model – Stand Sure Studio
Genesys Male Base Model – Stand Sure Studio
Morph Target Animation and Body Shaping (Blendshapes):
-
4.18 was a big improvement. Morph Targets worked prior but was not as speedy as these later versions. I see no reason to use skeletal/bones to do facial animation.
-
Make sure to set Morph Target Previewer to Use GPU for computing morph targets. This makes a huge difference in performance. Been available since 4.14 but really came to life 4.18+
-
Morph Target Shaping is really fast. Even for animation in visual scripting (BP).
-
UE4 can easily run 50 32k models in a properly LOD set fleshed out environment. Just use AC: Odyssey as a visual for comparison. If you have the game play it and pay attention to the number of visible NPCs and the LOD details. See material/texture details below.
-
Even though UE4 does a great job at this try not to mix too many Morph Target type animation and skeletal. Meaning…use morph targets in lieu of bones instead of running them in parallel. If you want to make a smile then don’t have bones that could also do some sort of facial animation. There can be some positional fighting when the game gets hammered by taking care of things. This is also crazy difficult to solve/troubleshoot.
Note: Below I have 4 body types that blend together with 5 enhancers…so 8 morphs. Clothing also uses these same morphs and uses the same values to ‘fit’ the clothing. Performance is excellent because I use a very limited number of morphs to get the job done. -
All work has been done/updated in Blender 2.83. This was a massive task and still not done. Rigging is using Auto-Rig Pro from the Blender Market. All morphs in this rig PRIOR to rigging with ARP. I have not added any morphs to this so I really don’t know if something will break or not. I sometimes use iClone7’s 3DXchange7 to pre-process animation re-targetting to the iClone7 bone format then export out then into Blender to ARP re-target. Works very well. This animation is for the BODY portion. Facial animation is handled via audio amplitude and morphs.
-
Specific note to the above. Morphs should be well thought out and taken care of during the modelling process PRIOR to rigging and animations. I was doing this in parallel for some time (since I had no animators except me…and I am terrible at it! ) and had lots of issues with fitting and updates. Ended up scrapping everything and start from scratch. Painful but I am so glad I/We did this. Hiring contract based animators and clothing modellers is soooooooo much easier now.
-
Keep your morph animations fairly straight forward and simple. Meaning try to use one morph instead of three for the same effect. Example: Happy…combine multiple morphs to make one ‘Happy’ morph and drive that via script (BP).
-
Try to make recipes of morphs for shaping. This is related to the above.
Example 1: make a variety of nose shapes and make each ‘Nose’ a morph. Drive that by script with a Nose Selector. Each facial feature should have a set. Not many sets at all. You will be amazed at how many heads you can make with 10 head shapes, 10 mouth shapes, and 20 noses.
Example 2: Make four body types and use a triangle selector to blend the three morphs over the the main body in the center. A few games do this. Saves a huge number of morphs.
Example 3: Use about 5 morph ‘enhancers’ to add on top of the body result. This is to make a body trim, fit, heavier…etc.
-
Try to limit your morph targets on your model to 100 max. From what I have experienced is that more than this starts to decay performance of the frame. 50 x 100 = 5,000 morphs analyzed on the GPU each frame. These have a CPU cost as well since they have to be relayed back and forth. Less is better of course.
-
Use data tables to drive the recipe data for the above so you can make hundreds and thousands of body combinations in Excel and import that into UE4 data table(s). This also works at runtime to make random NPCs via their spawn in script.
-
Lip Sync to Audio. Audio amplitude to morph via script works really well. Even when the camera is within a meter it is Okay. You can ADD expressions and make personality combinations to this while the audio is driving the jaw bone via script. Works amazingly well and is very much Good Enough.
-
Make sure clothing is skeletal (bone driven) and not overlapping any of the morph targets being driven by script. Think of clothing as a character. The obvious one here is the lip sync with morphs. Keep the bones to a minimum…like one jaw bone…and morph everything else with recipes.
-
Skin and Clothing try to use one or two textures per piece. Wait…how does this relate to animation? It does…heavily! It chews on memory and when this bogs down from processing the morphs have trouble working…as with lots of other things. Skin should be one face and one body then use alpha to hide skin where needed. You can add textures and use a material collection to change texture layers at runtime super easy. And STAY AWAY from 4k textures unless absolutely necessary. Use primarily 1k textures then 2k where needed for large objects or needing that extra detail. Massive performance improvement and 1k is perfectly suited for up to 1440p. Yeah…I know…artists LOVE 4k & 8k (Unreal Marketplace anyone? ) but those are NOT normal game ready. Fine for some things but very limited scope.
================================
I am sure I forgot something but mostly things are covered above. Bottom line is morph targets perform very well in UE4. The added benefit is there are tons of opportunity for runtime based animation and shape changing that ‘classic’ bone animation simply would be a massive amount of work to do.
Thanks for taking the time to read.
Cheers!
Olander
What the base model Bridget/Brighid looks like now.