Defining the Hierarchical Structure of a Scene

Overview

This page describes elements used to define a scene consisting of multiple models. Before reading this section, you should read and understand Defining Model Shapes and Vertex Attribute Data and Defining Skinning.

Convolution of Skinning Models

In a typical scene graph, scenes are expressed using a model array and node tree, but in this intermediate format, scenes are expressed as a single skinning model. The node tree of a scene is expressed as a skeleton (rig). Skinning models include multiple shapes and skinning can be enabled or disabled for each shape. Models for which skinning is disabled on the DCC tool are included in skinning models as shapes for which skinning is disabled.

XML Hierarchical Structure

The <SkeletalModel> element, which specifies a skinning model, only appears once in the <Models> element. All models making up a scene are defined as <SeparateDataShapeCtr> elements that are contained in a single <SkeletalModel> element.

<NintendoWareIntermediateFile>
<GraphicsContentCtr>
<Models>
<SkeletalModel>
<Shapes> ... defines the model array
<SeparateDataShapeCtr> ... supports individual models
<SeparateDataShapeCtr>
<SeparateDataShapeCtr>
: <Skeleton> ... defines the node tree
<Bones>
<Bone> ... supports individual nodes
<Bone>
<Bone>
:

Future Changes

This specification is temporary until the hierarchical structure is supported by the intermediate format.

Associations Between Models and Nodes

Models for which skinning is disabled are defined as shapes that have 100% weight versus a single bone. This bone corresponds to the node that referenced the model in the DCC tool. Although shapes can reference bones, skinning is disabled.

(In practice, skinning is enabled and disabled using the <PrimitiveSetCtr> primitive, which is a child of the shape element, <SeparateDataShapeCtr>. ) Only one index pointing to this bone is registered in the matrix palette. The BoneIndex and BoneWeight attributes included in vertex attribute data are omitted.

XML Hierarchical Structure

<NintendoWareIntermediateFile>
<GraphicsContentCtr>
<Models>
<SkeletalModel>
<Shapes>
<SeparateDataShapeCtr>
<PrimitiveSets>
<PrimitiveSetCtr SkinningMode="None"> ... skinning is disabled
<BoneIndexTable>0</BoneIndexTable> ... a single bone index is defined

Breaking down Models

In this intermediate format, there are no XML elements corresponding to the "model" unit in the DCC tool. Models are broken down into <SeparateDataShapeCtr> shapes and then output. If a model consists of multiple materials, a shape is defined for each material.

Because shapes used to make up the original model reference the same bone, the model will appear to move if that bone moves. Note, however, that the "model" unit is no longer present in the data structure.