I'm trying to expand my use of applying shaders on a per point(conditionaly like current frame) bases in vex wrangles.
I'm finding I cannot use the same ‘technique’ for all ‘attributes’ in the shader.
For example the gif attached(created from the attached hip file) is changing the color of opacolor from green to red as frames progress. I've included the hip file that shows this too.
'opacolor' is the opacity color of the principal shader being used.
The basic vex code I use for this is:
vector Col_A;
float Change_To_New_Color;
Change_To_New_Color = (@Frame - 1) * 15.0627;
if(@ptnum < Change_To_New_Color)
{
Col_A = set(1,0,0);
}
else
{
Col_A = set(0,1,0);
}
v@opaccolor = Col_A;
The above code works when I am using “principalshader_A” for my selection in the material node.
However, if I set the material node to use “principalshader_B” the above code does not work.
The difference between the two is that principalshader_B has a cell noise > colormix nodes attached to the shaders base color.
Strangely enough, I can still manually change the color of opacity - just not with the above code.
Ultimately I would like to use code similar to the above to drive changes to either the primary or secondary color of the colormix node.
When I tried using v@primary or v@secondary I wasn't able to get any results - which led me to further testing and trials which is how I discovered not being able to change opacity once the nodes were connected.
I'm hoping someone could explain what is happening and suggest a workflow to get me to be able to change the primary and secondary ‘attributes’ of the color mix.
I'm guessing I will have to ‘import’ all those points into the shader network and do the work from there?
Thanks for any feedback.
