View Full Version : Local coordsys and inverse mesh transform confusion
Raeldor 02262006, 07:21 AM Hi,
I am a little confused. I imagined local object space would be affected by the pivot point of the object, yet when I do 'in coordsys local getvert mymesh 1' I get the same result regardless of the pivot point. In addition to this, if I do '(in coordsys world getvert mymesh 1)
*(inverse mymesh.transform)' I get the values I was expecting to get.
What gives here? Why is local object space not affected by the pivot? Is there an extra element at play here that is specific to max?
Thanks


But your working with subojects: the vert, its local space is in relation to its object. And the object to its parent. I'll have to consult my master on this.
Hi,
I am a little confused. I imagined local object space would be affected by the pivot point of the object, yet when I do 'in coordsys local getvert mymesh 1' I get the same result regardless of the pivot point. In addition to this, if I do '(in coordsys world getvert mymesh 1)
*(inverse mymesh.transform)' I get the values I was expecting to get.
What gives here? Why is local object space not affected by the pivot? Is there an extra element at play here that is specific to max?
Thanks
The pivot point is a Nodelevel property. Object Space is independent of the pivot point. The pivot point offset is stored in a separate transformation matrix called the ObjectOffset Transform. When the object space is transformed into world space, the vertex positions are multiplied by the objectoffset, node transform and parent transform matrices. The combined matrix of these three is known as the object transform matrix.
Let's see a sphere primitive as example:
The Base Object takes the position [0,0,0] as the center and creates N vertices at distances equal to the radius around this origin. When you access local vertex positions, they will always be relative to the object's origin.
Then the vertices are passed up the stack  if there are any deformation modifiers like Bend and Twist, their positions will be affected in object space. Note that most modifiers have their own gizmo and center to define the modifier's space, but by default they are aligned to the object space.
Then we come to the node level where the vertices are multiplied by the objectoffset matrix (thus resulting in an offset relatively to the pivot point), then multiplied by the node transform which transforms the vertices AND the pivot in parent space, and finally by the transformation of the parent (or the identity matrix if child of the world) to reach the final destination in the world space.
Check out the "Using Node Transform Properties" topic in the MAXScript Reference.
joconnell
02262006, 05:48 PM
Heya Borislav  any word on the matrix dvd? I haven't learned anything new in a while so I'm looking forward to this one :)
Raeldor
02262006, 05:51 PM
Thanks for the information. That makes a lot more sense now.
That's kind of different to programming 3d graphics where the model is usually just rotated relative to it's coordinates based origin.
Heya Borislav  any word on the matrix dvd? I haven't learned anything new in a while so I'm looking forward to this one :)
I finished recording a month ago, the material is being edited at the moment.
Please keep an eye on the CG Academy webpage for news in the next week or two...
Thanks for your interest.
joconnell
02262006, 07:12 PM
Good to hear  Shall stick my order in first thing monday :D
CGTalk Moderation
02262006, 07:12 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©20002015, Jelsoft Enterprises Ltd.