How to delete using vertical coordinate

   3562   2   1
User Avatar
Member
2 posts
Joined: Aug. 2013
Offline
What I want to do is really simple. I have a bunch of primitives at varying heights (z is up in my Houdini, so the prims are at varying P values) that I copied downwards and I want to delete the prims that are below the origin/ground level. How do I do this?

Thanks in advance!
User Avatar
Member
8539 posts
Joined: July 2007
Offline
- use Delete SOP set to Primitives, Delete By Expression: $TY<0

- or Attrib Wrangle set to Primitives (Primitive Wrangle) with code like: if (@P.y<0) removeprim(0, @primnum, 1);

- or you can use Blast SOP with group set like: @P.y<0
but that would work only on points (you'd need to set Group Type to Points as well )
if you want to use that for primitives you'd have to have primitive attrib representing position like primP, then @primP.y<0 would work
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2 posts
Joined: Aug. 2013
Offline
Great, thanks!
  • Quick Links