Making Hinges / Procedural Pivot Orientation

   3956   5   0
User Avatar
Member
23 posts
Joined: Nov. 2007
Offline
Hello everyone,

I'm trying to finish up an idea that I had this week. If you look at the image, you may see what my idea is. Each color represents its own group of polis. What I want to happen is that they flip back. Like a bonnet on a car or a hatch, if you will. The two red points indicate the hinge anchors, and the poly group should rotate along the red line.

Here's where I'm stuck though. While it is no problem to move the pivot, I have not found a way to orient it. My idea is to take the two red points and somehow create a local rotation axis out of the vector. I can put the two points in a group, that was not a problem. It's the rotation axis bit I am stuck with. I appreciate your input.

Cheers

Attachments:
hinge_test.jpg (120.1 KB)

User Avatar
Member
2 posts
Joined: July 2005
Offline
Subtract the position of your two red points and use the resulti as the “direction” of a TransformAxis SOP. Set the origin of the TransformAxis SOP to your desired pivot.
-=X
User Avatar
Member
951 posts
Joined: April 2008
Offline
Cool!!!
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
1909 posts
Joined: Nov. 2006
Offline
I posted a Python SOP implementation in the thread about this on odforce.

http://forums.odforce.net/index.php?/topic/11757-procedural-pivot-orientation/ [forums.odforce.net]
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
23 posts
Joined: Nov. 2007
Offline
agentxray
Subtract the position of your two red points and use the resulti as the “direction” of a TransformAxis SOP. Set the origin of the TransformAxis SOP to your desired pivot.

Yeah, that worked beautifully. I'll set up a good render and post the results here. Thank you very much!
User Avatar
Member
23 posts
Joined: Nov. 2007
Offline
All right, I got a decent looking test of what I plan to achieve. There still are some left over polis sticking out, but I'm dealing with those. The idea is to reveal each texture map I've used on this project and then show the final shader. The final will have to be a bit faster than this.

http://www.romanaltenburg.com/temp/transform.mov [romanaltenburg.com]

Cheers
  • Quick Links