You are on page 1of 23

Extensions Process

Rémi Arnaud
Chief Software Architect, Screampoint Intl.

Mark Barnes
Sr Software Architect, Biodroid Productions Lda.
COLLADA Work Group Chairman, The Khronos Group

© Copyright Khronos Group, 2010 - Page 1


Agenda
 COLLADA usage model
 COLLADA extension mechanism
 Extensions by example
 NEW - Khronos WG COLLADA extension process
 Questions?

© Copyright Khronos Group, 2010 - Page 2


COLLADA extensions usage model
COLLADA users required extensions

o project/user specific meta data carried from DCC to Application


“Export user defined properties of Max nodes into an extra element of the corresponding COLLADA node” – openCOLLADA
Max/Maya plug-ins.

COLLADA tool vendors required extensions

o tool can refine COLLADA definition with additional parameters


“Camera XSI extension extends the COLLADA common representation”
https://collada.org/mediawiki/index.php/Camera_XSI_extension

o tool want to provide an alternative representation – Alternative shader languages (Cg, GLSL, HLSL…)
Renderman shader code as alternative <effect> http://www.cs.utexas.edu/ftp/pub/techreports/honor_theses/cs-06-24-
whiteford.pdf

o using COLLADA as a tool native format – extensions replacing proprietary format


“COLLADA is the basis format of LightWave CORE™ , with extensions added by the NewTek engineering team.”
http://www.newtek.com/lightwave/core/

© Copyright Khronos Group, 2010 - Page 3


COLLADA extensibility model
 COLLADA is a declarative data model
 Schema includes extensions mechanisms
 Adding
 Declarations represent new features
 Replacing
 Declarations represent alternative techniques (descriptions)
 Combining
 Adding and Replacing recursively

© Copyright Khronos Group, 2010 - Page 4


Extension Mechanisms
 <technique> profiles
 Replace one description with another
 Choose the best profile
 <extra> types
 Add declarations to most everything
 A bag of techniques
 Adding choices can be recursive
 <input> semantics
 Add new streams to data flows

© Copyright Khronos Group, 2010 - Page 5


COLLADA <extra> extension mechanism
<extra>
<technique profile=“VENDOR-TAG">
<…
</technique>
</extra>

Rules:

<extra> authorized only at strategic places

Rule: Ignoring ALL extra must be safe

© Copyright Khronos Group, 2010 - Page 6


COLLADA <input> extension mechanism
<mesh>
<source id=“position” ….. />
<source id=“texcoord” … />
<source id=“temperature_data” … />
<vertices id=“vx”>
<input semantic=“POSITION” source=“#position”/>
</vertices>
<lines> or <polygons> or <triangles>  primitive choice
<input semantic=“VERTEX” source=“#vx” offset=“0” />
<input semantic=“TEXCOORD” source=“#texcoord” offset=“1” />
<input semantic=“TEMPERATURE” source=“# temperature_data” offset=“2 />
<p>0 0 0 1 1 0 … …. </p>

Standard semantics defined in COLLADA spec. 5-40

© Copyright Khronos Group, 2010 - Page 7


Extension rules – COLLADA spec. 3-6

© Copyright Khronos Group, 2010 - Page 8


Example Extension - bump
<effect id="Asset-fx-02"> …
<profile_COMMON> <coverageU>1</coverageU>
... <coverageV>1</coverageV>
<technique> <translateFrameU>0</translateFrameU>
<phong> <translateFrameV>0</translateFrameV>
<emission><color>0 0 0 1</color></emission> <rotateFrame>0</rotateFrame>
<ambient><color>0 0 0 1</color></ambient> <stagger>0</stagger>
<diffuse><texture texture="diffuse-sampl" texcoord="TEX0"/></diffuse> <fast>0</fast>
<specular><texture texture="specular-sampl" texcoord="TEX0"/></specular> <repeatU>1</repeatU>
<shininess><float>8.0</float></shininess> <repeatV>1</repeatV>
<reflective><color>0 0 0 1</color></reflective> …..
<reflectivity><float>0</float></reflectivity> </technique>
<transparent><color>0 0 0 1</color></transparent> <technique profile="MAX3D">
<transparency><float>1</float></transparency> <amount>0.1</amount>
<index_of_refraction><float>0</float></index_of_refraction> <bumpInterp>1</bumpInterp>
</phong> </technique>
<extra> </extra>
<technique profile="FCOLLADA"> </texture>
<bump> </bump>
<texture texture="normal-sampler-02" texcoord="TEX0"> </technique>
<extra> </extra>
<technique profile="MAYA"> </technique>
<wrapU>1</wrapU> </profile_COMMON>
<wrapV>1</wrapV> </effect>
<mirrorU>0</mirrorU>
<mirrorV>0</mirrorV>

© Copyright Khronos Group, 2010 - Page 9


Example Extension - bump
<effect id="Asset-fx-02"> …
<profile_COMMON> <coverageU>1</coverageU>
... <coverageV>1</coverageV>
<technique> <translateFrameU>0</translateFrameU>
<phong> <translateFrameV>0</translateFrameV>
<emission><color>0 0 0 1</color></emission> <rotateFrame>0</rotateFrame>
<ambient><color>0 0 0 1</color></ambient> <stagger>0</stagger>
<diffuse><texture texture="diffuse-sampl" texcoord="TEX0"/></diffuse> <fast>0</fast>
<specular><texture texture="specular-sampl" texcoord="TEX0"/></specular> <repeatU>1</repeatU>
<shininess><float>8.0</float></shininess> <repeatV>1</repeatV>
<reflective><color>0 0 0 1</color></reflective> …..
<reflectivity><float>0</float></reflectivity> </technique>
<transparent><color>0 0 0 1</color></transparent> <technique profile="MAX3D">
<transparency><float>1</float></transparency> <amount>0.1</amount>
<index_of_refraction><float>0</float></index_of_refraction> <bumpInterp>1</bumpInterp>
</phong> </technique>
<extra> </extra>
<technique profile="FCOLLADA"> </texture>
<bump> </bump>
<texture texture="normal-sampler-02" texcoord="TEX0"> </technique>
<extra> </extra>
<technique profile="MAYA"> </technique>
<wrapU>1</wrapU> </profile_COMMON>
<wrapV>1</wrapV> </effect>
<mirrorU>0</mirrorU>
<mirrorV>0</mirrorV>

© Copyright Khronos Group, 2010 - Page 10


Example Extension - LOD
<node id="LOD78" name="LOD">
<node id="Model183" name="Model">
<instance_geometry url="#MESH_Model183">

</instance_geometry>
</node>
<node id="Model184" name="Model">
<instance_geometry url="#MESH_Model184">
…. Ignoring <extra> result
</instance_geometry> in flickering (z-fighting)
</node>
….
<extra>
<technique profile="Maya">
<dynamic_attributes>
<lodNode short_name="lodNode" type="bool">true</lodNode>
<lodCenter short_name="lodCenter" type="float3">0 0 0</lodCenter>
<lodDistance short_name="lodDistance" type="float">10.000000</lodDistance>

</dynamic_attributes>
</technique>
</extra>
</node>

© Copyright Khronos Group, 2010 - Page 11


Example improved LOD extension
<node id="LOD78" name="LOD">
<node id="Model183" name="Model">
<instance_geometry url="#MESH_Model183">

</instance_geometry>
</node>
<extra>
<technique profile="Maya">
<dynamic_attributes>
<lodNode short_name="lodNode" type="bool">true</lodNode>
<lodCenter short_name="lodCenter" type="float3">0 0 0</lodCenter>
<node id="Model184" name="Model"> Ignoring <extra> results
<instance_geometry url="#MESH_Model184"> in a single LOD loading
….
</instance_geometry>
</node>
<lodDistance short_name="lodDistance" type="float">10.000000</lodDistance>

</dynamic_attributes>
</technique>
</extra>
</node>

© Copyright Khronos Group, 2010 - Page 12


Need for multi-vendor extensions
http://www.okino.com/conv/exp_collada_extensions.htm
<extra>
<technique profile="GOOGLEEARTH">

!!!
<double_sided>1</double_sided>
</technique>
<technique profile="OKINO">
<double_sided>1</double_sided>
</technique>
<technique profile="MAX3D">
<double_sided>1</double_sided>
</technique>
</extra>

© Copyright Khronos Group, 2010 - Page 13


COLLADA Extension Process Summary
 Visit https://collada.org/mediawiki/index.php/Portal:Extensions_directory

 Determine if you need to create an extension


 Create your extension by following the guidelines
 Submit draft to COLLADA work group for review
 Get feedback from the COLLADA specification working group
 Receive “Published” stamp of approval

© Copyright Khronos Group, 2010 - Page 14


Visit

© Copyright Khronos Group, 2010 - Page 15


Create

© Copyright Khronos Group, 2010 - Page 16


Is there already an extension that does what I want?

• Can it be used instead of writing a new one?

• reuse of an existing specification


• or promoting single-vendor COLLADA extensions to multi-vendor or Khronos-approved status.
• ask the COLLADA Working Group chair whether anyone has already defined related functionality.

collada-wgchair@khronos.org

© Copyright Khronos Group, 2010 - Page 17


Should the extension be Khronos-approved, multi-vendor,
or single vendor?
• If the functionality being designed is going to be used by multiple applications - as most will - it's a good
idea to agree on a single extension with other developers - this makes it easier for vendors to justify
development of the extensions, and better interoperability for end-users.

• If the functionality is well-understood, it may be appropriate to define a Khronos-approved extension. This


is the most "blessed" category of extension; it goes through the entire standards process, and is approved by
the working group, but remains optional functionality.

• Khronos-approved extensions are IP-safe, royalty-free licence. Khronos contributing members can obtain
Khronos-approved extensions. Vendor or multi-vendor extensions may not be. Khronos-approved
extensions are as good as features added to the specification, it is a fast path for adding features to future
specifications.

• Some extensions may have to remain proprietary and would therefore not be published. This process is still
useful to designers of proprietary extensions however.

© Copyright Khronos Group, 2010 - Page 18


Determine

© Copyright Khronos Group, 2010 - Page 19


Determine

© Copyright Khronos Group, 2010 - Page 20


Determine

© Copyright Khronos Group, 2010 - Page 21


Example

© Copyright Khronos Group, 2010 - Page 22


Questions?

© Copyright Khronos Group, 2010 - Page 23

You might also like