Go to Top

Exporting from Maya to COLLADA format with OpenCOLLADA

(c) copyright Zehne Ziba Co., Ltd. For more information, please refer to copyright notice.

Download and install the OpenCOLLADA plug in for Maya from https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools

Open Maya or restart if it was open when you installed.

Go to windows | Preferences | Plug-in Manager and make sure the OpenCOLLADA plug in is checked and in use.

Open up your scene and choose File | Export All.

Click Options button. This will open the Export All Option dialog.

Select OpenCOLLADA from the drop down box.

OpenCOLLADA_MAYA

A picture showing the available COLLADA exporter options

General Export Options

Bake Matrices

The transforms of each scene node and their animations will be exported as matrices.

Relative Paths

Whether the absolute or relative file path will be written to the COLLADA document. Mostly impacts texture and shader filenames.

Copy Images

This will copy all the texture files (diffuse, normal, alpha, etc) beside your .DAE file.

Triangulate

Divides your polygons into triangles

Cgfx file references

CgFX format is a shader format used by Cg to define the appearance, or effects, of 3D objects. This file stores source code in a plain text format and is referenced by various games and other programs that use NVIDIA’s CgFX technology.

This option will copy all the Cgfx files beside your .DAE file.

Sampling

makes your animation export correctly and smooth.

Curve Constrain

Constrains the sampled times to a curve’s range.

Static Curve Removal

A curve is considered to be static if it would return the same value regardless of the evaluation time. This basically means that the values of all the keys are the same and the y component of all the tangents is 0. This option removes static curves which influence nothing.

Filter Export

Polygon Meshes

A polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling. This option lets you export objects created with polygon meshes.

Lights

Lets you export ambient, directional, point and spot lights.

Cameras

Exports perspective and orthographic cameras.

Joints and Skin

If you have characters with skeleton in your scene, you should check this option. This option exports all the information required for skinning algorithm.

Animations

Self explanatory. Lets you export animations.

Invisible nodes

An invisible node is the node of any hidden object in your scene. This option lets you export invisible nodes.

Default cameras

Exports default Maya cameras. To export default Maya cameras, you should also check invisible nodes option to activate this option.

Texture coordinates

This option exports all texture coordinates.

Normals

Lets you export normal vectors.

Normals per vertex

COLLADA files can use one normal per polygon per vertex, especially to account for smoothing related to the same vertex being part of multiple polygons. Thus it is possible to have far more normals than vertices and in the combined index, each vertex can be associated with multiple normals. This option lets you export normals per polygon per vertex.

Vertex colors

Each vertex in a mesh can optionally store a RGB color value, called vertex color. These can be used for a variety of interesting effects and shader inputs.

Vertices can also store vertex alpha, which can be used for multitexturing, transparency, or ambient occlusion.

This option lets you export vertex colors.

Vertex colors per vertex

A single vertex can be assigned multiple vertex colors. Thus it is possible to have far more colors than vertices and in the combined index, each vertex can be associated with multiple colors. This option lets you export multiple colors per vertex.

Texture tangents

Exports tangents and binormals in texture space. This is the typical use-case for “tangent space” normal maps.

Texture tangents

Exports tangents and binormals in geometric space. This is the typical use-case for “object space” or “world space” normal maps.

Reference materials only

Exports the materials used in your scene. Note that this option does not disable other export options.

Materials only

Disables other export options and exports materials only.

XRef options

Export references

Exports external references used in your scene.

Dereference

References external elements in COLLADA file.

Here’s an example of de-referencing in COLLADA file:

<instance_geometry url=”file:///models/car.dae#carGeometry” />

This <instance_geometry> references the <geometry> element whose id is carGeometry in the document file:///models/car.dae.

Camera options

Export camera as lookat

Describes the camera with three parameters:

  • Camera position
  • Interest position
  • The direction that points up

Here’s an example of a camera exported as lookat:

<lookat>0 2 0  2.5 2 -4  0 1 0 </lookat>

It simply explains that the camera is at (0, 2, 0) position, looks at (2.5, 2, -4) position and its up vector is (0, 1, 0).

XFov

angle of view describes the angular extent of a given scene that is imaged by a camera.

Field of view may be measured horizontally (from the left to right edge of the frame), vertically (from the top to bottom of the frame), or diagonally (from one corner of the frame to its opposite corner).

This option lets you export horizontal field of view, in degrees.

YFov

angle of view describes the angular extent of a given scene that is imaged by a camera.

Field of view may be measured horizontally (from the left to right edge of the frame), vertically (from the top to bottom of the frame), or diagonally (from one corner of the frame to its opposite corner).

This option lets you export vertical field of view, in degrees.

Angle_of_view.svg

This image depicts horizontal and vertical FOVs.

Precision options

Export double precision

If this option is selected, the maximum number of significant digits to be printed is increased from 7 to 17 significant digits.

These are settings for Maya when exporting to a DAE file for Instancing COLLADA in Vanda Engine 1:

 

Option Recommended setting Issues
Bake transforms No If you check this option, the Vanda Engine 1 crashes.
Relative paths Irrelevant
Copy textures Irrelevant
Triangulate irrelevant Note that Vanda Engine 1 automatically triangulates the meshes.
Cgfx file reference No
Sampling No
Curve constrain No
Static curve removal No
Polygon meshes Yes
Lights Yes Vanda Engine 1 has a built in light editor. COLLADA lights are not as accurate as Vanda Engine 1 lights. However Vanda Engine 1 is able to load COLLADA lights as well.
Cameras Yes Vanda Engine 1 has a default 3rd person and free camera. COLLADA cameras in Vanda Engine 1 are used for cut-scenes.
Animations Yes
Invisible Nodes Yes
Default cameras Yes
Texture coordinates Yes
Normals Yes
Normals per vertex ?
Vertex colors ?
Vertex colors per vertex ?
Texture tangents Yes Normal and parallax maps in Vanda Engine 1 are based on texture tangents.
Geometric tangents No
Referenced materials only Yes Vanda Engine 1 only reads referenced materials.
Materials only No Vanda Engine 1 only reads referenced materials.
Export references No
Dereference No
Export camea as look at No If you enable this option, Vanda Engine 1 positions the cameras incorrectly.
XFov No
YFov Yes
Export double precision No

You should also consider the following facts for Instancing COLLADA in Vanda Engine 1:

1. You should export each character with its own animations as a separate COLLADA scene.

2. Vanda Engine 1 uses a different algorithm to render and animate grasses. You should say Vanda Engine 1 that your exported file refers to grasses. To do this, add a “grass” prefix to your COLLADA file name. Such file should only consist of grass geometries. This section explains how to create, export, and import grasses.

3. Vanda Engine 1 uses a simple algorithm to create PhysX triggers based on the information of a COLLADA file. You should say Vanda Engine 1 that your exported file refers to triggers. To do this, add a “trigger” prefix to your COLLADA file name. Such file should only consist of trigger geometries. This section explains how to create, export, and import triggers.

Click Export All, give your file a name based on the above facts, and click Export.

Related Tutorials

Maya-Animate-Along-Curve-Export-COLLADA-Preview

Animating With A Motion Path In Maya And Exporting To COLLADA

Maya-Tutorial-Export-Multiple-Materials-COLLADA-OpenCollada-Preview

Using Multiple Materials in Maya and Exporting to COLLADA

Next Tutorialarrow-right

Let’s stay in touch!

Never miss a single tutorial, sign up for our monthly newsletter. You can unsubscribe at any time if you wish to stop receiving email newsletters from vandaengine.org

Leave a Reply

Your email address will not be published. Required fields are marked *

Simple Share Buttons