Move spliced Mesh to Center
1681 4 1- eveying
- Member
- 19 posts
- Joined: Dec. 2021
- Online
Hi, I want to split my heightfield into mesh and get all sliced mesh set in (0, y, 0) position. So I use labs mesh slice and try to use a fol-loop to seperately move every pieces into center, but when I use detail attr to save the offset values I just move whole mesh by offset of group 0. Is there any way I could do what I want? or it there anyway to set pivot point to the center of the sliced mesh and keep the pivot then output? Thanks!
- toadstorm
- Member
- 359 posts
- Joined: April 2017
- Offline
You don't need a for/each loop for this. You can just use the Pack SOP to create a packed fragment with the pivot at the centroid of each piece... you just need a string-type name attribute for the Pack SOP to read. A Primitive Wrangle can convert your i@class into an s@name attribute like this:
Then pack, and then you can use a point wrangle to set P to (0, y, 0).
s@name = sprintf("piece%g", i@class);
Then pack, and then you can use a point wrangle to set P to (0, y, 0).
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
- tamte
- Member
- 8539 posts
- Joined: July 2007
- Offline
- jsmack
- Member
- 7759 posts
- Joined: Sept. 2011
- Offline
- eveying
- Member
- 19 posts
- Joined: Dec. 2021
- Online
-
- Quick Links