Krion Posted May 14, 2019 Share Posted May 14, 2019 (edited) Hi! So I have this grid who has colours from a from a noise, and then I make them lines and jitter them. I have made an attribute on it called 'eye'. And I want at the end of the chain to color my object a predefined red (color vector) where the 'eye' attribute is 1. And I want this on top of the existing color, which is what I don't know how to do. How can I layer different colours on top of each other based on attributes in VEX and in VOPs (or any other way)? AddColorToExistingColor.hipnc Thank you! Edited May 14, 2019 by that Abstract guy Quote Link to comment Share on other sites More sharing options...
3dome Posted May 14, 2019 Share Posted May 14, 2019 not sure if that's what you're after, but use one of these lines to see different effects //if(f@eye>0) @Cd = {1,0,0}; //overrides the color where @eye is 1 //if(f@eye>0) @Cd += {1,0,0}; //add red where @eye is 1 if(f@eye>0) @Cd *= {1,0,0}; //multiply with red where @eye is 1 1 Quote Link to comment Share on other sites More sharing options...
Krion Posted May 14, 2019 Author Share Posted May 14, 2019 Ah I see. And how would you do it if you want it like a gradient? Or lets say: like an override, but only overridden 50% wherever the attribute is 0.5? Quote Link to comment Share on other sites More sharing options...
anim Posted May 25, 2019 Share Posted May 25, 2019 lots of ways, but you can use for example Mix VOP in vops or lerp() function in VEX to mix colors by attribute (see example with both) vector color = chv("color"); v@Cd = lerp(v@Cd, color, f@eye); AddColorToExistingColor_fix.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.