Hi there,
I've got a grid and I'd like to detect the inside faces / border faces / corner faces and create a value attribute which assigns 0 to inside / 1 to border / 2 to corner.
Thanks in advance for any help.
Grid - detect inside faces / border faces / corner faces?
1315 2 0-
- BenWWilson
- Member
- 17 posts
- Joined: Nov. 2018
- Offline
-
- animatrix_
- Member
- 5100 posts
- Joined: Feb. 2012
- Offline
Hi,
You can do this easily with the Group Create SOP's Unshared Edges option to get the border prims and use this VEX code to isolate the corner primitives from that. The rest will be inside primitives:
You can do this easily with the Group Create SOP's Unshared Edges option to get the border prims and use this VEX code to isolate the corner primitives from that. The rest will be inside primitives:
int count = 0; int primindex = -1; int prims [ ] = pointprims ( 0, @ptnum ); foreach ( int pr; prims ) if ( inprimgroup ( 0, "borderprims", pr ) ) { count += 1; primindex = pr; } if ( count == 1 ) setprimgroup ( 0, "cornerprims", primindex, 1 );
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
-
- BenWWilson
- Member
- 17 posts
- Joined: Nov. 2018
- Offline
-
- Quick Links

