User guide
10 Structured Scene Graph Data
While Katana can handle quite arbitrarily structured scene graph data, there are a number of things worth
considering, from the point of view of presenting good data to the renderer, as well as enabling users to work with
the scene graph data in the user interface.
Bounding Boxes and Good Data
When working with renderers that allow recursive deferred loading the standard way that Katana works is to expand
the scene graph until it reaches locations that have bounding boxes defined, then declare a new procedural call-back
to be evaluated if the renderer asks for the data inside that box.
To make use of deferred loading these bounding boxes should be declared with assets, and nested bounding boxes
should be structured so that only what is needed has to be evaluated. For instance if you have a city scape where
only the tops of most of the buildings will be seen by the renderer it is inefficient to have just a single bounding box
for the whole of each building as a lot more geometry than is going to be needed will get declared to the renderer
whenever the top of a building is seen.
There is an optional attribute called 'forceExpand' that can be placed at any location to force expansion of the
hierarchy under that location rather than stopping when a bounding box is reached. This can be useful when you
know that the the whole of the contents of a bounding box are going to be needed if any part of it is requested.
There are also times when it is more efficient to simply declare the whole scene graph to a renderer than use
deferred evaluation, such as if you are calculating a global illumination for a scene that you know can fit into
memory. In particular, some renderers can better optimize their spatial acceleration structures if they have all of the
geometry data in advance rather than using deferred loading.
Proxies and Good Data
Since users will be 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 will be displayed in the Viewer but
not sent to a renderer. Proxies for the Viewer are simply declared by placing the name of the file to use for the
proxy into a string attribute called proxies.viewer at any location.