Switch color VEX in Houdini




Switch color VEX

switch node only has 11 inputs, so just use VEX: add attribute wrangle node // initialize variables R,G,B as float // divide by 255 to get houdini RGB values // example: // @Cd = set( 0.219608,0.65098,0.188235 ) ; // @Cd = set( (float) 56 / 255, (float) 166 / 255, (float) 48 / 255 ) if( ch("../newparameter2")=="001" ) { f@R = 228 ; f@G = 140 ; f@B = 197 ; @Cd = set( (float) @R / 255, (float) @G / 255, (float) @B / 255 ) ; } else if( ch("../newparameter2")=="002" ) { f@R = 56 ; f@G = 166 ; f@B = 48 ; @Cd = set( (float) @R / 255, (float) @G / 255, (float) @B / 255 ) ; }



Tags: , ,
Veröffentlicht: 08.2020