Rotate Copy stamped objects to "flatt" surface

   3302   5   0
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
So I've been pondering on this and can not come up with a solution.

I want to copy stamp stones/rocsk to a plane or other geo, and give them some random values, rotation, scale etc. But due the the shapes of the rocks sometimes they are placed very bad by the random rotation.

So I would somehow like to figure out the a combination of “biggest area facing down” and rotate each unique copy to that “plane”.

I added a picture hoping it will help my explain what I want to do. Any ideas ?

Attachments:
Rotate.jpg (56.7 KB)

/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
387 posts
Joined: Nov. 2008
Offline
Use Oriented Bounding Box, then get largest polygon face of it (Sort by face Area) and do the rotation by comparing normal of that face with ground normal. Align position of whole object by sorting point distance by Y from ground plane and moving by that offset of closest point to ground (or Raycast it)
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
Thanks Pezetko that sounds like just what I want but I am not sure how to get the Oriented Bounding Box ?

Update, I guess it's the Oriented Bounding Box when you connect a Box SOP to the geo, but that will give 2 “largest” polygons and means wont work perfectly, but perhaps good enough.
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
This is what im getting and..well obviously missing something because it is not working at all

Attachments:
Topple.hiplc (86.5 KB)

/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
387 posts
Joined: Nov. 2008
Offline
Yes Box or Bound SOP with Oriented Bounding Box parameter checked.

I added quick example.

Thinking about it again, about your example (image). If you want that already aligned geometry fall by gravity, I would also try to convert it to RBD with high friction and low bounce, move it a little bit up and let it fall. Then use simulated result as new orientation.

Attachments:
pz_align_geo_to_the_ground.hipnc (177.7 KB)

User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
That is just a crazy good example and so much effort put into it, just wow ! Thank you !

And yes I thought about perhaps just simulating it instead because it would most likely give a more natural look in the end anyway, but learning alot looking through your example !

Thanks !
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
  • Quick Links