Data Format Description
Notation:
* - optional
... - one or more
...* - zero or more
ScenegraphXML
Root
<scenegraphXml name="building"* version="0.1.0"*> <channelData startFrame="1" endFrame="10" ref="/tmp/myChannelData" */>* <instanceList/> </xmlScene>
InstanceList
<instanceList> <instance/>*... </instanceList>
Instances
base types: group, reference
<instance type="group" name="blah"> <instanceList/>* <bounds/>* <xform/>* <proxyList/>* <lookFile/>* <modifiers/>* <arbitraryList/>* <lodData tag="hi" weight="0.75"/>* </instance> <instance type="group" groupType="lodGroup" name="blah"> <instanceList/> <bounds/>* <xform/>* <proxyList/>* <lookFile/>* <modifiers/>* <arbitraryList/>* <lodData tag="hi" weight="0.75"/>* </instance> <instance type="reference" name="blah" refFile="subScene.xml"> <bounds/>* <xform/>* <proxyList/>* <lookFile/>* <modifiers/>* <arbitraryList/>* <lodData tag="hi" weight="0.75"/>* </instance> <instance type="reference" name="blah" refType="abc" refFile="myGeometry. abc"> <bounds/>* <xform/>* <proxyList/>* <lookFile/>* <modifiers/>* <arbitraryList/>* <lodData tag="hi" weight="0.75"/>* </instance>
Note: If no refType is explicitly specified in for a reference instance, it's assumed that the reference is to another XML file containing ScenegraphXML data.
Xform
<xform value="1 0 0 0 0 1 0 0 0 0 1 0 10 20 30 1"/>
or
<xform channelIndex="6"/>
Bounding Boxes
<bounds minx="-10" maxx="10" miny="-10" maxy="10"
minz="-10" maxz="10"/>
or
<bounds channelIndex="6"/>
ProxyList
<proxyList> <proxy name="viewer" ref="/tmp/proxyFile.abc"/>... </proxyList>
ArbitraryList (metadata)
<arbitraryList> <attribute name="myAttr" type="float" value="10.0"/>... <attribute name="myAttr" type="float" channelIndex="6"/>... <attribute name="myAttr" type="floatlist" value="1.0 2.0 3.0 4.0"/>... <attribute name="myAttr" type="floatlist" numValues="6" channelIndex="10"/>... <attribute name="myAttr" type="string" value="Pony"/>... </arbitraryList>
attribute types: float, floatlist, string
Look File
<lookFile ref="myLookFile.klf"/>
Note: LookFile assignment through ScenegraphXML files currently only works for files imported using the Importomatic. LookFiles can only be associated with locations that are references to other SgXML files or explicitly set the groupType to 'assembly'.
Modifiers
<modifiers> <attributeFile/>...* </modifiers>
Attribute File
Default XML parser: <attributeFile ref="myAttributeFile.xml"/>
Custom XML parser: <attributeFile ref="myAttributeFile.xml" customParser="myParser.so"/>
The metadata is stored under the group name attributeFile by default. It is possible to override this by using the parameter groupName. For instance: <attributeFile ref="myAttributeFile.xml" groupName="myGroupName"/>
Channel Data Files
A simple format to represent animation of float values in using .xml files with multiple channels held in each file, and a single .xml file per frame.
<channels> <c v="0.1"/>... </channels>