Jump to content

Select color precisly from @Cd (keying, vex, RGB)


minuit

Recommended Posts

Hi everyone,

I'm trying to select the color from a point cloud (in the geo context). Separate them to apply a different pscale attribute depending of the color value.

With VEX , it's easy to select separte RGB and CMY values with addition and subtraction :

Red = @Cd.r - @Cd.b - @Cd.g    Green =  @Cd.g - @Cd.r - @Cd.b      Blue = @Cd.b - @Cd.r - @Cd.g

Cyan = @Cd.b*@Cd.g-@Cd.r    Yellow = @Cd.r*@Cd.g-@Cd.b     Magenta = @Cd.r*@Cd.b-@Cd.g

 

My problem is that i lack a precise value to separate intermediate values, pastel colors, colors between two primary colors, etc ...

How can i pick a special color to applied precisely my pscale value. Is it a good way ? Is there an other way to have a color picker ? a Keying function ?

 

Hope this is clear,

Regards,

RGB.png

Link to comment
Share on other sites

Hi !

Thanks @konstantin magnus. This node is a little bit heavy process, however it is interesting to group point by @Cd attribute, sadly cluster attribute looks random...

Nice @Christoph_H. I tried your code it is working well. I didn't understand what you want to do with  vector picker (v@picker) ?

Also a coding friend give me the operation to do for this. I almost succeed that way :

 

 

Capture d’écran 2019-12-18 à 19.55.33.png

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...