[Closed] determine rotation by material diffuse colour?
Hi, I’m new to max script and so I apollogise about how intensely dense my questions may be.
I was wondering what I should do to change the rotation of a piece of geometry (say a box) by the colour of the diffuse channel in a separate material slot.
for instance an animated diffuse colour that shifted from white to red, white would be [0,0,0] for rotation where as red would be say [0,20,0].
Or could all this be done with wire parameters?
I’ll post my findings and script(s) as I work on this but I hope to find some help here also.
UPDATE: I can affect the rotation of the box via it’s materials diffuse value with the wire parameters but I am unsure of how to convert the “bezier point 3” type of the materials diffuse to the “float wire” type of the X rotation of the box.
You can access the rgb values with r,g,b
for example:
colorW = $.wirecolor -- variable definition
colorW.r as float
cheers,
marcus
Superb! thanks so much,
so how would I go about applying this in the wire parameters window? I have “diffuse” to work with instead of “color”
Just wire the single diffuse color values to the axis. In this case you can use a number to adress the float values in the point3 variable. When you change the material, all connections are gone. So be careful
cheers,
marcus
Thank you very much Marcus, seems it was a simple enough question and thanks very much for giving me the answers I was looking for.