Hello Everyone,
Let me ask you for help with something that looks extremely easy, yet I got totally stuck trying to find a simple way forward.
I have two objects, a cube and a grid 1 unit below the cube. The cube is rotated *at sop level*, and I neeed the grid to always stay 1 unit below the lowest point of the cube. The two are inside different geometry containers.
How can this be most easily be done? My aim is to build the required functionality into the grid asset, so that I can give it an arbitrary geometry, and make sure it always stays within the required distance, when the other geo is animated.
I would appreciate some help with this issue.
Thanks,
Greg
Object level: keep a grid 1 unit below rotating cube
2173 2 1-
- aiworks
- Member
- 130 posts
- Joined: 4月 2009
- Offline
-
- graham
- Member
- 1920 posts
- Joined: 11月 2006
- Offline
You just need to build a bounding box around the rotating geometry and then transform your grid downwards based on the minimum Y value of that bbox and your desired offset. See attached:
You can object merge in your rotating geometry and plug it into the input of a Box SOP. This constructs a box completely encompassing your rotating geometry. If you use a bbox() expression to get the YMIN value you can then use it to transform your grid.
You can object merge in your rotating geometry and plug it into the input of a Box SOP. This constructs a box completely encompassing your rotating geometry. If you use a bbox() expression to get the YMIN value you can then use it to transform your grid.
Graham Thompson, Technical Artist @ Rockstar Games
-
- aiworks
- Member
- 130 posts
- Joined: 4月 2009
- Offline
-
- Quick Links