DennisSchmidt Posted December 17, 2016 Share Posted December 17, 2016 (edited) 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 Edited December 18, 2016 by DennisSchmidt Quote Link to comment Share on other sites More sharing options...
f1480187 Posted December 18, 2016 Share Posted December 18, 2016 Cross product of two unit vectors is not a unit vector itself. In your case, it's matrix rotation axis being scaled a bit. rotate_pieces_locally.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Mzigaib Posted December 18, 2016 Share Posted December 18, 2016 (edited) Just another option rotate_objects_local_v02.hiplc I hope that helps. Edited December 18, 2016 by Mzigaib 1 Quote Link to comment Share on other sites More sharing options...
DennisSchmidt Posted December 18, 2016 Author Share Posted December 18, 2016 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 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. Quote Link to comment Share on other sites More sharing options...
Mzigaib Posted December 18, 2016 Share Posted December 18, 2016 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 . I hope that helps. 1 Quote Link to comment Share on other sites More sharing options...
DennisSchmidt Posted December 19, 2016 Author Share Posted December 19, 2016 (edited) "Teamwork" is the best node ever 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 December 19, 2016 by DennisSchmidt 1 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.