Morph Target Performance for Mobile

Hi fellow UE4 users and Epic Staff,

1. I have just completed the main playable character for a mobile game, which has 9,708 vertices and 68 bones. I presently have 20 facial morph targets on this character, which could be reduced to 12 if I didn’t use the L/R variants. My first question is, will having this many morph targets present cause significant performance issues on mobile (esp. low-end to med devices), even if most of the targets are not in use 90% of the time?

2. Morph target vertex count ranges from 428 - 4,356, but most are around 1500 to 2400, with the 2 eye blinks at 968 each being used all the time. One thing I find strange is that UE4 shows my test morph targets, which affect both sides of the character simultaneously, at 50, 100, or even 300 vertices less than both the L and R targets combined (even though the L/R targets affect the exact same vertices). Is this expected?

3. My last question is, if gameplay would suffer from this amount of morph targets present, would it be better to just spawn this morph target rich character in for select cut scenes, or would playback performance likely suffer even there?

I would like to optimize my character as much as possible to reach a broad range of devices, so I’d like to take care of these unknowns early in the process.

Thank you all so much for any professional insights you can offer on this.

Adam Janz

Still very interested in the community’s view on this. I’ve already reduced some of the morph targets in the character, however, I want to optimize performance as much as possible up front. I’d like to know if unused morph targets will potentially slow gameplay down significantly. Thanks!

I’m interested in knowing too. I’m working on a mobile game and plan to use morph targets for the character’s face at least. I wasn’t sure if morph targets did work on mobile.

Although I haven’t actually run tests yet on a mobile device, my 2nd question is not really relevant anymore. I discovered the unusually high number of vertices present in the morph targets was a result of importing the character with “Keep Overlapping Vertices” enabled, essentially doubling the vertex count.

Additionally, I discovered if you’re exporting morph targets from Blender, and you’ve animated them with drivers, you should NOT have any negative values for your keyframes in the graph editor.

Otherwise, UE4 will incorrectly import zero values as if they are actually animated, meaning it’s computing values for something that should be completely static!

To avoid this: For example, in Blender, you might set up Smile.L and Smile.R bones to drive the left and right smile morph targets, and the Smile.L bone needs to move in the opposite direction of Smile.R in the X-axis. Well, rather than making Smile.L move from 0 to -1 to reverse its motion, make it move from 0 to +1, and then just invert the value of the variable in the “Scripted Expression” type of driver (ie. if the variable’s named “smile” it now becomes “-smile”). This will reverse the direction the bone needs to move to drive the morph target (shapekey) but will still keep everything positive, and UE4 will correctly import zero values without animation. :slight_smile: