View Single Post
# 6 15-04-2011 , 02:35 PM
LauriePriest's Avatar
Moderator
Join Date: May 2003
Location: London
Posts: 1,001
Bit of math will do this just fine, my feeling is your animation is coming from seperate animation curves which is standard.

This setup will let you have the flexibility to alter the peaks of the animation per object and to set it to fully transparent or opaque.

You will need to know how to:
make custom attributes, use and create nodes in the hypershade, use the connection editor.

Make two attributes on the transform for each object, one called transMax
and the other called transMin.
In the hypershade graph your shaders, the transforms of your objects (which hold the custom attributes), and then create a set range node, one for each shader.

On each set range node set the old min to zero and old max to 1, then plug your transMin and transMax attributes from your objects translate to the min and max values of the set range node ( do this once for each object).

Plug the output of your animation, (should appear when you graphed your shaders) you might find you have three animCurves for each shader (representing the r, g, b components of the transparency), feel free to delete all but one since your animation is the same. Plug the output of your anim curve into the value x of the set range and then the outValueX of the set range into the transparency R, G and B component of your shader.

This should do what you want... basicaly, by setting the transMin to 1 and 1 will set your shader to be fully transparent per object and setting it to 0 and 0 will set it to fully opaque, you can do any thing inbetween too.

This probably wont update the transparency in your viewport due to the that are being used. Though you can probably do somethign similar to try and get feedback int he viewport, e.g. plug the set range into the colors of a ramp with one color in it (the inputs for this can be found in the connection editor under colorEntryList>colorEntry List[0].color R G B, this will do the same thing but it might display into the viewport since the output isnt coming directly from a math node.

Hope this helps

... This is better than animation layers by the way, alot cleaner and more control .


FX supervisor - double negative