Collada Reference Card 1.4

4,722 views

Published on

COLLADA™ defines an XML-based schema to allow transport of 3D assets between applications, enabling diverse 3D
authoring and content processing tools to be combined into a production pipeline.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,722
On SlideShare
0
From Embeds
0
Number of Embeds
1,873
Actions
Shares
0
Downloads
39
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Collada Reference Card 1.4

  1. 1. COLLADA 1.4 Quick Reference Card - Page 1 COLLADA™ defines an XML-based schema to allow transport of 3D assets between applications, enabling diverse 3D Metadata Elements [5] authoring and content processing tools to be combined into a production pipeline. Declares the root of the document that contains some of All elements on this card apply to the COMMON profile unless otherwise noted. the content in the COLLADA schema. COLLADA • [n] refers to chapters in COLLADA 1.4 Specification: • <any> may contain any well-formed XML data. www.khronos.org/collada version ‡ • Type TargetableFloat is a floating point value that has a asset + • Attributes are green. Optional Attributes are italic. sid attribute. library_animations [0..*] + • Elements are blue. [Placeholder elements] are in brackets. • Type TargetableFloat3 is a floating point vector value library_animation_clips [0..*] - • + element expanded elsewhere on card. that has an sid attribute. library_cameras [0..*] + – Color model is RGB for float3, and RGBA for float4 library_controllers [0..*] + • - element expanded in specification. values. library_effects [0..*] + • _ indicates sequence. library_force_fields [0..*] - – Spatial coordinates are Cartesian for float (X), float2 • = indicates choice. (XY), and float3 (XYZ) values. library_geometries [0..*] + • xs:* types are defined in the XML Schema language _ = library_images [0..*] + – Texture coordinates are Cartesian for float (S), float2 specification. (ST), and float3 (STP) values; and homogenous for library_lights [0..*] + • The default cardinality is 1. float4 (STPQ) values. library_materials [0..*] + library_nodes [0..*] + library_physics_materials [0..*] - The parent of all library_* elements is COLLADA Declares a module of <image> elements. library_physics_models [0..*] - Declares a module of <animation> elements. library_images library_physics_scenes [0..*] - library_animations id xs:ID library_visual_scenes [0..*] - id xs:ID name xs:NCName scene [0..1] + name xs:NCName asset [0..1] + extra [0..*] + asset [0..1] + _ image [1..*] + Parent: none _ ‡ version: 1.4.0, 1.4.1 animation [1..*] + extra [0..*] + extra [0..*] + Defines asset-management information. Declares a module of light elements. Declares a module of camera elements. library_lights asset library_cameras id xs:ID contributor [0..*] id xs:ID author [0..1] xs:string name xs:NCName name xs:NCName authoring_tool [0..1] xs:string asset [0..1] + _ comments [0..1] xs:string asset [0..1] + copyright [0..1] xs:string _ light [1..*] + _ camera [1..*] + source_data [0..1] xs:anyURI extra [0..*] + extra [0..*] + created dateTime Declares a module of material elements. keywords [0..1] xs:string Declares a module of controller elements. _ modified dateTime library_controllers library_materials revision [0..1] xs:string id xs:ID id xs:ID subject [0..1] xs:string name xs:NCName name xs:NCName title [0..1] xs:string unit [0..1] + asset [0..1] + asset [0..1] + _ up_axis ‡ [0..1] - controller [1..*] + _ material [1..*] + extra [0..*] + Parents: camera, COLLADA, light, material, source, extra [0..*] + geometry, image, animation, animation_clip, controller, Declares a module of effect elements. extra, node, visual_scene, library_*, effect, force_field, Declares a module of node elements. physics_{material, scene, model}, profile_*, profile_{CG, library_effects library_nodes COMMON, GLES}/technique (FX) id xs:ID ‡ up_axis: X_UP, Y_UP, Z_UP. Default = Y_UP id xs:ID name xs:NCName name xs:NCName asset [0..1] + asset [0..1] + Instantiates a COLLADA resource. _ effect [1..*] + extra [0..*] + _ node [1..*] + instance_animation, extra [0..*] + instance_{camera, light, node}, Declares a module of geometry elements. instance_{visual, physics}_scene, library_geometries instance_physics_material, instance_force_field InstanceWithExtra id xs:ID Defines unit of distance for COLLADA elements and objects. url xs:anyURI name xs:NCName unit sid xs:NCName asset [0..1] + meter float name xs:NCName _ geometry [1..*] + name xs:NMTOKEN _ extra [0..*] + extra [0..*] + Parent: asset Parents: instance_animation: animation_clip; instance_{camera, light, node}: node; instance_{visual, physics}_scene: scene; Scene Elements [5] Describes the entire set of information that can be visualized from the contents of a COLLADA resource. instance_physics_material: {instance}_rigid_body, shape; instance_force_field: physics_scene, instance_physics_model Describes the entire set of information that can be visualized from the contents of a COLLADA resource. visual_scene id xs:ID Instantiates rigid_body within an instance_physics_model. scene name xs:NCName instance_rigid_body instance_physics_scene [0..*] + InstanceWithExtra body xs:NCName asset [0..1] + _ instance_visual_scene [0..1] + InstanceWithExtra sid xs:NCName node [1..*] + extra [0..*] + _ evaluate_scene [0..*] + target xs:anyURI Parent: COLLADA technique_common extra [0..*] + Parent: library_visual_scenes angular_velocity ‡ [0..1] float3 Declares an environment in which physical objects are velocity ‡ [0..1] float3 instantiated and simulated. dynamic [0..1] - physics_scene Allows the instantiation of a physics model within mass [0..1] TargetableFloat id xs:ID another physics model, or in a physics scene. mass_frame [0..1] + _ _ inertia name xs:NCName instance_physics_model [0..1] TargetableFloat3 asset [0..1] + url xs:anyURI instance_physics_material +InstanceWithExtra instance_force_field [0..*] + InstanceWithExtra = physics_material + sid xs:NCName [0..1] instance_physics_model [0..*] + shape [0..*] + parent xs:anyURI _ technique_common technique (core) [0..*] + instance_force_field [0..*] + InstanceWithExtra extra [0..*] + _ gravity [0..1] TargetableFloat3 instance_rigid_body [0..*] + time_step [0..1] TargetableFloat _ Parent: instance_physics_model technique (core) [0..*] + instance_rigid_constraint [0..*] - ‡ angular_velocity, velocity: Default = 0 0 0 extra Parent: library_physics_scenes [0..*] + extra [0..*] Parents: physics_scene, physics_model + Scene Elements Continued ©2010 Khronos Group - Rev. 1110 www.collada.org
  2. 2. COLLADA 1.4 Quick Reference Card - Page 2 Scene Elements (continued) Geometry Elements [5] Declares the binding of geometric primitives and vertex attributes for a mesh element to produce polylists. Declares instantiation of a COLLADA geometry resource. Describes visual shape and appearance of object in scene. instance_geometry polylist geometry name xs:NCName _ bind_material [0..1] + id xs:ID count uint extra [0..*] + name xs:NCName Parents: node, shape material xs:NCName asset [0..1] + input (shared) [0..*] + InputLocalOffset Binds a specific material to a piece of geometry, binding convex_mesh + vcount [0..1] ListOfUInts varying and uniform parameters at the same time. _ = mesh + _ p [0..1] ListOfUInts bind_material spline - extra [0..*] + param (core) [0..*] extra [0..*] + Parent: mesh name xs:NCName Parent: library_geometries sid xs:NCName Declares the binding of geometric primitives and vertex Describes basic geometric meshes using vertex and attributes for a mesh element to produce polygons. semantic xs:NMTOKEN primitive information. type xs:NMTOKEN polygons mesh name xs:NCName technique_common source (core) [1..*] + count uint instance_material [1..*] material xs:NCName vertices + _ symbol xs:NCName input (shared) [0..*] + lines [0..*] + target xs:anyURI p [0..*] ListOfUInts linestrips [0..*] + _ = sid xs:NCName polygons [0..*] + [0..*] ph [0..*] name xs:NCName p ListOfUInts _ = polylist [0..*] + _ h [1..*] ListOfUInts bind (material) [0..*] - [0..*] triangles [0..*] + extra [0..*] + _ bind_vertex_input [0..*] - trifans [0..*] + Parents: mesh, convex_mesh extra [0..*] + tristrips [0..*] + technique (core) [0..*] + extra [0..*] + Declares the binding of geometric primitives and vertex extra [0..*] + Parent: geometry attributes for a mesh element to produce lines. Parents: instance_geometry, instance_controller lines Declares the attributes and identity of mesh vertices. Declares instantiation of a COLLADA controller resource. name xs:NCName instance_controller vertices count uint id xs:ID material xs:NCName skeleton [0..*] xs:anyURI name xs:NCName input (shared) [0..*] + InputLocalOffset _ bind_material [0..1] + input (unshared) [1..*] InputLocal _ p [0..1] ListOfUInts extra [0..*] + Parent: node semantic ‡ xs:NMTOKEN extra [0..*] + _ source xs:URIFragmentType Parents: mesh, convex_mesh Describes an alternative way to evaluate a visual_scene. extra [0..*] + evaluate_scene Parents: mesh, convex_mesh Declares the binding of geometric primitives and vertex name xs:NCName ‡ semantic: see note for input (shared) on page 3 attributes for a mesh element to produce connected _ render [1..*] triangles. camera_node xs:anyURI Declares the binding of geometric primitives and vertex trifans, tristrips attributes for a mesh element to produce individual triangles. name _ layer [0..*] xs:NCName xs:NCName instance_effect [0..1] + triangles count uint Parent: visual_scene name xs:NCName material xs:NCName count uint input (shared) [0..*] + InputLocalOffset Describes hierarchical relationship of elements in a scene. _ p [0..*] ListOfUInts material xs:NCName node input (shared) [0..*] + InputLocalOffset extra [0..*] + id xs:ID _ Parents: mesh, convex_mesh p [0..1] ListOfUInts name xs:NCName extra [0..*] + sid xs:NCName Parents: mesh, convex_mesh Declares the binding of geometric primitives and vertex type ‡ NodeType attributes for a mesh element to produce linestrips. layer ListOfNames asset [0..1] + Declares animation information. linestrips lookat name xs:NCName [0..*] + animation matrix [0..*] + count uint id xs:ID material xs:NCName rotate [0..*] + name xs:NCName _ = scale [0..*] + input (shared) [0..*] + InputLocalOffset asset [0..1] + [0..*] skew [0..*] - _ p [0..*] ListOfUInts source (core) [1..*] + translate [0..*] + extra [0..*] + sampler [1..*] Parents: mesh, convex_mesh instance_camera [0..*] + InstanceWithExtra id xs:ID instance_controller [0..*] + _ input [1..*] - InputLocal _ _ instance_geometry [0..*] + channel [1..*] + instance_light [0..*] + InstanceWithExtra _ = = animation [0..*] + Using p to represent assembly of mesh primitive instance_node [0..*] + InstanceWithExtra The first index in a p element refers to all inputs with animation [1..*] + an offset attribute value of 0. The second index refers to node [0..*] + sampler [1..*] + all inputs with an offset of 1. There is an index value for extra [0..*] + Parents: library_nodes, node, visual_scene _ channel [1..*] + each unique input offset attribute value. Each vertex of ‡ type: JOINT, NODE. Default = NODE animation [0..*] + the primitive is assembled using the value(s) read from animation [1..*] + indexed inputs. After each input is sampled, producing a primitive vertex, the next index in the p element again extra [0..*] + refers to the inputs with offset of 0. Animation Elements [5] Parent: library_animation, animation Declares interpolation sampling function for an animation. Describes a section of the animation curves to be sampler used together as an animation clip. Controller Elements [5] id xs:ID animation_clip Declares generic control information. _ input (unshared) [1..*] InputLocal id xs:ID semantic ‡ xs:NMTOKEN name xs:NCName controller source xs:URIFragmentType id xs:ID start ‡ xs:double Parent: animation name xs:NCName ‡ semantic: see note for input (shared) on page 3 end xs:double asset [0..1] + asset [0..1] + Declares an output channel of an animation. instance_animation [1..*] + InstanceWithExtra skin + url xs:anyURI _ = morph + channel _ _ extra [0..*] + extra [0..*] + source  xs:URIFragmentType extra [0..*] + Parent: library_controllers target xs:token Parent: animation Parent: library_animation_clips ‡ start: Default = 0.0 Controller Elements Continued ©2010 Khronos Group - Rev. 1110 www.collada.org
  3. 3. COLLADA 1.4 Quick Reference Card - Page 3 Controller Elements (continued) Transform Elements [5] Declares vertex and primitive information sufficient to describe blend-weight skinning. Describes the data required to blend between sets of Declare local coordinate system transformations. static meshes. skin source xs:anyURI rotate specifies an axis (XYZ) and rotation (Euler angle) morph bind_shape_matrix [0..1] float4x4 about it as a float4. method ‡ MorphMethodType source (core) [3..*] + translate specifies a translation (XYZ) as a float3. joints source xs:anyURI input (unshared) [2..*] InputLocal rotate, translate source (core) [2..*] + semantic ‡ xs:NMTOKEN sid xs:NCName _ Parents: node, instance_rigid_body, {ref_}attachment, targets _ source xs:URIFragmentType extra shape, technique_common/mass_frame in rigid_body input (unshared) [2..*] InputLocal [0..*] + _ vertex_weights (shared) _ semantic ‡ xs:NMTOKEN count uint source xs:URIFragmentType scale specifies a change in proportions (XYZ) of the axes input (shared) [2..*] + InputLocalOffset as a float3. extra [0..*] + _ vcount [0..1] ListOfUInts lookat describes a position/orientation transformation extra [0..*] + v [0..1] ListOfInts Parent: controller as a float3x3, organized as three vectors in order: eye extra [0..*] + position, interest point, up-axis direction. ‡ method: NORMALIZED, RELATIVE. Default = NORMALIZED extra [0..*] + semantic: see note for input (shared) matrix describes a homogeneous transformation as a Parent: controller float4x4, organized in column-major order. ‡ semantic: see note for input (shared) scale, lookat, matrix sid xs:NCName Camera Elements [5] Data Flow Elements [5] Parent: node Declares a view into scene hierarchy or graph. Contains Declares a data repository that provides values according elements that describe the camera’s optics and imager. to the semantics of an input element that refers to it. Declares the storage for a homogenous array of ID camera source (core) reference values of type xs:IDREFS. id xs:ID id xs:ID name xs:NCName IDREF_array name xs:NCName asset [0..1] + asset [0..1] + id xs:ID optics + IDREF_array [0..1] + name xs:NCName Name_array [0..1] + count uint imager [0..1] Parent: source (core) _ = bool_array [0..1] + _ technique (core) [1..*] [0..1] float_array [0..1] + _ profile xs:NMTOKEN int_array [0..1] + Declares the storage for a homogenous array of type _ any [0..*] xs:any technique_common [0..1] ListOfInts, which is an xs:list of type xs:long. extra [0..*] + _ accessor + int_array extra [0..*] + technique (core) [0..*] + id xs:ID Parent: library_cameras Parents: morph, animation, mesh, convex_mesh, skin, spline name xs:NCName count uint Declares an access pattern to one of the array elements: Describes the apparatus on a camera that projects the float_array, int_array, Name_array, bool_array, minInclusive ‡ xs:integer image onto the image sensor. and IDREF_array. maxInclusive ‡ xs:integer optics Parent: source (core) technique_common accessor ‡ Defaults: minInclusive = -2147483648, orthographic + count uint maxInclusive = 2147483647 = perspective offset ‡ uint + source xs:anyURI _ technique (core) [0..*] + Declares the storage for a homogenous array of type stride ‡ uint ListOfFloats, which is an xs:list of type xs:double. profile xs:NMTOKEN _ any [0..*] xs:any _ param (core) name [0..*] xs:NCName float_array extra [0..*] + sid xs:NCName id xs:ID Parent: camera semantic xs:NMTOKEN name xs:NCName type xs:NMTOKEN count uint Describes the field of view of an orthographic camera. Parent: source/technique_common digits ‡ xs:short ‡ Defaults: offset = 0, stride = 1 magnitude ‡ xs:short orthographic Parent: source (core) xmag TargetableFloat Declares storage for a homogenous array. bool_array uses ‡ Defaults: digits = 6, magnitude = 38 _ ymag TargetableFloat type ListOfBools, an xs:list of type xs:boolean. Name_array = uses type ListOfNames, an xs:list of type xs:Name. [0..1] aspect_ratio = TargetableFloat Declares the input semantics of a data source and _ connects a consumer to that source. _ ymag TargetableFloat bool_array, Name_array aspect_ratio [0..1] TargetableFloat id xs:ID input (shared) InputLocalOffset znear TargetableFloat name xs:NCName offset uint zfar TargetableFloat count uint semantic ‡ xs:NMTOKEN Parents: optics / technique_common Parent: source (core) source xs:URIFragmentType set uint Parents: lines, linestrips, polygons, polylist, triangles, Describes the field of view of a perspective camera. Describes information about/related to its parent element. trifans, tristrips, vertex_weights xfov and yfov values are in Euler degrees. ‡ semantic: The common semantic attribute values are: perspective extra {TEX}BINORMAL, CONTINUITY, IMAGE, INPUT, WEIGHT, id xs:ID INTERPOLATION, INV_BIND_MATRIX, UV, VERTEX, JOINT, xfov TargetableFloat LINEAR_STEPS, NORMAL, OUTPUT, TEXCOORD, POSITION, _ yfov TargetableFloat name xs:NCName = type xs:NMTOKEN MORPH_{TARGET, WEIGHT}, {TEX}TANGENT, = [0..1] aspect_ratio TargetableFloat asset [0..1] + {IN, OUT}_TANGENT _ yfov TargetableFloat _ technique (core) [1..*] _ aspect_ratio [0..1] TargetableFloat profile xs:NMTOKEN znear TargetableFloat _ any [0..*] xs:any Lighting Elements [5] zfar TargetableFloat Parents: animation, animation_clip, attachment, box, Declares a light source that illuminates a scene. Parents: optics / technique_common camera, bind_material, capsule, COLLADA, controller, light cylinder, control_vertices, convex_mesh, effect, id xs:ID force_field, format_hint, geometry, image, imager, name xs:NCName Extensibility Element [5] instance_*, joints, library_*, light, lines, linestrips, asset [0..1] + material, mesh, morph, node, optics, pass, plane, Declares information used to describe some portion of the physics_material, physics_model, physics_scene, technique_common content. Each technique applies to an associated profile. polygons, polylist, profile_CG, profile_COMMON, ambient (core) + technique (core) profile_GLES, profile_GLSL, ref_attachment, rigid_body, _ = directional point + + rigid_constraint, sampler_*, scene, shape, skin, profile xs:NMTOKEN sphere, spline, surface, targets, tapered_capsule, spot + _ any [0..*] xs:any tapered_cylinder, triangles, trifans, tristrips, technique (core) [0..*] +  Parents: extra, source (core), light, optics, imager, texture_pipeline, texture_unit, vertex_weights, vertices, extra [0..*] + force_field, physics_material, physics_scene, rigid_body, visual_scene, and technique (FX) (in profile_CG, Parent: library_lights rigid_constraint, instance_rigid_body, bind_material profile_COMMON, profile_GLES, and profile_GLSL) Lighting Elements Continued ©2010 Khronos Group - Rev. 1110 www.collada.org
  4. 4. COLLADA 1.4 Quick Reference Card - Page 4 Lighting Elements (continued) Physics Model Elements [6] Defines the center and orientation of the rigid body. Describes an ambient light source. Allows for building complex combinations of rigid bodies mass_frame ambient (core), directional and constraints that may be instantiated multiple times. translate + = rotate + _ color TargetableFloat3 physics_model [1..*] sid xs:NCName id xs:ID Parent: rigid_body/technique_common Parent: light/technique_common name xs:NCName asset [0..1] + Contains or refers to information that describes basic Describes a spot light source. rigid_body [0..*] + geometric meshes. spot _ rigid_constraint [0..*] + instance_physics_model [0..*] + convex_mesh color TargetableFloat3 extra [0..*] + convex_hull_of xs:anyURI constant_attenuation [0..1] TargetableFloat Parent: library_physics_models source (core) [1..*] + _ linear_attenuation [0..1] TargetableFloat vertices [0..1] + quadratic_attenuation [0..1] TargetableFloat Describes simulated bodies that do not deform. lines [0..*] + falloff_angle [0..1] TargetableFloat rigid_body linestrips [0..*] + falloff_exponent [0..1] TargetableFloat sid xs:NCName polygons [0..*] + Parent: light/technique_common name xs:NCName _ = polylist [0..*] + [0..1] [0..*] triangles [0..*] + Describes a point light source. technique_common dynamic [0..1] - trifans [0..*] + point tristrips [0..*] + color TargetableFloat3 mass [0..1] TargetableFloat mass_frame [0..1] + extra [0..*] + _ constant_attenuation ‡ [0..1] TargetableFloat _ _ inertia [0..1] TargetableFloat3 Parent: geometry linear_attenuation ‡ [0..1] TargetableFloat quadratic_attenuation ‡ [0..1] TargetableFloat instance_physics_material + InstanceWithExtra Parent: light/technique_common = Connects components, such as rigid_body, into [0..1] physics_material + ‡ Defaults: constant_attenuation = 1.0, shape [1..*] + complex physics models with moveable parts. linear_attenuation = 0.0, quadratic_attenuation = 0.0 technique (core) [0..*] + rigid_constraint extra [0..*] + sid xs:NCName Parent: physics_model Physics Material Element [6] name xs:NCName Describes the physical properties of an object. ref_attachment Describes components of a rigid_body. rigid_body xs:anyURI physics_material id xs:ID shape translate + name xs:NCName hollow [0..1] - = rotate + [0..*] extra [0..*] + asset [0..1] + mass [0..1] TargetableFloat technique_common density [0..1] TargetableFloat attachment dynamic_friction ‡ [0..1] TargetableFloat instance_physics_material + InstanceWithExtra rigid_body xs:anyURI _ _ restitution ‡ [0..1] TargetableFloat = [0..1] physics_material + translate + static_friction ‡ [0..1] TargetableFloat technique (core) [0..*] + instance_geometry + = rotate + _ plane - [0..*] extra [0..*] + extra [0..*] + Parents: library_physics_materials, shape, box - _ technique_common {instance_}rigid_body/technique_common sphere - enabled ‡ [0..1] - = interpenetrate ‡ [0..1] - ‡ {dynamic, static}_friction, restitution: Default = 0 cylinder - _ tapered_cylinder - limits [0..1] - capsule - spring [0..1] - FX: Rendering Elements (COMMON) [8] tapered_capsule - technique (core) [0..*] + Describes a specularly shaded surface where the translate + extra [0..*] + = Parent: physics_model specular reflection is shaded according to the Blinn BRDF [0..*] rotate + approximation. In the diagram, * = common. extra [0..*] + ‡ Defaults: enabled = True, interpenetrate = False blinn, phong Parents: {instance_}rigid_body/technique_common emission [0..1] + *_color_or_texture_type ambient (FX) [0..1] + *_color_or_texture_type Describes a diffuse shaded surface that is Describes color attributes of fixed-function shader diffuse [0..1] + *_color_or_texture_type independent of lighting. In the diagram, * = common elements inside profile_COMMON effects. specular [0..1] + *_color_or_texture_type lambert emission, reflective, common_color_ _ shininess [0..1] + *_float_or_param_type emission [0..1] + *_color_or_texture_type ambient (FX), diffuse, or_ texture_type reflective [0..1] + *_color_or_texture_type specular, transparent ambient (FX) [0..1] + *_color_or_texture_type color - reflectivity [0..1] + *_float_or_param_type diffuse [0..1] + *_color_or_texture_type = param (FX) [1..*] transparent [0..1] *_transparent_type reflective [0..1] + *_color_or_texture_type ref xs:NCName opaque ‡ fx_opaque_enum _ reflectivity [0..1] + *_float_or_param_type texture [0..*] transparency [0..1] + *_float_or_param_type transparent [0..1] *_transparent_type texture xs:NCName index_of_ opaque ‡ fx_opaque_enum texcoord xs:NCName refraction [0..1] + *_float_or_param_type transparency [0..1] + *_float_or_param_type _ extra [0..1] + Parents: technique (FX) in profile_COMMON index_of_ Parents: constant, lambert, phong, blinn ‡ opaque: A_ONE, RGB_ZERO. Default = A_ONE refraction [0..1] + *_float_or_param_type Parent: technique (FX) in profile_COMMON newparam creates a new, named param object in the ‡ opaque: A_ONE, RGB_ZERO. Default = A_ONE FX Runtime, and assigns it a type, an initial value, and Describes a constantly shaded surface that is independent additional attributes at declaration time. of lighting. In the diagram, * = common newparam common_newparam_type constant Describes scalar attributes of fixed-function shader sid xs:NCName emission [0..1] + *_color_or_texture_type elements inside profile_COMMON effects. semantic [0..1] xs:NCName reflective [0..1] + *_color_or_texture_type shininess, reflectivity, common_float_or_ float float reflectivity [0..1] + *_float_or_param_type index_of_refraction, param_type _ float2 float2 _ transparent [0..1] *_transparent_type transparency float [0..1] float3 float3 opaque ‡ fx_opaque_enum = sid xs:NCName float4 float4 transparency [0..1] + *_float_or_param_type = param (FX) [1..*] surface (FX) + fx_surface_common index_of_ refraction [0..1] + *_float_or_param_type ref xs:NCName sampler2D + fx_sampler2D_common Parent: technique (FX) in profile_COMMON Parents: constant, lambert, phong, blinn Parents: profile_COMMON/technique (FX) ‡ opaque: A_ONE, RGB_ZERO. Default = A_ONE©2010 Khronos Group - Rev. 1110 www.collada.org
  5. 5. COLLADA 1.4 Quick Reference Card - Page 5 FX: Texturing Elements (All Profiles) [8] FX: Shader Elements (Other Profiles) [8] newparam creates a new, named param object in the FX Runtime, and assigns it a type, an initial value, and Declares the storage for the graphical representation of Declares and prepares a shader for execution in the additional attributes at declaration time. an object. rendering pipeline of a pass element. newparam fx_newparam_common image shader gles_newparam id xs:ID stage ‡ {cg, glsl}_pipeline_stage sid xs:NCName name xs:NCName annotate [0..*] - fx_annotate_common annotate [0..*] - fx_annotate_common format xs:token compiler_target - _ semantic [0..1] xs:NCName = height uint _ [0..1] compiler_options [0..1] xs:string modifier ‡ [0..1] fx_modifier_enum_common width uint name = [values] † - fx_basic_type_common depth uint source xs:NCName Profile: Effect, GLES asset [0..1] + bind (shader) [0..*] - Parent: For fx_newparam_common: effect ; data ListOfHexBinary Profiles: CG, GLSL For gles_newparam: profile_GLES, profile_GLES/technique _ = Parent: profile_{CG,GLSL}/technique/pass, (FX) init_from xs:anyURI ‡ stage: CG: VERTEX, FRAGMENT ‡ modifier: CONST, UNIFORM, VARYING, STATIC, VOLATILE, extra [0..*] + EXTERN, SHARED GLSL: VERTEXPROGRAM, FRAGMENTPROGRAM Profiles: COMMON, CG, GLSL, GLES † [values]: Includes elements from the following list, Parents: library_images, effect, profile_CG, profile_GLSL, where n is 1, 2, 3, or 4: bool, booln, int, intn, float, floatn, profile_COMMON, profile_GLES; technique (FX) in profile_CG, profile_COMMON, profile_GLES, profile_GLSL Declares all the render states, shaders, and settings for floatnxm, surface (FX), and enum. one rendering pipeline. For fx_newparam_common the list includes sampler{1D, 2D, 3D, CUBE, RECT, DEPTH}. pass sid xs:NCName For gles_newparam the list includes sampler_state and Declares a two-dimensional texture sampler. texture_{pipeline, unit}. sampler2D fx_sampler2D_common annotate [0..*] - fx_annotate_common gl_sampler_2d color_target [0..1] - fx_colortarget_common source xs:NCName depth_target [0..1] - fx_depthtarget_common stencil_target [0..1] - fx_stenciltarget_common newparam {glsl, cg}_newparam wrap_s ‡ [0..1] fx_sampler_wrap_common sid {glsl, cg}_identifier wrap_t ‡ [0..1] fx_sampler_wrap_common _ color_clear [0..1] - fx_clearcolor_common annotate [0..*] - fx_annotate_common minfilter ‡ [0..1] fx_sampler_filter_common depth_clear [0..1] - fx_cleardepth_common _ semantic [0..1] xs:NCName stencil_clear [0..1] - fx_clearstencil_common _ magfilter ‡ [0..1] fx_sampler_filter_common draw [0..1] - fx_draw_common modifier ‡ [0..1] fx_modifier_enum_common mipfilter ‡ [0..1] fx_sampler_filter_common = [values] † - {glsl, cg}_param_type [render_states] † - border_color [0..1] - fx_color_common = = array - {glsl, cg}_newarray_type [1..*] shader + mipmap_maxlevel ‡ [0..1] xs:unsignedByte usertype - cg_setuser_type extra [0..*] + mipmap_bias ‡ [0..1] float Profiles: CG, GLES, GLSL Profile: CG, GLSL Profiles: COMMON, CG, GLSL, External, Effect Parents: profile_{GLSL, CG}, profile_{GLSL, CG}/technique (FX) Parents: profile_CG/technique (FX) and Parents: newparam, setparam, usertype, array, shader/bind profile_GLSL/technique (FX). pass is also a child of Child usertype excluded from glsl_newparam profile_GLES/technique (FX), in which case it excludes the ‡ wrap_s, wrap_t: NONE, WRAP, MIRROR, CLAMP, child element shader. ‡ modifier: CONST, UNIFORM, VARYING, STATIC, VOLATILE, BORDER. Default = WRAP EXTERN, SHARED minfilter, magfilter, mipfilter: NONE, NEAREST, LINEAR, † [render_states]: Refer to the Render States subsection in the description of pass in the specification. The † [values]: Includes elements from the following list, where {NEAREST, LINEAR}_MIPMAP_NEAREST, n is 1, 2, 3, or 4: bool, booln, int, intn, float, floatn, string, {NEAREST, LINEAR}_MIPMAP_LINEAR, Default = NONE schema indicates use of group gl_pipeline_settings for profiles GLSL or CG, and gles_pipeline_settings for GLES. sampler{1D, 2D, 3D, CUBE, RECT, DEPTH}, and enum. Defaults: mipmap_maxlevel = 255, mipmap_bias = 0 For glsl_newparam the list includes float2x2, float3x3, float4x4, and surface (GLSL), . FX: Texturing Elements (Other Profiles) [8] For cg_newparam the list includes boolnxm, intnxm, half, halfn, halfnxm, fixed, fixedn, fixednxm, floatnxm, and surface. Declares a resource that can be used both as the source for texture samples and as the target of a rendering pass. Declares a two-dimensional texture sampler state for Child elements differ depending on the profile used. element profile_GLES. In the diagram, * = common sampler_state gles_sampler_state surface fx_surface_common sid xs:NCName Defines a texture_pipeline command for combiner- mode texturing. In the diagram, * = gles_texcombiner. type ‡ fx_surface_type_enum wrap_s ‡ [0..1] gles_sampler_wrap init_as_null xs:anyType wrap_t ‡ [0..1] gles_sampler_wrap texcombiner gles_texcombiner_command_type init_as_target xs:anyType minfilter ‡ [0..1] fx_sampler_filter_common constant [0..1]- gles_texture_constant_type init_cube - fx_surface_init_cube_* magfilter ‡ [0..1] fx_sampler_filter_common _ RGB ‡ [0..1] *_commandRGB_type = _ mipfilter ‡ operator ‡ *_operatorRGB_enums [0..1] init_volume - fx_surface_init_volume_* [0..1] fx_sampler_filter_common init_planar - fx_surface_init_planar_* mipmap_maxlevel ‡ [0..1] xs:unsignedByte scale float init_from [1..*] fx_surface_init_from_* mipmap_bias ‡ [0..1] float _ argument [1..3] - *_argumentRGB_type mip ‡ xs:unsignedInt extra [0..*] + alpha ‡ [0..1] *_commandAlpha_type slice ‡ xs:unsignedInt Profile: GLES operator ‡ *_operatorAlpha_enums _ face ‡ fx_surface_face_enum Parents: newparam, setparam scale float format [0..1] xs:token ‡ wrap_s, wrap_t: REPEAT, CLAMP, CLAMP_TO_EDGE, _ argument [1..3] *_argumentAlpha_type format_hint [0..1] - fx_surface_format_hint_* MIRRORED_REPEAT. Default = REPEAT source ‡ *_source_enums size ‡ int3 minfilter, magfilter, mipfilter: NONE, NEAREST, LINEAR, operand ‡ *_operandAlpha_enums = {NEAREST, LINEAR}_MIPMAP_NEAREST, [0..1] viewport_ratio ‡ float2 {NEAREST, LINEAR}_MIPMAP_LINEAR, Default = NONE unit + xs:NCName mip_levels ‡ [0..1] xs:unsignedInt Profile: GLES Default: mipmap_maxlevel = 255, mipmap_bias = 0 mipmap_generate ‡ [0..1] xs:boolean Parents: newparam/texture_pipeline, extra [0..*] + setparam/texture_pipeline, pass/texture_pipeline/value Defines a texture unit that will be mapped to hardware ‡ RGB, RGB/operator: REPLACE, MODULATE, ADD, ADD_ Profiles: COMMON, CG, GLES, GLSL, External, Effect texture units based on its usage in texture_pipeline commands. SIGNED, INTERPOLATE, SUBTRACT, DOT3_{RGB, RGBA} Parents: COMMON - newparam, setparam; CG - newparam, setparam, array, shader/bind, usertype; alpha, alpha/operator: REPLACE, MODULATE, ADD, GLES - newparam, setparam, texture_unit; texture_unit gles_texture_unit ADD_SIGNED, INTERPOLATE, SUBTRACT GLSL - newparam, setparam, array, shader/bind sid xs:NCName alpha/argument/source: TEXTURE, CONSTANT, PRIMARY, ‡ type: UNTYPED, 1D, 2D, 3D, RECT, CUBE, DEPTH surface [0..1] xs:NCName PREVIOUS. init_from/face: POSITIVE_{X,Y,Z}, NEGATIVE_{X,Y,Z}. _ sampler_state [0..1] xs:NCName Default = POSITIVE_X [1..*] alpha/argument/operand: ONE_MINUS_SRC_ALPHA, texcoord [0..1] SRC_ALPHA. Default = SRC_ALPHA Defaults: size = 0 0 0, viewport_ratio = 1 1, mip_levels = 0, mipmap_generate = False, semantic xs:NCName init_from/mip, init_from/slice = 0 Profile: GLES Parents: setparam, newparam Texturing Elements (Other Profiles) Continued ©2010 Khronos Group - Rev. 1110 www.collada.org

×