Quantcast
Channel: mel wiki
Viewing all articles
Browse latest Browse all 610

Why does Maya create unitConversion nodes?

$
0
0
When connecting attribute to attribute, sometimes you'll see Maya introduce a unitConversion node. For the longest time (until today, using Maya 2013) I've always wondered why this is. For example, if I do this connection:
  • nodeA.rx -> multiplyDivide.inputX
  • multiplyDivide.outputX -> nodeB.rx
A unit conversion node will be inserted where each of those arrows are, looking like so:
  • nodeA.rx -> unitConversionA -> multiplyDivide.inputX
  • multiplyDivide.outputX -> unitConversionA -> nodeB.rx
Furthermore the values on those unitConversion nodes would be:
  • unitConversionA = 57.296
  • unitConversionB = 0.017
What is going on?

Maya nodes internally work in 'internal units', and by default these are:
  • Linear : cm
  • Angular: radian
But the ui the user interacts with is in 'ui units', who's defaults are:
  • Linear : cm
  • Angular : degrees
While different studios will often change the linear ui units to something else (meters, inches, etc), I've never heard of anyone changing from degrees to radians. And this is the key piece of the mystery:

When you connect node to node, you're connecting based on the internal units: When you connect nodeA.rx -> multiplyDivide.inputX, it's connecting a radian attribute to a (in this case) 'degree attribute'. And for the values to read correctly, it needs to mutiply them by some value. What are those conversion values anyway? (Google will back me up)
  • Radian to degrees: 57.296
  • Degree to radian: 0.017
The same values as above. First, Maya needs to convert from the radian values of the rotate attr to the 'degree' values of the multiplyDivide. Then, it needs to convert back from the 'degree' values of the multiplyDivide to the radian values nodeB's rotate attr.

If you go into Maya's preferences and change your angular units to radians and redo the above connections, no unitConversion nodes will be generated, since the 'internal units' and 'ui units' are now the same.

Viewing all articles
Browse latest Browse all 610

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>