The Pipeline
The first step in creating a custom vehicle for use in Midtown Madness is to construct a model of the
car body.
Both the car body model and the dashboard model for the Red Rocket, the sample custom vehicle
included in the VCK, were created using 3D Studio MAX v2.5. As you are working with the car body
model files in 3D Studio MAX, pay careful attention to the various LOD (levels of detail) and group
label assignments. The modtypes.ini file specifies required groups and LODs that the Asset
Manager requires in order to correctly process the vehicle. Generally, there are individual groups for
the body, wheels, shadows, and headlights at each LOD. If any of the groups are missing, the Asset
Manager will display an error message and Midtown Madness will not run.
Strictly speaking, 3D Studio MAX is not required to produce a valid working model. A GEO file (found
in c:\vck\shop\geo) is an ASCII file describing the geometry of an object. While the plug-in supplied in
the VCK, artsexp.dle (Angel RealTime Software Exporter), outputs the model into GEO format, any
modeling software capable of producing a valid GEO file is adequate since the Asset Manager uses
the GEO file as input, not the MAX file.
After the exporter produces a GEO file, the Asset Manager (c:\vck\angel\am.exe) is called to
translate the geometry into two forms: dlp and bms. DLP is essentially a binary version of the GEO file
and is used to render vehicles in the game's user interface. The BMS (binary mesh set) format is
currently used to render vehicles in the driving environment.
In addition to outputting the geometry formats, the Asset Manager calls the texture editor to check the
global texture worksheet (c:\vck\shop\mtl\global.tsh) for the model's specified textures. If the textures
are present, they are copied from the source directory and converted to DirectDraw surfaces (dds)
and entered into a texture worksheet.
The textures are converted in two formats: 16-bit opaque (c:\vck\shop\tex16o), and 16-bit alpha
(c:\vck\shop\tex16a). Currently, the texture editor does not create palettized textures for the software
rendering engine. To create these textures (c:\vck\shop\texp), run makepal.bat (located in
c:\vck\angel\).
Notes on the Pipeline:
- You must create a unique set of textures for each vehicle color choice.
- The dashboard texture worksheet entries must be copied into the worksheet of the appropriate vehicle.
- The Red Rocket does not contain a bounding box to assist in collision detection. When the
Asset Manager processes the files, an error message is displayed indicating a missing
group (BODY not present in 'c:\vck\shop\geo\vpredcar_s.geo'" ). A rectangle sized to the
geometry of the custom vehicle is used by Midtown Madness as a default bounding box (this
may affect the accuracy of collision detection for this vehicle).
- Additional documentation on the Asset Manager and Texture Editor can be found as comments
in the ini files. The Verify line found in the modtypes.ini file: "c:\vck\angel\am.exe -translate
-review geo\%s" can be used on the command-line to translate the required textures into
DirectDraw surfaces and render the geometry in review mode.
- To run the Asset Manager under Windows NT, modify the Verify line in the modtypes.ini file to
read: "c:\vck\angel\am.exe -opengl -translate -review -bw geo\%s". Prior to exporting
your scene, make sure 3D Studio MAX is not maximized or the Asset Manager might not
render correctly.
- When the Texture Editor adds new textures to the texture worksheet, you should verify the
appropriate flags are set for the model's texture. Improper flags will generally cause Midtown
Madness to stop responding.
- Pay careful attention to the naming patterns of groups, textures, and models. Player vehicle cars
should begin with the prefix "vp" as defined in the ini files. Also, the textures have naming
conventions for various LOD levels as well. The Browser window tree expansion view shows
all textures associated with a vehicle.
- The model must include a set of damaged textures. Follow the pattern used with the
vpredcar example included in the VCK.
- In the case of the Red Rocket, you had to specifically add a texture neighborhood to the texture
worksheet. This field was used to create specific palettes for each texture used in the
vehicle. More importantly, the name used in each field should be unique on a per vehicle
basis since the game will attempt the first loaded palette it finds. In the case of multiple cars
with vastly different palettes, the rendering will produce unintended (and undesirable!) effects.