Latest  | Search | Go
Edit this page   |   Attach file 

  Home | Tutorials | Technical Reference | Runtime | API Documentation | MayaExportingGuide  

Maya Exporting Guide

This text is written with Reality 11.8 in mind and assumes that you are using the .x exporter from the directX february 2005 sdk (see MayaPlugin).

Static Geometry

Just click the "Rebuild all" button in the directx menu and then "Export all", the scene/object is now ready to be imported into RB, however there are a couple of things that you have to take into consideration when moving your geometry from Maya into RealityBuilder.

  • Export selection does not work, the feb2k5 exporter always exports everything in your scene.
  • The currently active UVsets will always be the default "uv 0" sets in the .x file.
  • The feb2k5 exporter will split up your mesh and create 3 unique vertices for every triangle (see below under animated meshes for more info).
  • If there are problems with object positioning etc in RB ungroup and unparent all the objects in Maya and freeze transform them before exporting.
  • Don't worry if your textureinfo doesn't show up in mView like with older .x exporters, feb2k5 only exports material settings if you have a direcx preview-pipeline shader assigned to the object.

Skinned Meshes

Read up on general info about SkinnedMeshes in RB.

To export the "base" model make sure you have the Capture Skin option checked in the directX menu, do a Rebuild All and export scene, in the options make sure you have skinning set to true and animation to false.

To export the animations do a "Rebuild all" and then "Gather animation", feel free to omit mesh, skinning and material info when exporting the animations since RB only reads the joint data when importing animations.

The feb2k5 exporter splits each triangle and creating unique vertices which results in a vertex count 3 times as high as the polycount on your mesh, which in itself can be pretty bad but seriously raise the datasizes when you have lots of joints in a character. This can be somewhat fixed by using the weld vertices function in the mView util (included in the dx9 sdk), just make sure you dont set the tolerance values too low as it will screw up your uv:s and weighting info.

Sometimes the exporter seems to have no idea whats going on with the skin weights and exports your Mesh with totally wrong weights on some vertices, reloading the scene in maya may help, or just slightly adjusting the weighting on the affected vertices and then reexporting.

Also it might be worth noting that meshes facing the z+ axis in Maya will be facing the z- axis in RB

Some workflow tips

We made a couple of quick and dirty mel scripts to get big scenes from maya into RB without having to export every object by itself and apply material by hand in RB.

Put the mel files in your scripts dir and source them, they are provided as is and may or may not work on your scenes (ie backup stuff).

Keep in mind that those scripts does not actually "parse" the RB xml files, they just do simple line/word comparsions and overwrite stuff, they are likley to need updating as changes in the map format is made. This also means they might break map files, so we take no responsibility for them, use at your own risk.

The shaderMakerRB script will find texturenames from your scene and apply them to objects with the diffuse.fx shader in a reality map file. *Note that any existing material list in the xml file will be overwritten. It is very easy to modify the script to use any other shader than the default diffuse one, or to have it pull other info from the maya shaders than the file texture, see the actual mel file for more detailed information.

Here is a rundown how to use it:

  • Unparent and ungroup every object you wish to export (delete any dagnodes that you don't wish to export). Freeze transformations and export the scene.
  • Open the file in mView and weld vertices (Optional).
  • Import the scene into RB and save it as a map.
  • Make sure all the textures needed for your scene are in the reality texture dir and saved as .tga
  • In maya with the same scene file still open run "shaderMakerUI" and pick the map as in file and enter a new map-name as outfile, click "Fix"
  • You should now be able to open the fixed map in RB and see all the textures applied. (Note that the script does not support submaterials).

One problem still is that when exporting big scenes to a single .x file and importing it into RB you get everything as one single object with multiple sub-objects, and the RB modifier "Split object" does not work because the object contains multiple sub frames.

A pretty ugly fix for this is the script splitObjects.mel, basically it goes into a saved map file and finds every .buf and makes a single object out of it. The script does not care for anything else in the map file except the material list, and will remove any lights or actors. Still it works fine to run it directly after you have done the above shaderMakerRB stuff. Also this script assumes you used freeze transform in maya before exporting any objects. Run it with "splitObjectsUI", see the script itself for more detailed information.

- Björn Sunesson (Tarsier Interactive) 25 Feb 2005

Attachment sort Action Size Date Who Comment
splitObjectsRB.mel manage 5.9 K 08 Mar 2005 - 17:19 Main.guest fixed a stupid issue with the fake guid
shaderMakerRB.mel manage 10.4 K 26 Feb 2005 - 02:06 Main.guest  

MayaExportingGuide   Edit | Attach | Ref-By | Printable | Diffs | r1.2 | > | r1.1 | More