Jump to content

Rotate by local axis with VOP / VEX


Recommended Posts

Hi there,

I have been trying to figure this out but probably don't know enough about transform/rotate matrices and how they work. What I got is a circle of flat boxes all orientated in Z. The flat side is always faced to the center of the circle. See attached image for better understanding. Now what I want is a rotation around the local X axis of each box. Attached is an example file to see what should happen and also what I have come up so far. To better illustrate what the end result should be there is the same setup built with a copy SOP and a transform node before to do the rotation.
Now the solution I came up with kind of works. The main problem is that there seems to be some sort of scaling. You can see this when viewing the solution made in Houdini in template mode.
Maybe someone can point me in the right direction. Also, my setup is not very elegant so if there are other or better solutions I would love to hear them.
Thanks in advance!


Dennis

rotate_objects_local_v01.hiplc

 

rotate_local_v01.gif

Edited by DennisSchmidt
Link to comment
Share on other sites

Thanks F1 and Michel for the reply and your time looking into my setup. Good to know that I was just missing a normalize node. But makes sense and thanks for the link for further explanation.
Now just to take it a bit further, is there a possibility of doing the rotation somewhere else in space(not the origin)? As you can see at the moment I am moving each piece to the origin, doing the rotation and then moving it back to where it was. So rotating around a given point would be a nice addition. I have been trying but so far no luck.
Your approach Michel is kind of what I was thinking of. Very nice way of doing the transform on the points. And a very nice solution in the wrangle node. Almost better to read than in VOPS :D The thing that I am trying now with your solution is to use each individual piece from the spiral. The reason is because the geometry that I will be applying the effect to will come from another application and every piece is unique. Any idea?

Thanks both of you for your help and solutions! Really great.
 

Link to comment
Share on other sites

What you are describing is a workflow issue personally if I have to do some kind of procedural operation on stuff that is not inside Houdini I tend to think the best practice is if possible work the solution together with the people that are sending you the stuff so that way you can provide them with the information regarding the best way they can send you the "stuff" so you can solve the problem with the most efficient solution that you have, you know "team work" otherwise each case scenario is going to need a different solution on your side.
"Team work" is also a powerful node :D.

I hope that helps.

  • Like 1
Link to comment
Share on other sites

 

"Teamwork" is the best node ever :D Yeah, I absolutely agree with you. Maybe there is a better solution. What is actually happening is that modeling is done in ZBrush and rigging is supposed to be done in Houdini. Therefore I think that this is the most efficient solution. And I love to learn new things too so I got a win-win situation here ;) Oh, and by the way, I sorted it out with your method. Really great. Thanks a lot for that. What I did is just add a name attribute to the points and the geo and then use a transform pieces node. Works perfect. The only thing I had to add was a center point for calculating the UP vector. I highlighted the added nodes in red.

Thanks again for your help!

Dennis

rotate_objects_local_v03.hiplc

Edited by DennisSchmidt
  • Like 1
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...