Adverti horiz upsell
Animated Shaders with MTOR
Animated Shaders with MTOR
sdb1987, added 2005-09-13 12:06:55 UTC 30,998 views  Rating:
(0 ratings)
Page 1 of 1

Here is Another Tut for RenderMan via MtoR.
This time we're going to animate parameters in the shaders control window.

The first time I jump in the MtoR world I was wondering where was the set key buttons or Options, but I didn't find it anywhere so I did a very simple thing : I looked for it in the documentation and i found what I was looking for.

1 - First we setup a very simple scene. A plane, a sphere and one light. For this exemple I choose a Directional Light but the same thing is possible with SpotLight or PointLight.

You'll also need a Locator.

2 - We create now, a new SLIM palette.

Render > RenderMan > Slim > NewPalette.

Setup some Appearance and attach 'em to objects in the scene.

3 -If you have it in your shelf, Hit the RenderMan Render   button .
Above you see what I get with my setting.

4 -Now, imagine we want the sphere to disapear as the animation goes.

The technique is simple when you want a parameter to be animated you need to connect this parameter to an attribute in Maya. And instead of keyFraming the MtoR parameter you add keys to the Maya attribute.

when done you write a little TCL expression to make the connection.

Here is the methodology :

In Maya, select the Locator and add a Custom attribute.

Modify >addAttribute

Attribute Name : Opacity





7 - Set some KeyFrames to the Opacity Attribute:

Current Time 1 => Opacity 1

Current Time 40 => Opacity 0

8 - When done we go Back to our Slim Palette. Double click the shader attached to the sphere. (Mine is a simple plastic shader).

Change the Opacity Attribute from Constant to Expression.

And Type the folowing TCL expression :

nota : I don't know why but sometimes MtoR returns some error messages but don't care, it works.

Now let's try .

Go to frame 25 and Render

IT WORKED ! But ...

The Shadow is still opaque so the result is imbelievable.

You can use the same trick to animate the shadow color to create a transparant one.

I added a ShadowCTR Custom Attribute and animated it and add the same kind of TCL expression to the shadow color parameter of the Light shader.

Here you can download the resuling animation

Nicolas AITHADI aka "casquette"

Freelance Maya /Renderman
<Copyright - 2000 - Nicolas AITHADI - All right reserved.