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 ?
Rotate Copy stamped objects to "flatt" surface
3293 5 0- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
- pezetko
- 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)
- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
- pezetko
- 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.
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.
- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
-
- Quick Links