User guide

17 Handling Textures
Because textures are handled in a number of different ways by shader libraries and studio pipelines, Katana doesn't
enforce rigid standards for how textures are declared but acts as a flexible framework with some common
conventions.
In particular there is a convention to use string attributes with the naming convention textures.xxx where xxx is
the name of the file path for a texture. For example textures.ColMap specifies the filepath for a texture called
ColMap.
TIP: The following demo scenes shows different ways of handling textures:
$KATANA_ROOT/demos/katana_files/texture_resolving_prman.katana
$KATANA_ROOT/demos/katana_files/texture_resolving_arnold.katana
Different Approaches to Determine Texture
Materials With Explicit Textures
The simplest way of assigning individual pieces of geometry their own texture map, is to create a separate material
for each piece of geometry, and assign separate texture maps in each material’s parameters.
Though this is simple it lacks flexibility. In particular it doesn’t allow the use of the same material on multiple objects
where each object picks up its own textures.
Using Material Overrides to Specify Textures
If you have exposed parameters on a material that define the textures to use, you can use material overrides to
create new object specific versions of materials that substitute the relevant textures. Depending on your renderer,
you can assign the base material to a location high up the Scene Graph hierarchy and use inheritance, or assign the
base material to every geometry location.
Use a MaterialOverride set on the individual object locations to override the shader parameters that specify the
textures, with new object specific values. This can be done using MaterialAssign nodes, but since all MaterialAssign
nodes do is create attributes in an group called materialOverride we can perform material overrides by setting the
necessary attributes directly, such as by using AttributeScripts.