Title: The COLLADA Show
1(No Transcript)
2COLLADA is 1 year old
- It has been one year since COLLADA wasannounced
at SIGGRAPH 2004! - Since then we have
- Started four new working groups to tackle
specialist problems - Held two face-to-face meetings
- Grown in number of contributing members
3What is COLLADA?
- COLLADA is not a delivery format.
- COLLADA is an interchange format for 3D assets.
- COLLADA retains all information, even multiple
versions of the same asset. - COLLADA is not a lossy file format.
- guarantees careful delivery between DCC tools of
exactly the information you originally encoded. - COLLADA is not a scene graph.
- COLLADA can encode scene graphs, along with many
other objects.
4What is COLLADA?
- COLLADA is not a proprietary format.
- COLLADA is a fully documented, open standard
built using standard tools UTF8, XML, URLs,
Base64, XML Schema, etc. - COLLADA is not a closed project.
- COLLADA is an open source project designed
through community involvement. - COLLADA seeks to liberate your 3D assets.
- An open, archive-grade format that retains meta
information. - When your DCC tool upgrades, you keep your assets.
5COLLADA is the glue that binds
- Most of all, COLLADA is designed to be an
interchange format between applications. - It is the glue that binds together your DCC and
3D processing tools into a production pipeline. - It allows applications to talk with each other
using the same language. - It opens up new opportunities for developers and
tool makers to build on each other's strengths
without reinventing the wheel.
6Structure of a COLLADA document
- Every COLLADA document is expressed in XML, with
lt?xml version"1.0" encoding"UTF-8"?gt ltCOLLADAgt
ltassetgt ... lt/assetgt ltlibrary
type"GEOMETRY"gt ... lt/librarygt
ltscene id"DefaultScene"gt ltnode id"node"
name"My Teapot"gt ltinstance url"teapot"
/gt lttranslategt0 0 0lt/translategt
ltrotategt0 0 1 0lt/rotategt ltscalegt1 1
1lt/scalegt lt/nodegt lt/scenegt lt/COLLADAgt
a header,
a set of libraries
and a set of scenes.
7COLLADA Documents
- We call them "documents" not "files"
- XML can be more than just files on a file system.
- XML may be the formatted result of a SQL database
query. - XML may come from an HTTP request sent to a
remote server. - XML might be a temporary output fragment from a
DCC tool. - XML could be a small subset of a large Source
Control system, selected by "assets most recently
altered by DaveM". - By using XML to represent structured data, we
allow 3D tools to use the full arsenal of modern
database tools.
8Libraries
- Libraries hold and organize many types of object.
- COLLADA is extended by adding new types of
library.
9Assets
- Every COLLADA document, and all objects inside,
can be marked as assets and managed using
meta-information.
lt?xml version"1.0" encoding"UTF-8"?gt ltCOLLADAgt
ltlibrary type"GEOMETRY"gt ltmesh
id"MyTeapot"gt ltassetgt ltauthorgtMark
Barneslt/authorgt ltrevisiongt1.04lt/revisiongt
ltauthoring_toolgtMaya Collada exporter
v0.7.4lt/authoring_toolgt
ltmodifiedgt2004-12-20T221018Zlt/modifiedgt
ltup_axisgtY_UPlt/up_axisgt lt/assetgt ...
lt/meshgt lt/librarygt lt/COLLADAgt
10Models and Geometry
- Geometry can contain multiple streams of data at
each vertex, indexed from raw arrays of values.
ltvertices id"revolve-Vtx"gt ltinput
semantic"POSITION" source"revolve-Pos"/gt lt/vert
icesgt ltpolygons count"720" material"Default"gt
ltinput semantic"VERTEX" source"revolve-Vtx"
idx"0"/gt ltinput semantic"NORMAL"
source"revolve-0-Normal" idx"1"/gt ltinput
semantic"TEXCOORD" source"revolve-0-TexCoord0"
idx"2"/gt ltinput semantic"TEXCOORD"
source"revolve-0-TexCoord1" idx"3"/gt ltinput
semantic"TEXCOORD" source"revolve-0-TexCoord2"
idx"4"/gt ltinput semantic"TANGENT"
source"revolve-0-Tangent" idx"5"/gt ltpgt0 0 0
0 0 0 31 1 1 1 1 1 32 2 2 2 2 2 1 3 3 3 3 3lt/pgt
ltpgt1 4 4 4 4 4 32 5 5 5 5 5 33 6 6 6 6 6 2 7 7 7
7 7lt/pgt ltpgt2 8 8 8 8 8 33 9 9 9 9 9 34 10 10 10
10 10 3 11 11 11 11 11lt/pgt ltpgt3 12 12 12 12 12
34 13 13 13 13 13 35 14 14 14 14 14 4 15 15 15 15
15lt/pgt ... lt/polygonsgt
11Scene Descriptions
- Each COLLADA ltscenegt describes a hierarchy or
scene graph of objects in the same space.
ltscene id"DefaultScene"gt ltnode id"Camera"gt
ltinstance url"camera"/gt ltlookatgt ...
lt/lookatgt lt/nodegt ltnode id"Light"
name"Light"gt ltinstance url"Lt-Light"/gt
lttranslategt-5.0 10.0 4.0lt/translategt
ltrotategt0 0 1 0lt/rotategt ltnode id"Teapot"
name"Teapot"gt ltinstance
url"teapot-lod-02"/gt ltrotategt0 0 1
0lt/rotategt lt/nodegt lt/nodegt lt/scenegt
12Animations and Skinning
- New in COLLADA 1.3, Animations and Skinning
- Published after Siggraph 2004.
- Animations can be controlled by curves or
keyframes. - Each ltanimationgt contains one or more ltsourcegt
arrays of values. - ltsamplergt objects take these ltsourcegt arrays and
either indexes or interpolates them into output
variables. - Finally, ltchannelgt binds these outputs to values
in the scene,e.g. "elbow/rotation.ANGLE" - COLLADA supports skinned animations.
- One skeleton can animate many meshes.
- Meshes are bound to a default pose by an
arbitrary array of weights and an array of
inverse bind matrices.
13COLLADA in Lightwave
14COLLADA in Blender
15COLLADA in Unreal Engine
16Whats new in COLLADA 1.4?
COLLADA Physics
COLLADA FX
Conformance and Standardization
Reconfigurable Production Pipelines
17What are Shader Effects?
- Shaders are programs that run on a GPU and
produce graphical effects. - Shader Effects additionally describe the
environment that a shader is designed to run
within - Set render states (culling, blending, depth
tests, etc.) - Which shader to use in which pipeline stage
- Which parameters are automatically set
- Which parameters are tweakable by users
- How many passes are required to finish the effect
- Which textures are used during which pass
- etc.
18The Shader Effects Problem
- Each platform has its own proprietary file format
used to express multi-pass shader effects - If you are designing a multi-platform game, you
have a real management problem.
19COLLADA FX
- COLLADA FX is designed to
- Allow interchange of complex, multi-pass shader
effects. - Encapsulate multiple descriptions of an effect.
- E.g. levels of detail, daytime/nighttime
versions, etc. - Encode shaders for multiple platforms in one
file. - e.g. CG,HLSL and GLSL versions of your effect in
one document. - Supports both fixed-function and
programmable-pipeline effects in the same format.
20COLLADA FX
- Additional features
- COLLADA FX can be coded as stand-alone COLLADA
documents. - Each document can contain all the elements of an
effect inline. - COLLADA FX supports advanced shader language
techniques. - Use Interface objects and declare Unsized Arrays.
- Multiple Render Targets and off-screen buffers.
- Share simple parameters across all platforms
- Control multiple platforms or techniques with a
single parameter. - Share source code between multiple techniques.
- All elements can be annotated with
meta-information
21How COLLADA FX works
- COLLADA FX does not attempt to create a single
set of render states or an intermediate shader
language. - Platform specific elements allow access to the
full set of data types and render states for that
platform. - COLLADA FX assumes the use of a Runtime API that
holds state. - COLLADA FX does not require that a runtime
supports scripting.
lteffect id"MossyRockEffect"gt lttechnique
sid"HLSL_medium_LOD"gt ltprofile_HLSLgt
... lt/profile_HLSLgt lt/techniquegt
lttechnique sid"CG_with_lighting"gt
ltprofile_CGgt ... lt/profile_CGgt
lt/techniquegt lt/effectgt
22Techniques and Passes
- COLLADA FX files are structured into techniques
and passes.
lteffect id"Level3-spaceship-damaged "gt
lttechnique sid"high-LOD-shadows"gt
ltprofile_HLSLgt ltcodegt ... lt/codegt
ltpass id"shadow-pass"gt ...
lt/passgt ltpass id"specular-reflection"gt
... lt/passgt lt/profile_HLSLgt
lt/techniquegt lt/effectgt
23Passes
- Each pass sets render states and declares as many
programmable pipeline stages as your platform
supports. - Uniform shader inputs can be bound to variables
or literal values. - Profiles without programmable shaders can only
set render states. - Render states can be set by literal values or by
reading a parameter.
ltpass sid"pass0"gt ltshader stage"VERTEXSHADER"
gt ltcompilertargetgtvs_2_xlt/compilertargetgt
ltentrygtvertex_functionlt/entrygt ltbind
symbol"damage"gt ltparam ref"damage_amount"/
gt lt/bindgt lt/shadergt ltdepthtestenablegt
TRUE lt/depthtestenablegt ltdepthfuncgt LEQUAL
lt/depthfuncgt ltcullfacegt BACK lt/cullfacegt
ltshader stage"PIXELSHADER"gt
ltcompilertargetgtps_2_xlt/compilertargetgt
ltentrygtpixel_functionlt/entrygt
lt/shadergt lt/passgt
24Parameters
- Parameters declared within source code can be
given values using ltsetparamgt - Parameters can have multiple annotations. COLLADA
FX does not interpret these annotations in any
way. - Parameters can be created from data types defined
in source code using ltnewparamgt
ltlibrary type"EFFECT"gt lteffect
id"ThinFilm2"gt lttechniquegt
ltprofile_HLSLgt ltinclude url"thinfilm_code"/
gt ltsetparam ref"LightPosP1"gt
ltannotate name"UIName"gt ltstringgtLight
Pos 1lt/stringgt lt/annotategt ltannotate
name"Object"gt ltstringgtPointLightlt/string
gt lt/annotategt ltannotate
name"Space"gt ltstringgtWorldlt/stringgt
lt/annotategt ltfloat4gt 10.0 10.0 10.0 1.0
lt/float4gt lt/setparamgt ...
25Render to Texture
- COLLADA FX supports Multiple Render Targets using
indexed output ltsurfacegt objects that can persist
between passes.
ltpass sid"pass0"gt ltcolortarget index"0"gt
color_surface lt/colortargetgt ltcolortarget
index"1"gt normal_surface lt/colortargetgt
ltdepthstenciltargetgt depth_surface
lt/depthstenciltargetgt ltclearcolor index"0"gt
0 0 0 lt/clearcolorgt ltclearcolor index"1"gt 0 0
0 lt/clearcolorgt ltcleardepthgt 1.0
lt/cleardepthgt ltclearstencilgt 0
lt/clearstencilgt ltdrawgtSCENElt/drawgt
... lt/passgt
26Advanced Shaders
- Cg style variable-length arrays and interface
objects are supported by COLLADA FX. - Structures and Interfaces are instanced as
parameters of type ltusertypegt - Structures can be initialized by leaf-node order
or by element name. - Array types can be given a size at creation time
or by setting the array length using ltsetparamgt. - After creation and setting up, these dynamically
created parameters can be bound to uniform
inputs, as usual, using ltbindgt.
27The COLLADA FX Schema
- The schema is designed to be flexible and
expressive with clear ways to declare and
implement effects. - There are clear, one-to-one mappings between a
validating XML document and a sequence of calls
in a each shader runtime.
28DEMONSTRATION
- Demonstrating the robust bi-directional
interchange between DCC packages and FX tools
that is possible using COLLADA FX - NVidia FXComposer 2.0 exchanging models and
shader effects with SOFTIMAGEXSI v.5.0 via a
single COLLADA document. - Viewing and validating resulting .DAE file using
the SoftimageXSI Viewer and COLLADA importer
29DEMONSTRATION
- SoftimageXSI Viewer with full SDK is now freely
available, and includes COLLADA support. - http//www.softimage.com/products/pipeline/ftk/v3
63/ - Complete support in XSI for the COLLADA 1.4
Schema and CgFX 1.4 - Khronos Group participation to help drive
evolution of the standard
30DEMONSTRATION
- 3Dlabs' priority is to ensure that the OpenGL
Shading Language (GLSL) is fully supported in
COLLADA FX. - GOAL Evolve COLLADA FX for proposal to the
OpenGL ARB as the standard OpenGL Shader Effects
metafile format.
31DEMONSTRATION
- In collaboration with with VRLab, 3Dlabs are
developing a COLLADA plugin to OpenSceneGraph
(OSG) - Open source, hosted on Sourceforge under the BSD
license - Your collaboration invited! For more info visit
- http//developer.3Dlabs.com/
- http//openscenegraph.org/
- http//sourceforge.net/projects/osgdb-collada/
32Physical Simulation File Formats
- Until now, no standard format existed for
physical properties and physically simulated
animation. - Every API has their own file format.
- Every API has to provide their own export plugin
for each DCC platform. - There is no standard way to interchange the same
physics settings across different physics
engines. - In many cases it is even impossible to author
physical simulations without direct programming.
33COLLADA Physics
- COLLADA Physics provides
- An API independent description of basic rigid
body and jointed models. - center of mass, initial velocity, moment of
inertia, coefficient of friction, damping,
coefficient of gravity, etc. - Declaration of simplified geometric or convex
collision bounds for rigid bodies. - Declare constrained joints and degrees-of-freedom
and for compound models. - Scene partitioning with static, dynamic and
nonparticipating geometry.
34How COLLADA Physics works
- Properties are described as libraries of physical
materials that can be applied to geometries.
ltmaterial id"Wood"gt lteffect
ref"MyWoodShader"/gt ltphysics_material
id"WoodPhysMtl"gt lttechnique
profile"COMMON"gt ltstatic_frictiongt
ltfloat semantic"X"gt 0.23 lt/floatgt
lt/static_frictiongt ltdynamic_frictiongt
ltfloat semantic"X"gt 0.12 lt/floatgt
lt/dynamic_frictiongt ltdensitygt
ltfloatgt 0.05 lt/floatgt lt/densitygt
ltelasticitygt ltfloatgt 0.05 lt/floatgt lt/elasticitygt
lt/techniquegt lt/physics_materialgt lt/materi
algt
35How COLLADA Physics works
- Rigid Bodies are created from analytical shapes
or convex hulls, combined with physical materials
ltlibrary type"PHYSICS"gt ltrigid_body
id"HammerRigidBody"gt ltmassgt 1.25 lt/massgt
ltshapegt ltmassgt 0.25 lt/massgt ltgeometry
url"hammerHandleForPhysics"/gt
ltphysics_material url"WoodPhysMtl"/gt
lt/shapegt ltshapegt ltmassgt 1.0 lt/massgt
lttranslategt 0.0 8.0 0.0 lt/translategt
ltgeometry url"hammerHeadForPhysics"/gt
ltphysics_material url"SteelPhysMtl"/gt
lt/shapegt lt/rigid_bodygt lt/librarygt
36How COLLADA Physics works
- Joint constraints can be applied to compound
objects
ltlibrary type"PHYSICS"gt ltrigid_body
id"doorRigidBody"/gt ltrigid_body
id"wallRigidBody"/gt ltrigid_constraint
id"rigidHingeConstraint"gt ltattachment
body"wallRigidBody"gt lttranslate
sid"translate"gt5 0 0lt/translategt
lt/attachmentgt ltattachment body"doorRigidBody
"gt lttranslate sid"translate"gt0 8
0lt/translategt ltrotate sid"rotateX"gt0 1 0
-45.0lt/rotategt lt/attachmentgt
ltrot_limit_mingt0 -90 0 lt/rot_limit_mingt
ltrot_limit_maxgt0 90 0lt/rot_limit_maxgt
lt/rigid_constraintgt lt/librarygt
37DEMONSTRATION
- Developers of the ColladaMaya plugin, based on
Alias code base. - http//colladamaya.sourceforge.net/
- ColladaMaya Physics
- Exports Maya's native rigid body dynamics as
COLLADA - Rigid bodies and additional mass properties
- Physics shapes, e.g. capsules
- Rigid constraints
38DEMONSTRATION
- Announcing the Novodex plugin for Maya
- Superset of Mayas native rigid body dynamics.
- Exclusive features
- 6-DOF rigid constraint, motors, rag dolls
- More flexibility (e.g. capsules and convex
shapes) - Much higher performance, through superior
algorithms and optional HW-acceleration - Interested in beta testing? Need COLLADA contract
work? - claforte_at_feelingsoftware.com
39DEMONSTRATION
- Demonstrating COLLADA Physics interop between XSI
and Maya, illustrating high fidelity and richness
of data that can be transferred robustly. - Asset previewing and validation in the
SoftimageXSI Viewer, with physics simulation and
playback - For the future PhysX supported in XSI v.5.0,
hardware accelerated support to come in both XSI
and Viewer.
40DEMONSTRATION
- Autodesk ME is fully committed to COLLADA.
- Part of the 3DS Max Game Export Interface
package. - 3DS Max supports COLLADA 1.3 fully
bi-directional. - Coming soon, HLSL COLLADA FX implementation.
- Implementation of COLLADA Physics specifications
(with Ageia). - Import moving to C plug-in.
41Conformance and Standardization
- In order to rely on a DCC plugin, we need a lot
of test cases and verify that the correct
behaviour is observed. - For example, COLLADA exporters must obey import
and export rules - If it's imported it must be exported, even if
it's not recognized. - Unrecognised data does not get transformed or
discarded. - We want users and developers to create reliable,
high quality exporters and importers for all DCC
applications. - To reach this aim,
- we have created a freely available suite of test
files - We are committed to publishing the results of
conformance for all major exporters.
42The COLLADA Conformance Suite
- Currently over 500 feature tests and growing.
- The COLLADA, native source files and reference
images are freely available to all COLLADA
developers. - The results of the tests are published openly for
you to compare. - Visit http//www.collada.org/ to see the current
test results. - We are looking to provide access to our automated
testing system through a web-based application
soon.
43Conformance Test Results
44Feature Tests
45COLLADA and Khronos Group
- The Khronos Group have voted to accept COLLADA as
an active standards working group. - Khronos is an independent organization with a
strong representation in the 3D world, home to
OpenGL ES, OpenML, and other standards. - COLLADA will be transferred to Khronos and will
continue development under a stronger framework
of collaborators, partners and participants. - Sony Computer Entertainment is joining Khronos as
a Promoter, to more actively participate in the
development of open standards.
46The Khronos Group
47DEMONSTRATION
- Nokia Research selected COLLADA as a tool to help
developers deliver mobile 3D content. - Nokia is committed to ensuring that OpenGLES and
JSR-184 are represented in COLLADA. - Adopting COLLADA has saved time and effort.
- Research can now focus on problems from the
mobile domain, like mesh optimization, LOD
generation, and other tools for mobile 3D
developers.
48DEMONSTRATION
- Emdigo has selected COLLADA as the basis for its
advanced 3D Mobile content tool-chain. - Emdigo is committed to making COLLADA seamlessly
extendible for a variety of applications
including mobile interfaces - emdigo chairs the
COLLADA Profiles Working Group. - Emdigo has contributed to the COLLADA API effort
and looks forward to leveraging shading and
conditioning tools from hardware vendors
already leveraging the COLLADA art exporters! - Emdigo has joined the KHRONOS Group and are
continuing to invest in COLLADA.
49DEMONSTRATION
- File Referencing
- Assemble complex scenes from multiple smaller
scenes - Allows for much larger scenes
- Encourages re-use and collaboration
- Allows artist to focus on area of interest
- COLLADA File Referencing in Maya
- Dynamic load/unload
- Layered edits
- Referencing proxies
- One-click viewport integration
- Mix-n-match Maya and COLLADA assets
- Integration with user tools
50COLLADA and FBX
- Plan to add support for COLLADA to FBX
- Targeted to be available in Q4 2005.
- Download free FBX SDK at http//www.alias.com/fbx
51Production Pipelines
- There are many processes that your 3D assets need
to go through before being used as game data - If your DCC tool doesn't have these processes
built into their exporter, you'll have to buy or
write your own. - Why can't we just pipe 3D assets through simple,
command line tools?
52Tools for Asset Wrangling
- Our goal is to provide a framework that allows
users to reconfigure their own production
pipelines using standard tools, with COLLADA as
the interchange format between them. - Our toolset consists of
- 1. The COLLADA API
- 2. Asset Tags and Multi-Representation
- 3. Conditioners
53The COLLADA API
- Introducing the COLLADA API
- For reading, writing and validation of COLLADA
documents. - Coded in C, automatically generated from the
XML Schema definition of the COLLADA format. - Fast, efficient, based on callbacks and a COLLADA
Document Object Model (DOM). - Save yourself from reinventing the wheel for
every project.
54How the COLLADA API works
- Based on a fully reflective object model
- The XML schema for COLLADA is processed into an
internal database of object types. - This database allows classes to introspect on
types, relationships and structures. - At load time, COLLADA XML document is scanned and
a tree-structured database of objects is built
internally. - As the tree is built, callbacks are triggered
that allow you build your own internal
representation in parallel. - After reading, this database is open for
querying, altering and exporting.
55Using the COLLADA API
- First we open an XML document into a fresh
database. - After loading, we can query how many ltimagegt
elements there are containing the string
"mossyRock".
DAE input new DAE errval input-gtload(input_
url_name.xml)
imageCount input-gtgetDatabase()-gtgetElementCount
("mossyRock", "image", NULL)
56Using the COLLADA API
- Next we can loop over the all the image elements
in the database, processing them. - After processing, we can write out the altered
database to a new document.
for (unsigned int i0 iltimageCount i)
error input-gtgetDatabase()-gtgetElement
((daeElement)mossyRockImage, i,
"mossyRock","image",NULL) // if successful,
process the mossyRockImage
error input-gtsave(output_url.c_str())
57Asset Management
- Asset Tags are meta-data used to describe the
history, meaning and uses of an asset. - Most objects in a COLLADA document can be asset
tagged. - Assets can have multiple representations.
- Tags can be used to track asset creation and
ownership over time and across databases.
ltassetgt ltauthorgtJoe Schmoelt/authorgt
ltkeywordsgtBlink animation level_04lt/keywordsgt
ltunit name"kilometer" meter"0.001"/gt
ltup_axisgtY_UPlt/up_axisgt ltrevisiongt1.04lt/revision
gt ltauthoring_toolgtMaya Collada exporter
v0.7.4lt/authoring_toolgt ltmodifiedgt2004-12-20T22
1018Zlt/modifiedgt lt/assetgt
58Towards a Makefile for 3D Assets
- Asset Tags can make pipeline processing more
efficient. - Parent-child relationships can be used to rebuild
or re-export only those assets affected by an
edit. - Asset tags can be used to guide automatic
generation scripts by recording command lines,
parameters, tools and settings. - Asset tags allow integration with Versioning
Systems at a finer granularity, so assets no
longer need to be fragmented into thousands of
individual files. - Asset management is an active area of research,
join our working group!
59Conditioners
- A Conditioner is a program, written using the
COLLADA API that - Conditioners are modular pieces of your
production pipeline for 3D content. - Convert N-sided polygon data to optimized
triangle strips. - Preprocess a model for global illumination,
writing the result back as a new version of the
model. - Automatically generate multiple LOD, visibility
structures or collision bounds and embed the
result directly into the database.
1. loads a COLLADA document, 2. processes a
subset of the assets, and 3. outputs a COLLADA
document.
60Conditioners
- The COLLADA API samples include toy Conditioners
for - Patching filenames and asset IDs.
- Triangulation of N-sided polygon models.
- Resampling animation curves at constant
timesteps. - De-indexing skinned meshes
- (preparing indexes for glDrawElements).
- Cache optimizer
- (reorder triangles for faster drawing).
- Additional conditioner ideas
- Triangle stripper
- Tangent and Binormal generation for textured
models. - Continuous LOD generation.
- etc.
61Pipeline Editors
- Joining conditioners together should be as simple
as editing shaders. - Designing your data pipeline out of modular
components leaves room for experimentation and
optimisation. - We are working on visual editing tools for
reconfigurable pipelines and automatically
generated conditioners.
Java-based pipeline generator
62Development Roadmap 2005
63Summary
- COLLADA an open standard for the
- interactive entertainment industry
- Academic Researchers, please investigate COLLADA!
- Collaborative, open source project, MIT license.
- Make tools, extend the standard.
- Read the documentation and visit the public
website at http//www.collada.org/ - Join Khronos, join a working group and help
define the standard.
64Thank You to all our Contributors
65QA Panel