Friday, May 6, 2011

Optimizing your Shaders

Want to reduce the number of shop nodes you have in your Material Palette?

Let's say you're not really doing anything fancy with your material shaders.  All you want is a bunch of colors. However you need them to have the same properties (reflect, diffuse intensity, etc.)

Take a cornell box for instance: I just want a white box, with a red and blue wall on either side.

First add and assign a white Mantra Surface shader
Inside the Room node group the red and blue walls individually.
In the material node.  You can assign the material based on the group name, and have multiple materials on the one material node.

To use only one mantra surface for the Room, localize the parameter you need by using the overrides.  In the above case only the BaseColor parameter was altered.  So if you were to change specularity on the mantra surface node it will still affect the red and blue walls.

* Keep in mind if you use this method you will not see the local variables in the viewport (only when you render)

No comments:

Post a Comment