[size=14]Introduction[/size]This tutorial points out all the issues you need to be aware of when creating a 3D object for the Red Light Center. This is not an extensive how to for modeling in 3DS Max.
Please note we are still working on adding functionality to the game to automate this process. Eventually you will be able to have you own place for objects.To create objects for the game, you'll need the software Discreet 3D Studio MAX 7 or earlier version. Other 3D software packages are not yet supported by the review and export process.
Triangle CountThe first thing you need to have in mind when making a 3D object for any game is the number of polygons (triangles) that it will have.
Since all the 3D geometry is rendered in real-time, the more complex the geometry of the objects, the more time it will be needed to compute all the information. The result is the annoying screen lag that compromises the quality of the gaming experience. That's why the 3D objects in any game world need to be constructed with a limited number of polygons (triangles).
For Red Light Center, we would like for objects to have no more than 1000 triangles, keeping in mind that "less is better".
So, how to keep track of how many triangles our object has?
Inside 3D Studio MAX 7, there is an utility tool called "Polygon Counter". It can be acessed in the "Utilities" panel, clicking on the "More" button and choosing "Polygon Counter" from the list.
Grouping or AttachingIn order for the 3D objects to be exported correctly, they need to be either grouped together or attached to the same 3D mesh.
To group objects in 3D Studio MAX 7, simply choose "Group" from the "Group" menu. To attach all the objects into one single 3D mesh, select one mesh and on the Modify panel search for the "Attach" button on the list (good for both Editable Mesh and Editable Polys).
PivotFor the object to be placed correctly in-game, we need to set its Pivot. Under the "Hierarchy" panel, click the "Affect Pivot Only" button to move or rotate the Pivot.
The object's pivot needs to respect this orientation:
- The Z-axis (blue) needs to be facing upwards
- The Y-axis (green) needs to be facing back
- The X-axis (red) needs to be facing right
We encourage you to start creating all the 3D objects in the "Top Viewport", that way the Pivot will already be in the correct orientation.
The Pivot needs also to be aligned to the center of object. Do this by clicking on the "Align" button and then selecting the object that you want its Pivot to be aligned to. The "Affect Pivot Only" button needs to be clicked for this. Then, just align the Pivot to the object's X and Y center.
It's also recommended to align the Pivot to the object's base (Z-axis).
[size=14]
Texture Maps and Materials[/size]
Texture resolutionIn order to optimize the system's memory usage, we use texture maps that have "power of 2" dimensions for both width and height. Some "power of 2" values are 2, 4, 8, 16, 32, 64, and so on.
For Red Light Center's objects, we use a maximum texture resolution of 256 (width, in pixels) x 256 (height, in pixels).
We encourage you to test reducing gradually the object's texture resolution to check how much of the quality is lost. If the object uses just a simple tileable texture map, it could be reduced to 64 x 64 or lower. On the other hand, if it has something written on it, it might be necessary to raise the resolution to 128 x 128, or even 256 x 256.
The lower the texture map's resolution, the better (performance-wise).
File formatsThe current game engine supports only JPEG and PNG image formats.
If the texture map doesn't contain any kind of transparency or translucency, such as wooden, plaster or plastic textures, then the recommended format is JPEG (uncompressed/maximum quality).
If the texture map does contain transparency or translucency, then use the PNG format.
MaterialsAll materials and maps assigned to the objects must be named inside 3D Studio MAX 7. The current game engine only supports Diffuse and Alpha maps, so it is mandatory to restrict the materials to only those two. Bump maps and Reflection maps, for instance, will not be rendered by the game.
Simply replace the "01 - Default" text with "<myobject>_MTL", where <myobject> is the name that best represents your object, such as "chair" ("chair_MTL"
, or "sofa" ("sofa_MTL"
. The Diffuse and Alpha (if necessary) also need re-naming. Replace the "Map #0" text with "<myobject>_MAP", for instance "chair_MAP", or "sofa_MAP".
The Lighting properties of the materials will not be interpreted by the game engine, so the "Specular Level" and "Glossiness" values should be left at their default values. To simulate these effects, we recommend using your favourite image editor software (like Adobe Photoshop or Paint Shop Pro) or baking the lights in the texture using the "Render to Texture" feature available on 3D Studio MAX 7.