delete based on color

   2453   4   1
User Avatar
Member
1 posts
Joined: March 2017
Offline
Hello Guys
i'm in love with Houdini and i'm trying hard to understand it. I came from C4d and after i saw what Houdini can do, it feel like c4d was little bit simple … little bit a jock. so i want to move to Houdini. i'ts been 2 weeks now and my brain hurt after so much learning and tutorials and i'm still confused about some stuff. but i'm getting there.

I still feel confused about the attributes and how to use them in a way to deform or control objects.

right now i want to delete some geometry based on color. simple?

i have a sphere connected to color SOP (set to random colors ) and then a delete sop. ( or should it be blast SOP ?)
i just want to know what is the right expression to type in the delete Sop to delete primitives that are red for example.


thanks for your help.
and sorry if i'm posting in the wrong place!
User Avatar
Member
1692 posts
Joined: June 2008
Offline
Try something like this…
v@Cd.r < 0.5

This should delete any color with a red channel less then 0.5. Color ranges are typically 0-1 so think of them as a percentage to keep or remove. Blast or Delete do the same thing.
Using Houdini Indie

Windows 7 32GB AMD FX8370 @ 4.0Ghz
nVidia 1070GTX 8BG RAM. Driver: 358.87
User Avatar
Member
22 posts
Joined: Jan. 2016
Offline
Enivob
Try something like this…
v@Cd.r < 0.5

This should delete any color with a red channel less then 0.5. Color ranges are typically 0-1 so think of them as a percentage to keep or remove. Blast or Delete do the same thing.
this does not work for me in the the group field of a delete sop. its says
Warning
'v@Cd.r>0.5' is not a valid group.
User Avatar
Member
130 posts
Joined: Feb. 2017
Offline
did you set it to expression ? (not Pattern, not Range but Expression)

here:
Edited by vusta - Jan. 6, 2018 04:48:06

Attachments:
delbyexpression.hipnc (78.2 KB)

User Avatar
Member
2 posts
Joined: April 2006
Offline
Basically, when you are assigning a random color, you are assigning a random float3 (x,y,z) number to them, so they all have at least a value of red greater than 0.
that's why you use an expression like $CR> 0.8 or @Cd.x > 0.8 in delete node.
  • Quick Links