Using Pipeline Data to Set Textures

Different pipelines often use different methods to specify which textures should be used on a particular asset. The normal convention in Katana is to use attributes called textures.xxx on geometry to hold the individual texture paths needed for that piece of geometry. That data can be set in a number of different ways. For instance:

Metadata on Imported Geometry

Arbitrary metadata can be read in with geometry on import, such as string data containing the texture paths that is written out into Alembic and read in as arbitrary geometry data. This means that assets can be created with additional metadata, such as by adding string attributes to shape nodes in Maya before writing the data to Alembic.

In Katana the convention is for arbitrary geometry data to be read in as attributes called geometry.arbitrary.xxx, which are then by default also written out as user or primvar data to renderers. This means that if you are using primvars or user data to specify textures you can have this work automatically.

Metadata Read in from Another Source

If texture assignment is specified by other sources in the pipeline, such as by having separate XML files associated with assets that give the texture paths to be used on any named piece of geometry, that metadata can be added to objects using AttributeModifiers.

Katana come with an example Attribute Modifier called AttributeFile that reads data from a simple XML format to create new attributes at locations in the scene graph. One of the example projects: 201-Texturing (single example), makes use of this Attribute Modifier together with an additional OpScript to take the attribute values read in and do some additional processing to turn them in to the final texture file paths.

Processes to Procedurally Resolve Textures

You could also use a resolver to procedurally set the values of textures.xxx to appropriate file paths, allowing the actual creation of these file paths as one of the last automatic processes in the pipeline.

The example project; 205-Using an Asset’s Meta Data illustrates how metadata that comes in with a ScenegraphXML asset can be further processed by an OpScript to turn it into final texture paths. By setting these in attributes called textures.ColMap, textures.SpecMap and textures.BumpMap these are exported to renderers as “MatTag” attributes.