iimachines / Maya2glTF

Maya to glTF 2.0 exporter
MIT License
320 stars 49 forks source link

Print warnings or errors when singular transformation matrices are detected. #137

Open ziriax opened 3 years ago

ziriax commented 3 years ago

See e.g. the test scene ZeroParentScaleTestAnim.ma

Related to #136

fire commented 3 years ago

We thought of a way to avoid this. Use a no inherit parent and then it's reset. Continue onwards normally.

The case comes when we have too many 0.01 transforms. The next one in the chain gets reset.

Thoughts?

ziriax commented 3 years ago

I don't think a general solution exists, this is just the unfortunate choice that was made by the graphics industry to use linear algebra matrices to represent scene graph kinematics...

They should have picked dual quaternions, or more generally Clifford algebra instead, and keep scaling as a final deformation stage, but they didn't. So now we're stuck with these singularties forever ;)

See e.g. the SIGGRAPH video https://www.youtube.com/watch?v=tX4H_ctggYo&t=18m