Proxies and Good Data for Users

Since users are working with scene graph data in Katana it's also good to consider things that may help them navigate and make sense of the scene.

The bounding boxes used by the renderer can also help provide a simplified representation in the Viewer of the contents of a branch of the hierarchy when the user opens the scene graph to a given location.

To give an even better visualization you can register proxies at any location, which are displayed in the Viewer but not sent to a renderer.

Ops can be used to define viewer proxies on scene graph locations. Two main attribute conventions are currently supported:

ViewerProxyLoader (legacy mode) - An Alembic cache can be loaded through the default ViewerProxyLoader, setting the proxies.viewer string attribute on the target location to the path to the relevant .abc file. You can also customize Katana to read proxies from custom data formats by creating a Scene Graph Generator to read the relevant file format and using a plug-in for the Viewer that simply declares which Scene Graph Generator to use for a given file extension.

Op-based - Ops can be chained to create the geometry to be used as a proxy by adding group child attributes to the proxies.viewer group attribute on the target location. Each child group attribute represents an Op and its content must contain:

a string attribute named opType defining the type of the Op to be used.

a group attribute named opArgs containing attributes defining the Op arguments.

This proxy Op chain is always evaluated in isolation, starting at the /root location of an empty scene graph.

Here's an example of the attributes hierarchy using two Ops to generate the proxy geometry:

Location /root/world/geo/group Attributes: ... proxies viewer proxyOp_1 opType 'AlembicIn' (StringAttribute) opArgs fileName '/tmp/myProxy.abc' (StringAttribute) proxyOp_2 opType 'Messer' (StringAttribute) opArgs displacement 0.23 (DoubleAttribute) ...

Proxy caches are considered animated by default. If the proxy file has animation, that is used by default, but you can also explicitly control what frame from a proxy is read using these additional attributes: proxies.currentFrame, proxies.firstFrame, and proxies.lastFrame. Static proxy caches can be defined by setting the proxies.static IntAttribute to 1.

To help users navigate the scene graph, group locations can be indicated as being assemblies or components. These terms originate from Sony Pictures Imageworks where they are used to indicate whether an asset is a building block component or an assembly of other assets. In Katana's user interface they are simply used as indicators for locations that are good for the user to open the scene graph up to. In the Scene Graph tab there are options to open to the next assembly, component, or level-of-detail level, and double-clicking on a location automatically opens the scene graph to the next of these levels.

You can also right-click on a location and select Expand To and Select Proxy Children to reveal scene graph locations that provide proxy data.

For the user it's useful if proxies or bounding boxes are at groups indicated as being assemblies or components, so the user can open the scene graph to those levels and see a sensible representation of the assets in the Viewer.

To turn a group location into an assembly or component the type attribute at that location simply needs to be set to assembly or component. If you are using ScenegraphXML, there is support for indicating locations as being assemblies or components within the ScenegraphXML file.

In general it also helps users if the hierarchy isn't too 'flat', with groups containing a very large number of children. Structure can help users navigate the scene graph.