Maya2mgfe v.1.0
Maya to MGFE
file format translator

Version 1.0, November 1998

Roberto Jiménez
Graphics Group of Girona (GGG)

Introduction

The "standard" scene format at the GGG for realistic image synthesis is the MGFE format. Files written in this format can be obtained for instance through manual file edition using one's favourite editor. Alternatively, they can be written by the maya2mgfe plug-in, described herein, developed by our group in order to be able to adapt scenes generated by Alias|Wavefront's Maya.

What does version 1.0 support?

Maya2mgfe v. 1.0 translates:

Example

The following example shows a comparison between an original scene, which was modeled using Alias|Wavefront's Maya, and the scene generated by the plug-in. Two animations are shown in Figure 1: the first one was generated by Maya and the second by Multi-Frame, an aplication based on [1], [2] over SIR ("Síntesis de Imágenes Realistas") system, developed by our group. Differences can be appreciated between the two animations. These are due basically to the different input scenes to each one of the rendering systems: the Maya rendering used point light sources whereas the Multi-Frame rendering used area light sources. (To our knowledge Maya doesn't deal with "light" sources represented by incandescent materials.)


Figure 1. Two animations generated by Maya and Multi-Frame respectively.

Click here to see the generated MGFE file.

User's guide

Once the plug-in is loaded, use "File | Export All" to execute it to translate the entire scene. To export just the selected objects use "File | Export Selection", and the selected objects together with their properties (material, associated transform, animation channels) will be translated. Within the popped dialog box (as shown in Figure 2) the user can set the following parameters: If the user does not activate the dialog box, the plug-in will translate the scene with the last values of these parameters.

figure2

Figure 2. Dialog box associated to the plug-in.

Implementation details

To make this new plug-in we need to access to the internals of Maya. Maya API (Application Programmer Interface) provide us this internal access. There ara two graphs in Maya internals we can read to translate the scene: DAG and Dependency Graph. The DAG (Direct Acyclic Graph) is composed of two types of DAG nodes, transforms and shapes. Transform nodes maintain transformation information as well as parenting information. The dependency graph is used to read the information about animation and materials. This graph maybe cyclic and include the DAG. All the information in the scene can be read from these graphs.

Maya API provides us several kind of plug-ins. Each kind can be developed making a new class derived from the correspondent class in the hierarchy Maya provide.

We define a new maya2mgfe class that derives from MPxFileTranslator class. This class permit us to receive a message when the user wants to translate the scene. This class has two basic methods: reader and writer. We only use writer.

Basically, as explained above, we translate the following information:

The DAG permit us the access to all the information we need to read geometry and cameras. We read the geometry as meshes, cameras, and its associated transformations. These transforms can be distributed in a hierarchy, i.e, if the scene is a hand, we could have a transformation applied to the fingers, and other transformation applied to the entire hand.

From the geometry or camera we access the dependency graph to read the information about animations and materials associated with it. In Figure 3 we can see a hierarchy of a simple scene. It is formed by a group with only two objects.

figure3

Figure 3: Objects hierarchy in a simple scene

To read the information about the animation and materials, we should navigate from an object through the dependency graph, that is, to find the information about animation we should navigate through the links named { scaleX, scaleY, scaleZ, rotateX, ..., translateZ}. Figure 4 and Figure 5 show each kind of information in the maya hypergraph, that is, materials and animation.

Figure 4. A selected mesh "pCubeShape1" connected to a lambert shading group

In
Figure 5 each channel animates one kind of transformation in the object. This channel can be associated with a shape transform or other higher transform in the hierarchy. In the image, the animation channels affect to the entire group and no object in the group has animation channels.

Figure 5. An animation with keyframes.

Things to do

In order to cover the evolving requirements of the GGG, we plan to incorporate the following improvements to following releases (Note: entries are listed in no particular order, i.e. their priorities must still be fixed by our group):

References

  1. G. Besuievsky and M. Sbert. The Multi-Frame Lighting Method: A Monte Carlo Based Solution for Radiosity in Dynamic Environments. In X. Pueyo and P. Shoeder (editors) Rendering Techniques '96 (Proceedings of the Seventh Eurographics Workshop on Rendering) June, 1996.

  2. G. Besuievsky and X. Pueyo. Animating Radiosity Environments Through the Multi-Frame Lighting Method. Journal of Visualization and Computer Animation (to appear).

Last modified: Monday, 18-Dec-2000 17:40:55 MET
You can drop us a note (
rjimenez@ima.udg.es)