Chap. 17B --- Using Maya

The Maya Wild Pockets Exporter

This chapter explains how to use the Wild Pockets Exporter for Maya. It will explain how to install the exporter, model efficiently for Wild Pockets, create collision volumes, and other important topics.

Installing the Exporter

There are two files that must be on your computer to make the exporter work properly. One is the MEL Script that is the exporter itself, and the other is the executable file CURL.EXE.

The MEL script can be placed anywhere on your system. You can invoke it by dragging it into the Maya window. The program curl.exe should be dropped into your Windows directory (probably C:\Windows).

Preparing your Models

Now that you have made the exporter, you need to make sure you models are ready. When it comes to modeling resolution, there are no true limits, but it is suggested that none of your models should be over 3,000 triangles. This will help the game run smoothly.

It is important to get the scale right! One Maya unit translates to one Wild Pockets meter. A Human should be modeled about two meters high: ie, two Maya units. Adjust the Maya grid if it helps you to remember.

Next, placing the object correctly on the coordinate grid is very important. In general, the object should always be neatly on top of the coordinate origin. If it's an object that has a "front", the front should be facing toward the -Z axis. For example, if it's a character, the character should face the -Z axis.

Exporting a Scene

The exporter window contains a big "EXPORT SCENE" button. When you push this, the exporter will ask you to log in (if you are not already logged in) and then ask you for a name for the file. It will then create the file directly inside your Wild Pockets library, not on your hard drive. After the export, a dialog will appear telling you whether or not the export was a success. During the export, it may appear as if Maya has stopped responding. Don't worry, it more than likely hasn't. Be patient, and your export will finish.

Controlling the Center of Mass

Usually, the physics system does a reasonable job of selecting a center-of-mass for your object. However, if you don't like its choice, you can take matters into your own hands.

To control the center of mass, click the "Create Center of Mass" button. This will create a locator. Position this locator where you want the center of mass to be.

If you want further control, you may check the "Use Center of Mass axes for inertia calculations" box. This will enable you to use the axes of the locator to describe the object's moment of inertia. For further information, see the Help button in the top-right corner of the Exporter.

Controlling the Collision Volumes

The Wild Pockets exporter allows you two add two kinds of collision volumes: boxes and spheres. To add these to your scene, press their corresponding buttons on the Exporter window. Note that regardless of how you organize your Hypergraph, only collision volumes that you create using these buttons will be used as collision. Anything else will be rendered.

Place these collision objects so that they "cover" the overall shape of your model. It is fine for them to overlap. You should use at most four or five volumes per object. Of course, it will usually not be possible to exactly replicate the shape of the model using a few volumes. Just approximate as closely as you can.

Note, spherical collision volumes are limited: they must stay perfect spheres! Turning them into ellipses by scaling them nonuniformly doesn't work. Only true spheres can be exported. You can rotate and scale collision boxes as needed. For further information, see the Help button in the top-right corner of the Exporter.

Applying Textures

Wild Pockets supports three kinds of textures: diffuse maps, gloss maps, and norrmal maps. They should be attached to lamberts if you're not using a gloss map or phongs if you are. The diffuse map can be jpg or png, and should be attached to the lambert or phong's color. The gloss map must be a black/white jpg, and should be attached to the phong's specularColor. The normal map must be a colored jpg (it will look bluish if it's a proper normal map), and should be attached to the lambert or phong's normalCamera. If you supply both a normal map and a glossiness map, they must be the same size.

Texture sizes must be powers of two: ie, 4, 8, 16, 32, 64, 128, 256, 512, or 1024. They don't have to be square: for example, you can use a texture that's 512x64.

Exporting Animations

To export an animation, hit the "EXPORT ANIMATION" button, which will act like the "EXPORT SCENE" button, but will upload the animation for the file instead. With the "All Frames in Timeline" button selected, it will export the whole animation as one file. With the "Range of Frames" button selected, you may input a starting frame and an ending frame. The "EXPORT ANIMATION" button will then export only that range of frames, in case you want to store multiple animations in the same file. For further information, see the Help button in the top-right corner of the Exporter.


The Exporter will allow you to set a default script class for your object, so that when it is added to the scene it will automatically be of that class. Before you export, put the name of the script containing the class in the "Script containing class" field and the class name itself in the "Default class name" field. Then, when you export, the Scene Object will be set to this script class by default. Ask your scripter for details, and for further information, see the Help button in the top-right corner of the Exporter.


Keywords will enable you to add search terms to your model or animation, so that it can be more easily found in the library. For whichever you are exporting, click on the corresponding "Add/Edit Keywords" button to bring up the keywords for that model or animation. To add a keyword, type it into the box and click "Add Keyword." To remove a keyword, select it and click "Remove Selected Keyword." When you have created your keyword list, click "OK." When you export your art, it will be exported with these keywords, which you can then use to search the Wild Pockets library for them. As always, for further information, see the Help button in the top-right corner of the Exporter.