Hi there, new convert here
I have created a polygon group so that I can attach a shader to it… all good, but I want to create a second group which is the inverse of the first. Is there a quick way to invert a group selection? … I imagine this can be done via an expression if I copy and past the pattern into the experssion filter?
btw re shader assignment, if there are two groups that overlap which shader gets priority in the ovelapped area?
and… is it possible to grow a polugon selection?
thanks
Serg
invert a group selection
37670 5 2- Serg
- Member
- 511 posts
- Joined:
- Offline
- goldfarb
- Staff
- 3463 posts
- Joined: July 2005
- Offline
- Serg
- Member
- 511 posts
- Joined:
- Offline
- VisualCortexLab
- Member
- 509 posts
- Joined: July 2005
- Offline
technically it means.. "not' … so !red… means NOT red.
cheers
cheers
JcN
VisualCortexLab Ltd :: www.visualcortexlab.com
VisualCortexLab Ltd :: www.visualcortexlab.com
- JSCGMHoudini
- Member
- 12 posts
- Joined: Sept. 2014
- Offline
Hi, another newbie here,
I have something similar but I'm trying to create three groups of poly's (surfaces) from the given mesh. I have created a note for the first two, but the third group is made of very small poly's which would be easier to select via the inverse of the first two groups combined. (if that makes sense).
I'm using houdini 14.0.291.
Any help is appreciated.
Thanks.
I just got it! In the combine tab for third group… group3 = ! group1 AND ! group2.
Leaving this for someone.
Thanks anyway.
I have something similar but I'm trying to create three groups of poly's (surfaces) from the given mesh. I have created a note for the first two, but the third group is made of very small poly's which would be easier to select via the inverse of the first two groups combined. (if that makes sense).
I'm using houdini 14.0.291.
Any help is appreciated.
Thanks.
I just got it! In the combine tab for third group… group3 = ! group1 AND ! group2.
Leaving this for someone.
Thanks anyway.
- FrostyNugget
- Member
- 4 posts
- Joined: Oct. 2017
- Offline
There are a few ways to invert a group on houdini:
The most common is calling the group with an excalamation before:
Ex: if your group is called test, when you're calling it on a node (HScript)just use “!test” which basically means “all but test”.
Another way, especially if you are going to mess around a lot with a group is reverse it from de beggining, and you could do it with vex, a combine node etc.
I usually use a wrangle running over the same class of geometry than your group, you could write:
(All the options are resulting the same)
1.— @group_test = abs(1-@group_test);
2.— @group_test = fit01(@group_test,1,0);(Inverting from 0-1 to 1-0);
3.— @group_test =!@group_sides;
etc.
I'm avoiding comparisons statements“If, else, …” because usually, they are slower to compute than the bast majority of aritmetically operations (the 3rd option is one, but is very short heh).
Optionally if it fits better in your nodegraph, or you are “vex-lazy”, you could try with a combine node, setting your group equal to the inverted one;
Ex. Group: “test” Equals: !test
A hiplc is worth a thousand words:
The most common is calling the group with an excalamation before:
Ex: if your group is called test, when you're calling it on a node (HScript)just use “!test” which basically means “all but test”.
Another way, especially if you are going to mess around a lot with a group is reverse it from de beggining, and you could do it with vex, a combine node etc.
I usually use a wrangle running over the same class of geometry than your group, you could write:
(All the options are resulting the same)
1.— @group_test = abs(1-@group_test);
2.— @group_test = fit01(@group_test,1,0);(Inverting from 0-1 to 1-0);
3.— @group_test =!@group_sides;
etc.
I'm avoiding comparisons statements“If, else, …” because usually, they are slower to compute than the bast majority of aritmetically operations (the 3rd option is one, but is very short heh).
Optionally if it fits better in your nodegraph, or you are “vex-lazy”, you could try with a combine node, setting your group equal to the inverted one;
Ex. Group: “test” Equals: !test
A hiplc is worth a thousand words:
-
- Quick Links