on the fly groups in SOPs

   1141   3   1
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Hi,

I was trying to delete primitives based on normals, if they got too “vertical” by writing:

abs(@N.y)<0.1

into the group field of the Blast node.

Now this didn't work at all. not even as part of an If statement in a primitive wrangle SOP, the reason seeming to be, @N.y wouldn't get evaluated inside the parentheses. It started working, once I created a temporary float parameter from @N.y and used that in the if statement, but I'd like to understand, why this doesn't work and how this this limitation could be worked around in “on the fly” group creation of SOP nodes.

Thanks in advance.
Cheers,
Ivan
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
I dont think you can evaluate expressions in group name fields like that. Not completely sure though
@N.y<0.1 works but not when wrapping @N in abs().

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
8583 posts
Joined: July 2007
Offline
this is all you can do in the group field, nothing too fancy
http://www.sidefx.com/docs/houdini/model/groups.html#manual [www.sidefx.com]

but your wrangle if(abs(@N.y)<0.1){}should work out of the box without any temporary variables
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
731 posts
Joined: Dec. 2006
Offline
I find it's often better to use the Group Expression SOP to create a group and then blast that group with a blast node.
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
  • Quick Links