TYPE: SOP
TITLE: Shader SOP

The Shader operation applies SHOP shaders to different groups of primitives.
It only applies the attributes for one target renderer.  If two or more
renderers are to be used, multiple Shader operations must be used.

These attributes typically override the shaders defined at the object
level.

The first three parameters for group, surface, and displacement
shader, are used for interactive shader selection.

~h(<u>Indirect References</u>~h)

When indirect references are turned on, the attributes created will
simply reference SHOPs instead of baking the shader string into the
geometry.  The advantage of this is that when shader parameters are
changed, this will not require a re-cook of the SOP (making the HIP
file more efficient).  However, indirect references must be exported
to renderers since the renderer will not be able to resolve the SHOP
reference at render time.

When generating RIB, indirect references will be resolved when the
stream is output.  When making ReadArchives, it is important to
have baked shader strings (not indirect references).

When generating .mi files, indirect references will be resolved when
the .mi file is output.

When generating .ifd files, there are options in the output driver to
control whether indirect references should be "hardened" (i.e. baked)
or whether SHOP references should be output to the IFD.  When the
geometry is to be referenced from disk, it is important to have the
SHOP references output in the IFD, otherwise mantra will be unable to
resolve shaders.

When using indirect references, you have the option of storing the SHOP
paths as either absolute paths, or relative to the object containing the
Shader SOP.  Absolute paths are the default, and match the operation of
this SOP in earlier versions of Houdini.  Relative paths are more
appropriate when creating custom operator types which contain the
objects and SHOP materials for the object inside a single sub-network.

~h(<u>Point Attributes vs. Primitive Attributes</u>~h)

Typically, primitive attributes should be used if this geometry is
being rendered.  However, if this geometry is being used as a template
for instancing, using point attributes cause the geometry instanced at
the point to inherit the shaders in most cases.  Point attribute
generation should only be used when this geometry is being used for
instancing.

Parameters:

    Group       - Specify the groups in question.  If the group is
                  left blank, the SHOP will be applied to all
                  primitives.
    Shader Name - Name of SHOP to assign to the group

See also: BakeVEX, Texture
