Jump to content
yvesklein

Align object to preferred axis

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!



 

Share this post


Link to post
Share on other sites

This is excellent! 

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

Thanks a lot David!

Share this post


Link to post
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 :)

Share this post


Link to post
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! 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×