Main_Page

Anonymous Javier Taibo
Attachments
Maya2osg_logo_v1.png (16094 bytes)

Introduction

Maya2OSG is a toolkit to export and import Autodesk® Maya® scenes or models to/from any OpenSceneGraph (OSG) supported file format.

Maya2OSG is developed in C++ and released under GNU GPL v3. It installs as a Maya plug-in and is available from the shelf tab "OSG" or from MEL code as an exporter command (

maya2osg

) and an importer command (

osg2maya

).

We are currently testing the software. User feedback is very much welcome!

For editing, fine-tuning or composing the OSG scenes we recommend the great software OSGEdit.

WARNING: The documentation in this Wiki page is keep up to date with latest SVN code. If you find features not present in your current version, checkout SVN code or wait for the next release. ****

WARNING: If you are testing the GLSL shaders, remember to check your driver version if you experience any GLSL compiling/linking problem. More info in the [GLSL_shaders] page

**NOTE: Remember to add

trunk

directory to SVN URL to access to the last development code.**

svn co https://maya2osg.svn.sourceforge.net/svnroot/maya2osg/trunk maya2osg

Basic information

Features

Exporter (maya2osg)

The Maya to OSG exporter supports the following elements in Maya DAG:

  • [Polygonal_geometry].
    • Per vertex normals .
    • Per vertex colors.
    • Texture coordinates. Support for multiple UV sets.
    • NURBS and subdivision surfaces are not currently supported. To export them, they must be previously converted to polygons.
  • [Scene_hierarchy].
    • Full scene hierarchy is preserved.
    • Transform nodes.
    • Node names.
    • Animated Transform nodes are correctly exported as long as no shearing is applied nor scale/rotation pivot points moved.
  • [Light_sources].
    • Point lights.
    • Directional lights.
    • Spot lights.
    • Ambient, area and volume lights are not currently supported.
  • [Materials/shading].
    • Lambert, Blinn, Phong, PhongE, Anisotropic and HairTubeShader materials exported to OpenGL materials.
    • [GLSL_shaders] currently under development.
    • Planned to support in future releases custom GLSL shaders, maybe through ASHLI.
  • [2D_file_textures].
    • Repeated textures are cached and shared in the scene graph.
    • Maya 2D texture placement node is translated to OpenGL texture matrix.
    • Repeat, clamp and mirror modes are supported.
    • Procedural and/or 3D textures are not currently supported, they must be converted to 2D file textures before exporting the scene.
  • Camera animations
    • Maya AnimCurves or MotionPaths bound to cameras are exported to OSG AnimationPaths.
  • [Cameras]
    • Exports orthographic and perspective cameras to separate OSG files (osgViewer::Viewer config).
    • Camera view and projection matrices, background color and automatic computation of near and far clipping planes.
  • [Particle_systems]
    • Maya Dynamics particle systems and emitters are exported to osgParticle node kit.

Importer (osg2maya)

Command

osg2maya

imports OSG scenes into Maya. It has been incorporated in release 0.3.0.

The OSG importer has the following features and limitations:

  • Scene geometry.
    • Geometry nodes are the only drawable currently supported.
    • Texture coordinate arrays are converted to Maya UV sets.
    • Per-vertex normals.
    • TRIANGLES

,

        TRIANGLE_STRIP

,

        TRIANGLE_FAN

,

        QUADS

,

        QUAD_STRIP

and

        POLYGON

OpenGL primitives are supported.

        POINTS

,

        LINES

,

        LINE_STRIP

and

        LINE_LOOP

primitives are ignored.
* Scene hierarchy.
* Full scene hierarchy is preserved.
* Group and transform nodes.
* Node names are kept when possible, and translated to a Maya valid string when not. Maya assigns a default name to those nodes not named in the OSG file.
* Materials/shaders.
* This feature is under development. Currently only default surface material (lambert1) is assigned.

The import of materials is not a priority in this project. The way I use the OSG importer is to load into Maya OSG geometry so I can modify these models, integrate them in a bigger scene, prepare materials/shaders for them and finally export the result to OSG again. So the only feature I currently need is the import of geometry.

Known bugs

  • Try it and tell me... :)

Additional information


Related

Wiki: 2D_file_textures
Wiki: Binary_distributions
Wiki: Building_and_installing
Wiki: Cameras
Wiki: Development
Wiki: GLSL_shaders
Wiki: Materials/shading
Wiki: Maya2OSG_User_Manual
Wiki: Particle_systems
Wiki: Polygonal_geometry
Wiki: Scene_hierarchy
Wiki: Test_models
Wiki: Windows_installer