maxpayne Posted April 1, 2020 Share Posted April 1, 2020 Hi Guys. I need to get curved object to be twisted. "Bend" node won't work here as I will have complex shape later on and twisting should consider the shape of the object. I'm using a curve to drive the object shape so I have attributes such as pivot points and axis for each point. The only thing I need to do is to rotate those points around axis on specific angle. Sounds quite straightforward but I can't make it work. I tried lots of approaches but nothing worked well. On the image below. On the screen left I have the object that I need to be twisted. Middle one is the result that I got using matrices. It looks promising but points got scaled for some reasons. And the right one is the Quaternion rotation that does something but looks like axis is wrong even though it should be correct. Does anyone know how to do it properly ? Thank you. Quote Link to comment Share on other sites More sharing options...
Noobini Posted April 1, 2020 Share Posted April 1, 2020 (edited) just use sweep ? Edited April 1, 2020 by Noobini 1 Quote Link to comment Share on other sites More sharing options...
maxpayne Posted April 1, 2020 Author Share Posted April 1, 2020 I believe it won't work. I have more complex shape that has bunch of details on it and I would like to see them twisting as well. I could probably use sweep for a point deform but that's extra work. I'm sure there is a simple way of rotating points around axis. Quote Link to comment Share on other sites More sharing options...
Noobini Posted April 1, 2020 Share Posted April 1, 2020 (edited) try the new orientalongcurve ? seems more sophisticated with twist Edited April 1, 2020 by Noobini Quote Link to comment Share on other sites More sharing options...
MildlyRedBeard Posted April 2, 2020 Share Posted April 2, 2020 I threw together a quick and dirty solution. Its about as straightforward as I could think of. Two things to keep in mind is that 1) each "slice" thats going to be rotated needs to be transformed about to the world origin and 2) rotations usually need to be in radians, not degrees. Double check your setup cos it looks like those two things could be causing your issues. Anyways have a poke through the file hopefully it helps. If you need some extra clarity in the code have a quick read of this piece... http://www.tokeru.com/cgwiki/index.php?title=HoudiniVex#More_on_rotation:_Orient.2C_Quaternions.2C_Matricies.2C_Offsets.2C_stuff twist_object_around_curve.hipnc Quote Link to comment Share on other sites More sharing options...
maxpayne Posted April 2, 2020 Author Share Posted April 2, 2020 Hi MildlyRedBeard. That what I was looking for. Thank you. My problem was that I tried to do rotation at current point positions not in the origin. 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.