A COLLADA document is XML checked against the COLLADA schema that Khronos publishes.
This page follows the schema of version 1.4.1, the version most files use; it lists
the elements a reader meets and their attributes and children in schema order. Most
elements also allow asset (first) and extra (last) children,
and id and name attributes.
Root and versions
| Version | Namespace |
|---|---|
| 1.4.0, 1.4.1 | http://www.collada.org/2005/11/COLLADASchema |
| 1.5.0 | http://www.collada.org/2008/03/COLLADASchema |
The root COLLADA has version and the namespace, then:
asset (required); any number of libraries, in any order; one optional
scene; and extra elements. Elements refer to each other by
URL: #id for one in the same file, or file.dae#id.
asset
| Child | Contents |
|---|---|
contributor | any number, each with optional author, authoring_tool, comments, copyright, source_data |
created, modified | ISO 8601 date and time |
keywords, revision, subject, title | text |
unit | attributes meter (metres per unit, default 1.0) and name (default meter) |
up_axis | X_UP, Y_UP (default) or Z_UP |
Libraries
| Library | Holds |
|---|---|
library_animations | animation |
library_animation_clips | animation_clip: a time range of animations |
library_cameras | camera |
library_controllers | controller: skins and morphs |
library_effects | effect: shading |
library_force_fields | force_field |
library_geometries | geometry: meshes, splines and convex meshes |
library_images | image |
library_lights | light |
library_materials | material |
library_nodes | node: reusable node trees |
library_physics_materials | physics_material |
library_physics_models | physics_model |
library_physics_scenes | physics_scene |
library_visual_scenes | visual_scene: trees of nodes |
scene picks what to show: instance_visual_scene and any
instance_physics_scene.
Nodes and transforms
A node has id, name, sid,
type (NODE, the default, or JOINT for a
bone) and layer. Its children, in order: transforms; then
instance_camera, instance_controller,
instance_geometry, instance_light,
instance_node; then child nodes.
| Transform | Values |
|---|---|
translate | x y z |
rotate | axis x y z and an angle in degrees |
scale | x y z |
matrix | 16 numbers, a 4×4 matrix written row by row |
lookat | eye position, interest point and up vector, nine numbers |
skew | an angle in degrees, a rotation axis and a translation axis |
Transforms apply in the order written, each in the space of the ones before. Each can
carry a sid so animations can target it, as in
Cube/rotationZ.ANGLE.
instance_geometry and instance_controller take a
bind_material, whose technique_common holds
instance_material elements: symbol (the name a primitive’s
material attribute uses), target (the material’s URL), and
bind_vertex_input children (semantic,
input_semantic, input_set) that tie a texture coordinate
name to a set of the mesh. instance_controller also has
skeleton elements naming the root joints.
Materials and effects
A material holds an instance_effect pointing at an
effect. The common profile, profile_COMMON, holds
newparam elements (a surface with
init_from naming an image, or a sampler2D with a
source), then a technique with one shading model:
| Model | Children, in order |
|---|---|
constant | emission, reflective, reflectivity, transparent, transparency, index_of_refraction |
lambert | emission, ambient, diffuse, reflective, reflectivity, transparent, transparency, index_of_refraction |
phong, blinn | emission, ambient, diffuse, specular, shininess, reflective, reflectivity, transparent, transparency, index_of_refraction |
A colour child holds a color (four numbers, RGBA), a
param with ref, or a texture with
texture (a sampler’s sid) and texcoord (a
symbol bound by bind_vertex_input). A number child holds a
float or a param. transparent has an
opaque attribute: A_ONE (default, alpha 1 is opaque) or
RGB_ZERO (colour 0 is opaque); 1.5 adds A_ZERO and
RGB_ONE. Other profiles (profile_CG,
profile_GLSL, profile_GLES) hold shader programs.
Cameras, lights and images
| Element | Contents |
|---|---|
camera / optics / technique_common | perspective: xfov, yfov, aspect_ratio (any one or two of them, angles in degrees), znear, zfar; or orthographic: xmag, ymag, aspect_ratio, znear, zfar |
light / technique_common | ambient or directional (a color); point (color, constant_attenuation, linear_attenuation, quadratic_attenuation); spot (those, plus falloff_angle and falloff_exponent) |
image | init_from (a file URL) or data (hexadecimal bytes), with optional format, width, height, depth attributes |
Cameras look down their node’s −Z axis; lights shine along −Z.
Controllers
| Element | Contents |
|---|---|
skin (source: the geometry) | bind_shape_matrix; three or more sources; joints with inputs JOINT and INV_BIND_MATRIX; vertex_weights (count) with inputs JOINT and WEIGHT, vcount (influences per vertex) and v (pairs of joint and weight indices; joint −1 means the bind shape) |
morph (source, method) | method NORMALIZED (default) or RELATIVE; two or more sources; targets with inputs MORPH_TARGET and MORPH_WEIGHT |
Animation
An animation holds sources, samplers and
channels, and may nest further animations. A sampler’s
inputs name the key times (INPUT), the values
(OUTPUT), the interpolation of each key (INTERPOLATION) and
any tangents (IN_TANGENT, OUT_TANGENT). The interpolation
source is a Name_array of LINEAR, BEZIER,
HERMITE, CARDINAL, BSPLINE or
STEP. A channel has source (the sampler) and
target, a path of ids and sids to an animated value, with an optional
member such as .X, .ANGLE or (3)(2) for one
matrix element.