ejr32123 100 Posted February 26, 2020 (edited) hello! I am stuck, could someone point me in the right direction? I setup some points to rotate like a rubiks cube. How can I get my instances to rotate correctly? Thanks in advance rotate.zip Edited February 26, 2020 by ejr32123 Share this post Link to post Share on other sites
LaidlawFX 274 Posted February 26, 2020 http://www.sidefx.com/docs/houdini/copy/instanceattrs Share this post Link to post Share on other sites
ejr32123 100 Posted February 26, 2020 (edited) yes, that is the documentation, lol. I posted here because I am having trouble getting it to work : ( the problem is the points are rotating and I need the orient attribute to rotate with the points. Edited February 26, 2020 by ejr32123 Share this post Link to post Share on other sites
Librarian 842 Posted February 26, 2020 @ejr32123 promote your detail rot attribute to point attribute. Share this post Link to post Share on other sites
ejr32123 100 Posted February 26, 2020 (edited) 1 hour ago, Librarian said: @ejr32123 promote your detail rot attribute to point attribute. rot is some other attribute for something else that I made and has nothing to do with the orientation. That will not work. Edited February 26, 2020 by ejr32123 Share this post Link to post Share on other sites
LaidlawFX 274 Posted February 26, 2020 You'll need to effect the system that created the point cloud that the file sop is looking at. One way of doing this is to set the up and N vectors on the original point cloud, and then rotate. Example attached. rotate_v1.hiplc 2 Share this post Link to post Share on other sites
Aizatulin 164 Posted February 26, 2020 You can also accumulate over quaternions (for copy to points), if you are rotating your points. You can use an initial value (representing the identy matrix) and for each interaction you (q)multiply this attribute with the new one. pt_matrix_rot.hipnc Share this post Link to post Share on other sites
Librarian 842 Posted February 26, 2020 (edited) right now with your @ejr32123 N points simulation looks like Edited February 26, 2020 by Librarian Share this post Link to post Share on other sites
ejr32123 100 Posted February 26, 2020 thanks all for the answers, i'll check them out after work : ) Share this post Link to post Share on other sites
CinnamonMetal 21 Posted February 26, 2020 (edited) 1 hour ago, Aizatulin said: You can also accumulate over quaternions (for copy to points), if you are rotating your points. You can use an initial value (representing the identy matrix) and for each interaction you (q)multiply this attribute with the new one. pt_matrix_rot.hipnc Your scene is more deeper but doesn't run on 17.5 without errors. Edited February 26, 2020 by CinnamonMetal Share this post Link to post Share on other sites
ejr32123 100 Posted February 27, 2020 (edited) haha, I got it working : ) I was reading from https://www.toadstorm.com /blog/?p=493 toad storms website. I had tried up and N. Reading from his website you need both at the same time. I took the rotation I was doing in the point vop and applied it to both the up vector and the N. Now it works like a charm. Thanks everyone : ) Edited February 27, 2020 by ejr32123 1 Share this post Link to post Share on other sites
CinnamonMetal 21 Posted February 27, 2020 (edited) 1 hour ago, ejr32123 said: haha, I got it working : ) I was reading from https://www.toadstorm.com /blog/?p=493 toad storms website. I had tried up and N. Reading from his website you need both at the same time. I took the rotation I was doing in the point vop and applied it to both the up vector and the N. Now it works like a charm. Thanks everyone : ) That is what @LaidlawFX showed in his example; both N and a up-vector. Either way you got it working. Edited February 27, 2020 by CinnamonMetal Share this post Link to post Share on other sites