PDA

View Full Version : Is there a Way to know the rotatation of a face?


Stucky
08-19-2005, 10:23 AM
Hi guys, is there a way to know the rotation or translation of, say, a face in the world? NOT an object.



Cheers


-S

AndreasMartin
08-19-2005, 03:01 PM
if you can access the normal of the face you should get what you are looking for, never testet it so it is just pure cg science theorie ;)
another methode would be to get the vertiece position information of your face, interpolate between them and you get the middle of your face, this would be the position of your face in worldspace.

would be interesting to know if there is a predefined procedure for this within mel...

good luck and post your results here

Stucky
08-19-2005, 03:15 PM
Thanks dude. I've thought about that normal thing, but I quickly searched the MEL reference, and I didnt find any command that would query the normals. Perhaps if I have more time, or if somebody could help, we would solve this!



Cheers Guys


-S

tachy0n
08-19-2005, 03:37 PM
The command you are looking for is polyInfo.

Stucky
08-19-2005, 04:26 PM
I canīt find use for that command. Cause it doesnt return the world position of a face in the space. And that is what I want. Thanks anyway


-S

harmless
08-19-2005, 06:21 PM
It returns the vector for the face normals. Transform them by the matrix of the object to get the face normals in world space.

Then you can get the dot product of the face normal in world space and the vector [1,1,1] to detect the world space angle of rotation.

I think maya works in radians.

If I am incorrect, let me know. It's friday.

CGTalk Moderation
08-19-2005, 06:21 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.