Jump to content

How to make the group by the color range ?


ghang

Recommended Posts

Hi all

how to make the group by the color range ?

for example i want the primitive group that the RedColor of RGB is in range 50 - 150

e.g : color_(50-100)_0_0

eg: color_(50-150)_(0-255)_(0-255)

I know I can sperate the color group with partition node, but after that i want to select the range by color group, how can i do that ?

thanks

post-4016-125827757085_thumb.png

question_of_group_RED.hipnc

Link to comment
Share on other sites

e.g : color_(50-100)_0_0

eg: color_(50-150)_(0-255)_(0-255)

Well, first of all, colour values in Houdini are not in the range 0-255, but in the range 0-1. So instead of 50-100, you want values like (50/255) to (100/255). Then you can just do stuff similar to

$CR >= 0.2 && $CR <= 0.4 && abs($CG) < 0.0001 && abs($CB) < 0.0001

Link to comment
Share on other sites

Well, first of all, colour values in Houdini are not in the range 0-255, but in the range 0-1. So instead of 50-100, you want values like (50/255) to (100/255). Then you can just do stuff similar to

$CR >= 0.2 && $CR <= 0.4 && abs($CG) < 0.0001 && abs($CB) < 0.0001

Oh,thank you very much :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...