Many have been asking how I’ve achieved such high rig playback speed in Maya. My MJ Face rig when fully animated is running at speeds of 45-50 fps. With the body rig, the speed is still relatively high, over 30 fps. It’s not because I have a super high end computer. My machine’s specs are:Intel i7-6700 CPU @ 3.40 Ghs, only 16 GB RAM, and standard GeForce GTX 960.
Creating a high speed rig is all about design, efficiency and restraint.
Here are some pro tips:
1) First, I am taking advantage of Maya’s parallel evaluation and gpu override. You need to be using Maya 2016 or above and using Viewport 2.0. Make sure gpu override is on. Make sure Back Face Culling is off. Read up on Using Parallel Maya.
2) Profile your rig constantly! Here is a profile of the ultra fast MJ Face rig:
Despite it’s speed, it can still be a little faster. I’ve highlighted two bottle necks: The left and right eyelashes are being wrapped to a single plane geo that is skinWeighted. The wrap deformer does not get into the GPU. I could replace the wrap with the transferred skinning of the single plane. The skinClustered eyelashes will get into the GPU. This will improve the rig speed performance without drastically affecting the rig deformation quality.
Update: I’ve replaced the eyelash wraps with skinclusters. This has boosted the rig playback speed to consistently over 50 fps now! Sometimes hitting 60 fps.
3) Keep your facial morph targets clean!
When you add deformers to a mesh, an intermediate shape node is created.
(shapeOrig) Make sure the facial targets are kept clean of the intermediate shapes. Sometimes when deleting construction history, these shape nodes are still left behind. If you add this target with the intermediate to the blendshape node, Maya thinks that the target has a live deformation. Because of this, the blendshape will not go into the GPU.
This leads to the next caveat about morph targets…
4) Morph Targets cannot be ‘live’!
They must be static, not attached to a deformer. But in facial rigging, its important to layer deformations, for instance having local skinclustered tweak joints layered in. Charles Wardlaw has a solution to this. Read this before continuing!
Here is the deformation stack for the full body rig that includes the face rig:
First there is only one blendshape node. Since all my morph targets are calculated at local space, it’s unnecessary to have any extra blendshape deformers. This includes not only all the facial blendshapes but body correctives as well. Then I have skinclusters for the lips and jaw. These are joints that live at origin space, don’t move with the body. Finally I have the body skincluster.
The three skinclusters takes only 1138 microseconds (0.001138 seconds) to evaluate per frame!
5) Geometry with outMesh connection will not get into the GPU.
You’ve redesigned the rig to use only GPU deformers, optimized the deformer stack. Don’t be lazy and wrap the eyebrows to the face! This will throw the face geo out of the GPU. You’re going to have to create all the facial blendshapes for the brows. They will evaluate in parallel with the face.
This also means you can’t have any follicles or point on surface constraints on your face geo.
I’ve created a patch geo that many of my controllers are constrained to. This is nothing new. A common practice in rigging. This patch geo has corresponding facial blendshapes. So while the patch geo does not go to GPU, that’s a small price to pay since it’s very low resolution.