Jump to content
Sign in to follow this  

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

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,



Share this post

Link to post
Share on other sites

you can do this to pick the exact color value:


or this:

if (@Cd == {1,0.5,0.2} ) {
    @P.y = 1;  

with pcfind() you can create a picker.


Edited by Christoph_H

Share this post

Link to post
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

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this