1<html> 2<head> 3<title>Defining the Hierarchical Structure of a Scene</title> 4<link rel="stylesheet" href="../css/mainpage.css" type="text/css"> 5<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6</head> 7 8<body> 9 10<h1>Defining the Hierarchical Structure of a Scene</h1> 11 12<h2>Overview</h2> 13<p> 14This page describes elements used to define a scene consisting of multiple models. This description assumes an understanding of <a ref="page_overview_shape.html">Defining Model Shapes and Vertex Attribute Data</a> and <a ref="page_overview_skinning.html">Defining Skinning</a>. 15</p> 16 17<h2>Convolution of Skinning Models</h2> 18<p> 19In 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. 20</p> 21 22<h3>XML Hierarchical Structure</h3> 23<p> 24The <SkeletalModel> element used to indicate skinning models only appears once in the <Models> element. All models making up a scene are defined as <SeparateDataShapeCtr> shapes in this one <SkeletalModel> element. 25</p> 26 27<table> 28<tr><td> 29<pre> 30<NintendoWareIntermediateFile><br> 31 <GraphicsContentCtr><br> 32 <Models><br> 33 <SkeletalModel><br> 34 <Shapes> .... Defines the model array<br> 35 <SeparateDataShapeCtr> .... For each separate model<br> 36 <SeparateDataShapeCtr><br> 37 <SeparateDataShapeCtr><br> 38 : 39 <Skeleton> .... Defines the node tree<br> 40 <Bones><br> 41 <Bone> .... For each separate node<br> 42 <Bone><br> 43 <Bone><br> 44 : 45</pre> 46</td></tr> 47</table> 48 49<h3>Future Changes</h3> 50<p> 51This specification is temporary until the hierarchical structure is supported by the intermediate format. 52</p> 53 54<h2>Associations Between Models and Nodes</h2> 55<p> 56Models for which skinning is disabled are defined as shapes that have 100% weight versus a single bone. This bone corresponds to the node that was referencing the model under the DCC tool. Although shapes can reference bones, skinning is disabled. 57</p> 58<p> 59(Actually, enabling/disabling of skinning is set using the <PrimitiveSetCtr> primitive positioned as a child of the <SeparateDataShapeCtr> shape. ) 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. 60</p> 61 62<h3>XML Hierarchical Structure</h3> 63 64<table> 65<tr><td> 66<pre> 67<NintendoWareIntermediateFile><br> 68 <GraphicsContentCtr><br> 69 <Models><br> 70 <SkeletalModel><br> 71 <Shapes><br> 72 <SeparateDataShapeCtr><br> 73 <PrimitiveSets><br> 74 <PrimitiveSetCtr SkinningMode="None"> .... Skinning is disabled<br> 75 <BoneIndexTable>0</BoneIndexTable> .... Only one bone index is defined<br> 76 77</pre> 78</td></tr> 79</table> 80 81<h2>Dimantling of Models</h2> 82<p> 83In this intermediate format, there are no XML elements corresponding to the unit called a model under a DCC tool. Models are dismantled into <SeparateDataShapeCtr> shapes and then output. If a model consists of multiple materials, a shape is defined for each material. 84</p> 85<p> 86Because 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 unit called a model is no longer present in the data structure. 87</p> 88