Table of Contents
Introduction
I3D is an eXtensible Markup Language (XML) file format.
A vaild I3D file has up to seven parts: Textures, Materials, Shapes, Dynamics, Scene graph, Animation and Userdata. Dependent on application each part can be omitted.
The XML Schema language is used to describe the I3D feature set. Download: I3D 1.6 Schema
Features
- Scenegraph hierarchy with
- TransformGroups/Bones: translation, rotation, scale and visibility
- Lights: ambient, point, directional and spot lights
- Cameras: field of view, near and far clipping plane
- Shapes: meshes and nurbs curves (supports geometry instancing)
- Particle Systems
- Animation
- Animation sets
- Clips
- Keyframes: translation, rotation, scale and visibility
- Morph Targets
- User Attributes
- Dynamics
- Particle Systems (Sprite based)
- Surface Emitter
- Gravity Fields
- Air Fields
- Particle Systems (Sprite based)
- Meshes
- Vertices
- Normals
- Vertex colors
- Skin weights
- Texture coordinates (including multiple uv sets)
- Faces (vertex color, normals and texture coordinates per face)
- Curves
- Nurbscurves
- Shader/Materials
- Multitextures (arbitrary layered textures)
- Lightmaps
- Bumpmaps/Normalmaps
- Environmentmaps
- Specularmaps
Overview
Specification
General Layout
<?xml version="1.0" encoding="iso-8859-1"?>
<i3D name="MyScene" version="1.6" xsi:noNamespaceSchemaLocation="http://i3d.giants.ch/schema/i3d-1.6.xsd">
<Files>..</Files>
<Materials>..</Materials>
<Shapes>..</Shapes>
<Dynamics>..</Dynamics>
<Scene>..</Scene>
<Animation>..</Animation>
<UserAttributes>..</UserAttributes>
</i3D>
<i3D name="MyScene" version="1.6" xsi:noNamespaceSchemaLocation="http://i3d.giants.ch/schema/i3d-1.6.xsd">
<Files>..</Files>
<Materials>..</Materials>
<Shapes>..</Shapes>
<Dynamics>..</Dynamics>
<Scene>..</Scene>
<Animation>..</Animation>
<UserAttributes>..</UserAttributes>
</i3D>
Coordinate Systems
I3D uses a right-handed coordinate system.Files
All used file references are defined here. File handles are mapped to the corresponding filenames.
<Files>
<File fileId="1" filename="myTexture1.png" relativePath="true"/>
...
</Files>
<File fileId="1" filename="myTexture1.png" relativePath="true"/>
...
</Files>
Materials
Materials used in the materials attribute of Shape nodes within the scenegraph section are defined in this section.
<Materials>
<Material name="myShader_001" materialId="12">
<Texture fileId="1"/>
</Material>
...
</Materials>
<Material name="myShader_001" materialId="12">
<Texture fileId="1"/>
</Material>
...
</Materials>
Shapes
Shapes are defined here and referenced from the scene graph section. This mechanism allows multiple instancing of shapes.
Dynamics
Dynamic objects are defined in this part and referenced from the Scene graph section.
<Dynamics>
<ParticleSystem name="emitter1" dynamicId="1" type="sprite" rate="0.004" lifespanInfinite="false"
speed="0.01" speedRandom="0" tangentSpeed="0" normalSpeed="1" lifespan="10000" maxCount="1000"
spriteScaleX="50" spriteScaleY="50" depthSort="false" emitterShape="pCubeShape1" shader="lambert2">
<Gravity force="0 -3 0"/>
<Air velocity="2 0 0"/>
</ParticleSystem>
</Dynamics>
<ParticleSystem name="emitter1" dynamicId="1" type="sprite" rate="0.004" lifespanInfinite="false"
speed="0.01" speedRandom="0" tangentSpeed="0" normalSpeed="1" lifespan="10000" maxCount="1000"
spriteScaleX="50" spriteScaleY="50" depthSort="false" emitterShape="pCubeShape1" shader="lambert2">
<Gravity force="0 -3 0"/>
<Air velocity="2 0 0"/>
</ParticleSystem>
</Dynamics>
Scenegraph
The Scene graph hierarchy (transformations, bones, joints, shapes, lights, cameras and particle systems) are stored in this section. Shapes, materials and particle systems are stored as references.
<Scene>
<TransformGroup name="myGroup1" translation="1.25 0 -9" nodeId="47">
<Shape name="mySphere" materialIds="1" shapeId="1" nodeId="48"/>
<TransformGroup name="myGroup2" rotation="90 0 270" nodeId="49">
<Shape name="mySphere2" materialIds="1" shapeId="2" nodeId="50"/>
</TransformGroup>
...
</TransformGroup>
...
</Scene>
<TransformGroup name="myGroup1" translation="1.25 0 -9" nodeId="47">
<Shape name="mySphere" materialIds="1" shapeId="1" nodeId="48"/>
<TransformGroup name="myGroup2" rotation="90 0 270" nodeId="49">
<Shape name="mySphere2" materialIds="1" shapeId="2" nodeId="50"/>
</TransformGroup>
...
</TransformGroup>
...
</Scene>
Scene graph node types
TransformGroup
Attribute | Description | Type | Optional |
---|---|---|---|
name | Name of TransformGroup | string | no |
translation | Translation | complex | yes |
rotation | Rotation, euler order ZY'X'' | complex | yes |
scale | Scale | complex | yes |
visibility | Visibility | boolean | yes |
kinematic | Kinematic object | boolean | yes |
dynamic | Dynamic object | boolean | yes |
static | Static object | boolean | yes |
compound | Compound parent | boolean | yes |
compoundChild | Compound child | boolean | yes |
collision | Enable collision | boolean | yes |
ccd | Continuous collision detection | boolean | yes |
trigger | Trigger | boolean | yes |
cloth | Cloth | boolean | yes |
restitution | Restitution | float | yes |
staticFriction | Static friction | float | yes |
dynamicFriction | Dynamic friction | float | yes |
skinWidth | Skin width | float | yes |
density | Density | float | yes |
collisionMask | Collision mask | integer | yes |
joint | Joint | boolean | yes |
breakableJoint | Breakable joint | boolean | yes |
jointBreakForce | Joint break force | double | yes |
jointBreakTorque | Joint break torque | double | yes |
projection | Enable joint projection | boolean | yes |
xAxisDrive | Enable x axis drive | boolean | yes |
yAxisDrive | Enable y axis drive | boolean | yes |
zAxisDrive | Enable z axis drive | boolean | yes |
drivePos | Enable drive position | boolean | yes |
projDistance | Projection distance | double | yes |
driveForceLimit | Drive force limit | double | yes |
driveSpring | Drive spring | double | yes |
driveSpring | Drive spring | double | yes |
solverIterationCount | Solver iteration count | integer | yes |
rotMinX | Rotation minimum x | double | yes |
rotMinY | Rotation minimum y | double | yes |
rotMinZ | Rotation minimum z | double | yes |
rotMaxX | Rotation maximum x | double | yes |
rotMaxY | Rotation maximum y | double | yes |
rotMaxZ | Rotation maximum z | double | yes |
transMinX | Translation minimum x | double | yes |
transMinY | Translation minimum y | double | yes |
transMinZ | Translation minimum z | double | yes |
transMaxX | Translation maximum x | double | yes |
transMaxY | Translation maximum y | double | yes |
transMaxZ | Translation maximum z | double | yes |
objectMask | Object mask | integer | yes |
nodeId | Node reference id, used for Animation and UserAttributes section | integer | no |
Element | Description | Type | Cardinality |
---|---|---|---|
TransformGroup | Transform group node | complex | 0..N |
Shape | Shape node | complex | 0..N |
Camera | Camera node | complex | 0..N |
Light | Light node | complex | 0..N |
Dynamic | Dynamic node (eg. particle system) | complex | 0..N |
Shape
Attribute | Description | Type | Optional |
---|---|---|---|
shapeId | Shape reference id (reference to shapes section) | string | no |
materialIds | List of used material ids (reference to materials section) | string | no |
skinBindNodeIds | Skin bind node ids | string | yes |
castsShadows | Casts shadows | boolean | yes |
receiveShadows | Receive shadows | boolean | yes |
clipDistance | Clip distance | double | yes |
nonRenderable | Non renderable | boolean | yes |
Camera
Attribute | Description | Type | Optional |
---|---|---|---|
fov | Field of view | double | no |
nearClip | Near clipping plane | double | no |
farClip | Far clipping plane | double | no |
Light
Attribute | Description | Type | Optional |
---|---|---|---|
type | Light type | string | no |
diffuseColor | Diffuse color | complex | yes |
emitDiffuse | Emit diffuse | string | yes |
specularColor | Specular color | complex | yes |
emitSpecular | Emit specular | string | yes |
castShadowMap | Cast shadow Map | boolean | yes |
depthMapBias | Depth map bias | double | yes |
depthMapResolution | Depth map resolution | integer | yes |
shadowFarDistance | Shadow far fistance | double | yes |
shadowTextureOffset | Shadow texture offset | double | yes |
shadowExtrusionDistance | Shadow extrusion distance | double | yes |
decayRate | Decay rate | integer | yes |
coneAngle | coneAngle | double | yes |
dropOff | dropOff | integer | yes |
projTexture | Projective texture name | string | yes |
range | Range | double | no |
5 Dynamic
Attribute | Description | Type | Optional |
---|---|---|---|
dynamicId | Dynamic id (reference to dynamics section) | string | no |
Example
<Scene>
<Camera name="camera1" translation="0 2.00 6.47" rotation="-13.07 0 0" fov="54.43" nearClip="0.01" farClip="1000" nodeId="34"/>
<Light name="pointLight1" translation="6.56 5.76 4.04" type="point" diffuseColor="1 1 1" range="10" nodeId="35"/>
<TransformGroup name="group1" translation="1.35 0.96 0.81" nodeId="36">
<Shape name="pCubeShape1" rotation="-23.94 6.49 14.29" materialIds="1 2" shapeId="1" nodeId="37"/>
</TransformGroup>
</Scene>
<Camera name="camera1" translation="0 2.00 6.47" rotation="-13.07 0 0" fov="54.43" nearClip="0.01" farClip="1000" nodeId="34"/>
<Light name="pointLight1" translation="6.56 5.76 4.04" type="point" diffuseColor="1 1 1" range="10" nodeId="35"/>
<TransformGroup name="group1" translation="1.35 0.96 0.81" nodeId="36">
<Shape name="pCubeShape1" rotation="-23.94 6.49 14.29" materialIds="1 2" shapeId="1" nodeId="37"/>
</TransformGroup>
</Scene>
Animation
Motions are defined in this part. Clips are the basic building block and allow Non-Linear Animation by composing multiple clips.
<Animation>
<AnimationSets>
<AnimationSet name="walk_crouched">
<Clip name="walk_crouched1Source" duration="1000">
<Keyframes nodeId="Hips">
<Keyframe time="0" translation="-0.467 13.504 39.842"/>
<Keyframe time="333" translation="-0.559 12.915 39.370"/>
<Keyframe time="1000" translation="-2.610 11.917 35.462"/>
</Keyframes>
<Keyframes node="Chest">
<Keyframe time="0" rotation="-1.013 -4.465 0.890"/>
<Keyframe time="666" rotation="10.009 -6.667 4.381"/>
<Keyframe time="1000" rotation="11.638 -3.906 4.115"/>
</Keyframes>
</Clip>
</AnimationSet>
</AnimationSets>
</Animation>
<AnimationSets>
<AnimationSet name="walk_crouched">
<Clip name="walk_crouched1Source" duration="1000">
<Keyframes nodeId="Hips">
<Keyframe time="0" translation="-0.467 13.504 39.842"/>
<Keyframe time="333" translation="-0.559 12.915 39.370"/>
<Keyframe time="1000" translation="-2.610 11.917 35.462"/>
</Keyframes>
<Keyframes node="Chest">
<Keyframe time="0" rotation="-1.013 -4.465 0.890"/>
<Keyframe time="666" rotation="10.009 -6.667 4.381"/>
<Keyframe time="1000" rotation="11.638 -3.906 4.115"/>
</Keyframes>
</Clip>
</AnimationSet>
</AnimationSets>
</Animation>