Random rotation

   2561   8   2
User Avatar
Member
56 posts
Joined: Sept. 2015
Offline
I have a model made of cubes a few copy and taper.


and I'm not sure how I can randomly rotate like that:


1) stamp inputs doesn't work, as I have a copy of a copy, they act as a single piece.

2) I tried to pack them, but I lose shape, as all becomes square shaped. (thought to run for each on points)

and I'm bit lost now. Any suggestions?
Edited by brokenkeyframe - March 20, 2019 17:10:00

Attachments:
Screenshot from 2019-03-19 19-18-28.png (1.8 MB)
result.jpg (682.8 KB)

User Avatar
Member
731 posts
Joined: Dec. 2006
Offline
Hip file?
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
User Avatar
Member
56 posts
Joined: Sept. 2015
Offline
yes. sorry, attaching the file

Attachments:
RandomRotation.hiplc (102.7 KB)

User Avatar
Member
1736 posts
Joined: May 2006
Online
This maybe?

Attachments:
RandomRotation_me.hiplc (116.0 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
56 posts
Joined: Sept. 2015
Offline
mestela
This maybe?
I knew I need to pack it somehow! This it is!

Thank you so much will look into your example and will try to understand it!
User Avatar
Member
833 posts
Joined: Jan. 2018
Offline
Alternatively, MOPs will get you there:

https://www.motionoperators.com [www.motionoperators.com]
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
User Avatar
Member
56 posts
Joined: Sept. 2015
Offline
Midphase
Alternatively, MOPs will get you there:

https://www.motionoperators.com [www.motionoperators.com]

Hey, thanks I was looking into mops, it works on copied objects to points but was struggling to make it work with an object I already have. Maybe I missed something but will try to look into MOPS later.

I think the best approach is what Mr. mestela suggested.


UPDATE: actually, it is possible to make something similar with MOPS, after assemble and MOPS explode, but I can't get the orientation right. but anyway close enough. Good to know!
Edited by brokenkeyframe - March 21, 2019 14:29:10

Attachments:
Screenshot 2019-03-21 18.25.25.png (1.9 MB)
RandomRotation_MOPS.hiplc (228.0 KB)

User Avatar
Member
359 posts
Joined: April 2017
Offline
Hey there,

It's definitely possible to get this to work in MOPs, although you don't want to use Explode in this case, since your objects are already packed primitives. MOPs Convert is more suitable here. The catch is that the packed primitives don't inherently know which way they're oriented… Matt's solution explicitly defines an axis to rotate around. With MOPs, the objects want to rotate around their local axes, or around world axes.

The MOPs Reorient SOP can take care of this; you just have to provide each point with a local N and up that they can rotate around, and those become the new rotation axes for the packed primitives.

I caught a bug in the MOPs Randomize SOP while taking a look at this that was making it use an older rotation method, so I left that node unlocked in this example. If you download the latest Experimental build from Github, this bug should be fixed.
Edited by toadstorm - March 21, 2019 22:17:09

Attachments:
RandomRotation_MOPS_toadstorm.hiplc (352.3 KB)

MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
56 posts
Joined: Sept. 2015
Offline
toadstorm
Hey there,

It's definitely possible to get this to work in MOPs, although you don't want to use Explode in this case, since your objects are already packed primitives. MOPs Convert is more suitable here. The catch is that the packed primitives don't inherently know which way they're oriented… Matt's solution explicitly defines an axis to rotate around. With MOPs, the objects want to rotate around their local axes, or around world axes.

The MOPs Reorient SOP can take care of this; you just have to provide each point with a local N and up that they can rotate around, and those become the new rotation axes for the packed primitives.

I caught a bug in the MOPs Randomize SOP while taking a look at this that was making it use an older rotation method, so I left that node unlocked in this example. If you download the latest Experimental build from Github, this bug should be fixed.

Thank you for example and explanation! It's really helpful!
  • Quick Links