[Maya] Deformer Evaluation Inaccuracy

Hi,

during a production last year we encountered an issue with Mayas Skin Cluster. As we worked on real world scale, where 1 unit is 1 centimeter, our characters moved across a environment approx. 1 kilometer length. This means our characters moved 500 meters to each side of the worlds origin. So far there was nothing obvious going on the scene. But at one point we had to troubleshoot some jittering with simulated nHair curves.

And we found out: The farer we move away from the world origin, the more inaccurat the evaluation of the meshes vertices gets.

I know that you have to be careful, when it comes to scene scale and decimal places. But I always thought, that this is a general issue with the evaluation in 3D space.

But when created a testscene, I found out, that direct transformation value change with constains are not a problem at all. No matter how far an object is placed or moved from the world center, there are always enough decimal places for a correct evaluation. However, if there is either a lattice, cluster, skin cluster or wrap moving a meshes shape components away from world center, decimal places are cut off relatively to the unit by 10. So, I assume that the effect will be always occur, becoming more and more visilble, with increasing distance to world center.

In our case an object moved by a skin cluster 400 meters away from the world center caused an inacuracy by a few milimeters, which results in vertices jittering. When I did an extreme displacement of 1000000 meters (which is a lot, I know), there are no more decimal places left and the vertices will always be moved by 1 unit, which results in extreme vertex jitterung. The effect not only shows up be moving the object, it also happened, when navigating the camera. A third Display evaluation inaccuray then was added by Viewport 2.0. (Which is less a problem, while not rendered, a least with renderers, thar are not the Hardware Renderer)

Getting back to our hair problem: I think the inaccuracy in deformer evaluation could cause the hair curves to jitter. This also could be an issue when rendering a velocity pass. Because often, when a non moving object (no camera movement either) still had velocity changes, which resulted in a slightly blurred image.

Long Story short:
If anyone has similar stuff happen, or some workaround or knows something about this issue, i appreciate the help. This happen more or less with cluster, skin cluster, lattice and wrap deformers but not with translation values. I did not tested the wire, shrinkwrap, wrinkle or jiggle deformer.

Test Scene Results:


Thanks
Georg & Peter

Sorry for this long post, but here’s some information and some idea on how you coudl get around it :slight_smile:

Essentailly a mesh + deformers are evalauted in their transform’s space.

A translation, constrained or otherwise, can be a vert large offset on the entire object, then the vertices are locally evaluated and the sphere looks fine. If you go really really far with a transform however, you may see the translate tool taking steps becaues the in-between values can not be represented by the double values.

Then there is the thing where transformations and constraints use DOUBLE precision, allowing much larger values before problems occur; but vertices (and therefore defomers) use single (FLOAT) precision because it is assumed that they are never far from their parent transform.

What you’re seeing in your skin cluster is that the transform gets frozen, so the mesh gets moved, per vertex, a very large amount, at single precision. This allows two problems: single precision shows inaccuracies very soon, and because it’s per vertex the inaccuracies occur per vertex and appear as noise instead of a jitter on the object as a whole.

Note
Also worth noticing is that Maya internally always treats values as centimeters. Your scene preferences only alter the visual representation of values, not the actually stored data.

Some solution?
What I imagine you could try is offset your skeleton back to zero and then offset the (locked) transform node of the skinned model to the desired location instead.

RootCtrl ParentConstraint OffsetGroup
RootCtrl ParentConstraint Model
connect RootCtrl.worldMatrixInverse to RootJoint.worldMatrix (probably needs decompose matrix node and individual transform attribute connections)
RootJoint is a child of OffsetGroup

This way the model moves away with the root bone, and avoids double transformations because the root bone gets reverse transformed. I hope that makes any sense.

Edit
I just realised you need a fully proxy skeleton that is local to the world origin.

So instead you can rig as normal, then duplicate the skinned skeleton and connect the translate / rotate / scale of all joints except the root joint, bind your skin to this proxy skeleton and parent constraint your model to the main control.


You will still need one root joint at the top of the skinned joints hierarchy.

One problem if you’re going to export skeleton animation is that you’ll lose your root bone animation, but maybe you can get the main control’s transform animation in double precision and get good results in any next package / game engine as well :slight_smile:

Hi Trevor,

awesome. Many thanks for your very detailed response. We will definitely have a closer look at the information you gave us.

Peter