Layered Shaders

From K-3D

Jump to: navigation, search

Overview

Layered shaders are a non-standard (not part of RenderMan) feature in Aqsis, that allows you to create shader networks that combine the outputs of individual shaders within a single gprim. Without layered shaders (and with-or-without visual tools to generate shaders), you get a combinatorial explosion of specialized shaders, e.g: textured_matte, textured_plastic, textured_metal, textured_matte_with_decal, textured_plastic_with_decal, textured_metal_with_decal, and-so-on ...

With layers you could combine any of "texture", "decal", "matte", "plastic", and "metal" shaders to create the above list, plus more.

The devil is in the details, of course ... developing the right collection of components, with a reasonable level of granularity, is an interesting challenge. As a practical matter, you have to have shaders that are written with layers in-mind.

One method is shown here Shader_Anatomy

Interface

Future

Shader layers are actually more than just layers - they can form a shader *tree*, which is why the UI works the way it does - each layer is an instance of an AqsisSurfaceShaderLayer node. You then add user properties to make the connections between nodes. Doing this with the Node Properties panel is painful, particularly since you have to know which shader arguments need to be connected, and enter them manually. Presumably there will be a more specialized UI for editing shader trees in the future.

Personal tools