Chap. 17A --- Using 3D Studio Max

Max Modeling for Wild Pockets

This chapter is about how to model in 3D Studio Max for Wild Pockets with the best possible results. This tutorial 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 a Max plugin with a DLO extension, the other is the executable file CURL.EXE. You must choose the right plugin for your version of Max. The plugin DLO contains the Max version number in its filename. For example, the right plugin for Max 2008 is the DLO with 2008 in its filename. If you're using a 64-bit version of Max, make sure to download an x64 version of the DLO. The DLO file must be dropped into the Max plugins directory (which is normally located at 'Program Files/Autodesk/3D Studio Max/plugins'). The program CURL.EXE should be dropped into your windows directory.

The Export Helper

Most Max export plugins show up in the File/Export menu. The Wild Pockets exporter is an exception! The Wild Pockets exporter is a helper object. You must add the export helper to your scene. Go to the creation tab in Max, and select the helpers category. In the drop-down menu, a new item should show up entitled Exporters. Select this and then left-click the WildPockets button. With this highlighted, left-click anywhere in your scene to create the export helper, which should look like a green wireframe. This is the WildPockets exporter; it does not change size, and its location does not matter, so once you place the object, you can ignore it until you are ready to actually export your meshes. You should only put one of them in your scene.

The Exporter's Interface

Once you place the exporter in your scene, you can continue to work with it by selecting it and going to the Modify Tab. The exporter can subdivide your Max file into multiple art assets. For example, if you model a scene with a tree and a house, the exporter can export the tree into one file, and the house into a different file. You must configure which meshes go into which files. To make this possible, the export helper modify panel contains these buttons:

In addition, the export helper modify panel contains a big "Export Now" button. When you push this, the exporter will create all the art asset files in the list. These files are created directly inside your Wild Pockets library, not on your hard drive. After adding your meshes to the exporter, they will be listed within the exporter according to their filename and the type. If you do not want to be asked whether or not writing over a file is okay, check the 'Overwrite Existing File' box.

The Add Dialog

To tell it to create an art asset, click the 'add' button in the export helper modify panel. This brings up the 'add' dialog. The add dialog contains many questions. Most of these questions can be ignored at first, but some have to be answered. Here are the questions you must answer:

In addition, you may be interested in these additional questions, but normally, you can just leave them at their default values:

Make a Wild-Pockets-Compatible Model

You need to create models that are compatible with Wild Pockets. Not everything that you can create in Max will work in Wild Pockets. The following is a checklist of things that you need to do in a Wild-Pockets-Compatible way:

Each of these is explained below.

Get the Scale Right

One Max unit translates to one Wild Pockets meter. A Human should be modeled about two meters high: ie, two Max units. This is going to look a little funny, because the default Max grid is too big for this to look right. Adjust the Max grid if it helps you to remember.

Face your Model in the Right Direction

There are two ways to orient a model: using the Max Grid, or using a Compass Helper.

Option 1 is to use the Max Grid. When using the Grid, the character must be facing toward the +Y axis of the grid. You will need to rotate the character such that when he moves forward, his Y coordinate is getting bigger.

Option 2 is to use the Compass Helper. Use the Max creation panel to create a Compass Helper object. In this case, the character must be facing 'north' according to the compass. You can accomplish this by turning the character, or by turning the compass. Either way, just make sure the north-arrow on the compass is pointing the same way as the character is facing.

Center the Model Properly

There are two ways to center a model: using the Max Grid, or using a Compass Helper.

Option 1 is to use the Max Grid. When using the grid, the grid center must be directly under the character's feet. If it's the kind of object that moves off of the ground, it may be desirable to put the grid center right in the middle of the object - this would be ideal for a model such as an airplane or a basketball.

Option 2 is to use the compass helper. In that case, the compass helper should be directly under the character's feet - or in the case of an object that doesn't stay on the ground, in the object's center.

Creating Collision Volumes

The Physics system pays no attention to the polygons of your model: objects pass right through polygons. To make your object substantial, you must give it collision volumes: simple, primitive shapes that approximate the overall shape of your mesh.

The Wild Pockets exporter interprets Atmospheric Apparatuses as collision volumes. Atmospheric Apparatuses can be found under the Helpers category where the exporter was originally. Here, you should see two important types: BoxGizmo and SphereGizmo. DO NOT USE CylGizmo! It does not do anything. 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 hemispheres by setting the hemisphere flag doesn't work. Also, 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. You should name your collision volumes appropriately so you do not get them confused with other objects that may exist in your scene.

Managing the Center of Mass

Your model has two centers: the 'mathematical center' which is considered coordinate (0,0,0), and the 'center of mass' that the object tends to spin around when it has rotational inertia. For example, with a human character, the mathematical center is usually placed directly between the feet, but the center of mass is usually around the pelvis.

Usually, the physics system does a reasonable job of selecting a center-of-mass for your object. It does so by studying the layout of your collision volumes and by assuming that they are of uniform density. However, if you don't like its choice, you can take matters into your own hands. To control the center of mass, put a point helper in your scene. Position this point helper where you want the center of mass to be. You must check the following boxes in the point helper:

If you do not check this exact combination, the point helper will be ignored.

Wild-Pockets-Compatible Materials

Max has dozens if not hundreds of material types. Wild Pockets understands only two of these: Standard Materials, and Multi/Sub-Object materials. Nothing else is understood, the exporter will complain if you use anything else.

Furthermore, the material editor contains hundreds of check boxes, sliders, and color settings that you can configure. Once again, Wild Pockets understands almost none of these. The only things that Wild Pockets does understand are the filenames of the Diffuse Map, the Glossiness Map, and the Normal Map. The diffuse map can be JPG or PNG. The glossiness map must be a black/white JPG or PNG. The normal map must be a colored JPG or PNG - it will look bluish if it's a proper normal map.

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.

Heed Performance Limits

There are a number of things you can do that will slow Wild Pockets down. This includes using too many polygons, using too many models, using too many textures, and so forth. See the chapter on profiling your game to learn more about Wild Pockets's performance limits.

The Export Now Button

When you hit the Export Now button, the exporter will attempt to upload your models to the Wild Pockets file server. At this time, you will see several black windows with numbers and words flashing by rapidly. This is supposed to happen. After the export, a dialog will appear telling you whether or not the export was a success.