Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Lighting & Rendering (https://simplymaya.com/forum/forumdisplay.php?f=17)
-   -   How to override an transp' animation in a Layer? (https://simplymaya.com/forum/showthread.php?t=35478)

amitr 13-04-2011 07:58 AM

How to override an transp' animation in a Layer?
 
Hello,

I have few objects.
Each object have a material of its own.

all materials have the same Transparency animation.

I want, that in a another layer, I can turn off one of the objects Transparency. (completely, to all frames).

So I have a spacial layer when all other objects have Transparency animation, but that object don't get any Transparency at all.

please help,
thanks for your time . : )

Gen 13-04-2011 12:17 PM

You will have to assign a separate shader to the object because shaders act the same on all objects to which they're assigned.

amitr 14-04-2011 04:49 PM

thanks
 
but are you sure that there is no way to have it so the Layer will decide If the object Will get the transp' or not ?

I can do this in XSI with pass partitions (with override on the partition), I believe there is a similar solution in the maya layering system...

honestdom 14-04-2011 05:14 PM

right click on the transparency in the shader there is a render layer override there.

amitr 14-04-2011 06:29 PM

thanks
 
sorry for asking,

but can you please write me step by step how to do this right ?

thanks.

LauriePriest 15-04-2011 02:35 PM

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 .


All times are GMT. The time now is 08:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018