Jump to content

Align object to preferred axis


yvesklein

Recommended Posts

Hi everybody,

I have a Houdini dilemma I hope somebody will help me to solve. 

I have a straight line. 
This line is located somewhere in the 3d space with it's own transforms and rotations.
I would like to make a spiral out of this line keeping it's position.

Now, what I have been doing is transform my line back to the origin, manually align the line to one of the axis, run some point expressions to transform it into a spiral (like the ones in the expression cookbook) and revert all these steps back till I have my spiral back in position. 

Which would be the way to procedurally align an object to a preferred axis? 

I thought about defining an up vector for the line, somehow compare it to the axis I like and multiply the line position with the resulting rotation matrix I get. Not succeeding though. 

Accepting any kind of tips on this.

Thanks!



 

Link to comment
Share on other sites

6 hours ago, yvesklein said:

This is excellent! 

I was completely unaware of the existence of the Deformation Wrangle. 
Very clean and elegant approach. 

Thanks a lot David!

For geometry it does work with a normal Point Wrangle as well, just multiplying P with the matrix instead. However I recently had to move a resizing pyro sim and the deformation wrangle worked wonders with that :)

Link to comment
Share on other sites

On 8/12/2016 at 9:28 PM, Skybar said:

For geometry it does work with a normal Point Wrangle as well, just multiplying P with the matrix instead. However I recently had to move a resizing pyro sim and the deformation wrangle worked wonders with that :)

That is very good to know!
I definitely have to get more in depth with it. 
Thanks again! 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...