delete based on color

   23000   4   3
User Avatar
Member
4 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
2529 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 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
51 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
555 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