While using matrix in Maya there is a problem with joints. You know when taking a matrix from a joint, for the rotation values it gives joint orient before the actual rotation. I know a technique to solve this but i’m not sure if i should do this instead of an constraint node. There is a picture of setup. And is there an another way for solving this problem? I can maybe write a plugin to make these in a node, but i’m asking for vanilla Maya.
“Premature optimization is the root of all evil” – Donald Knuth
Try not to optimize unless you’ve got a reason. And definitely don’t do it without actually testing which is better.
Constraint nodes are built-in, simple to make, and (very VERY importantly) simple to debug later down the line. If they solve your problem, then using them is a great solution.
But if you profile your setup with constraints, and you can see the constraints are causing a big slowdown, and you test with your setup above, and you get a significant boost, then it may be worth doing it that way.
“The fastest code is the code that isn’t run” – Robert Galanakis
Another solution is to just not use joints. Especially now that we’ve got the
.offsetParentMatrix plug in the regular transform node, I see fewer and fewer reasons to ever use joints. Of course, I don’t know your use-case (you may have some game engine exporter that requires joints), but if you can just use transforms and not have to use 5 extra nodes to get data that already exists, then I say use transforms.
Ok, thanks. I have understood what i’m going to do.