Stjohn Posted May 6, 2008 Share Posted May 6, 2008 I have a point normal that I've extracted from a sequence of obj's dumped out of Maya (don't ask). I want to rotate an object in world space based on the direction of said normal. Currently, I'm barking up the tree involving orienting a matrix to the vector, then doing some sort of crackTransform()-ish operation to get the Euler angles. Problem is, I can't figure out how to get what out of where at which point. This is turning into a No play, makeup and all. Is there some dirt-simple way to do this that I've just missed out on because I spent eight years using Houdini as a front end to a proprietary volume renderer, then another two and a half using it as a front end to the Lighting department? The only other thing I can think of (and my wrist is already swelling at the prospect) is to do point() and lookat() functions in the object's T and R channels. Cheers Quote Link to comment Share on other sites More sharing options...
symek Posted May 6, 2008 Share Posted May 6, 2008 (edited) Could you be more specific (about what is not working) or possibly attach simply hip file for an explanation what you're after? I'm not sure if I understand correctly your problem. Edited May 6, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
Stjohn Posted May 6, 2008 Author Share Posted May 6, 2008 Could you be more specific (about what is not working) or possibly attach simply hip file for an explanation what you're after?I'm not sure if I understand correctly your problem. Simply put, I need to generate Euler rotation angles from a direction vector. I just found the 'vector to rotation' sop here, but I think that's an in-house tool. Quote Link to comment Share on other sites More sharing options...
edward Posted May 6, 2008 Share Posted May 6, 2008 Take a look at the dihedral() expression function. Note that you need TWO vectors in order to describe the rotation. One of them is which ever axis you want to rotate from (eg. Z-axis) and the other vector is your normal. Quote Link to comment Share on other sites More sharing options...
petz Posted May 7, 2008 Share Posted May 7, 2008 i don extract_rot.hipnc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.