furrycat's 3D Studio MAX level editing tutorial

Exporting the map

Once your map is ready you can export it from 3D Studio. Select to export as type Quake Map. You will be prompted with the following dialogue box.

The only field that's of even minor importance is Texture WAD. Here you can enter the path to the WAD file Worldcraft will use for the map. Everything else you can leave alone. Ignore the warning about a missing player start entity. This is irrelevant for SWAT3.

Postprocessing

This is where the fun begins.

The map file saved by the Quake exporter needs to be cleaned up.

Open the file in a text editor. Here's an example:

// Quake Map file exported from 3DS MAX by QMAPEXP v1.08
// MAX coords rounded to nearest Quake integer coord
{
"classname" "worldspawn"
"wad" "medieval.wad"
"message" ""
"worldtype" "0"
"sounds" "1"
{
// floor
( -67 145 0 ) ( 127 145 0 ) ( -67 21 0 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
( 127 21 -7 ) ( 127 145 -7 ) ( -67 21 -7 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
( 127 21 0 ) ( 127 21 -7 ) ( -67 21 0 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
( 127 145 0 ) ( 127 145 -7 ) ( 127 21 0 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
( -67 145 0 ) ( -67 145 -7 ) ( 127 145 0 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
( -67 21 0 ) ( -67 21 -7 ) ( -67 145 0 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
}
}
{
// QEntity01
"classname" "noclass"
"origin" "0 92 52"
"classname" "swt_start"
"position" "0"
}
{
// QEntity02
"classname" "light"
"origin" "68 60 10"
"spawnflags" "0"
"style" "0"
"classname" "cell"
"skyboxname" "a_upstairs"
}
{
// QEntity03
"classname" "light"
"origin" "68 60 11"
"spawnflags" "0"
"style" "0"
"enabled" "1"
"color" "1.000 1.000 1.000"
}
{
"classname" "info_player_start"
"origin"  "10 10 10"
}

The first thing to do is strip out the stuff that Worldcraft doesn't care about. The message and worldtype properties of worldspawn can go, as can the entire info_player_start entity. In this example we have a cell which is actually a light (QEntity02) and a swt_start which is really of type noclass. Therefore we need to remove the redundant classnames. QEntity02, our cell, has some leftover properties from its previous existence as a light. We trash those as well.

After postprocessing, we are left with the follow map file:

// Quake Map file exported from 3DS MAX by QMAPEXP v1.08
// MAX coords rounded to nearest Quake integer coord
{
"classname" "worldspawn"
"wad" "medieval.wad"
"sounds" "1"
{
// floor
( -67 145 0 ) ( 127 145 0 ) ( -67 21 0 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
( 127 21 -7 ) ( 127 145 -7 ) ( -67 21 -7 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
( 127 21 0 ) ( 127 21 -7 ) ( -67 21 0 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
( 127 145 0 ) ( 127 145 -7 ) ( 127 21 0 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
( -67 145 0 ) ( -67 145 -7 ) ( 127 145 0 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
( -67 21 0 ) ( -67 21 -7 ) ( -67 145 0 ) 1_atticfloor 0 0 0.000000 1.000000 1.000000
}
}
{
// QEntity01
"origin" "0 92 52"
"classname" "swt_start"
"position" "0"
}
{
// QEntity02
"origin" "68 60 10"
"classname" "cell"
"skyboxname" "a_upstairs"
}
{
// QEntity03
"classname" "light"
"origin" "68 60 11"
"enabled" "1"
"color" "1.000 1.000 1.000"
}

As you can see, a text editor with macro capabilities will be a major bonus when you're doing this stuff. You may decide on a specific naming convention which will help you later in your work. For example you might set a real_classname attribute and write a macro to remove all classnames and then rename real_classname to classname. Or you may forego entity editing altogether and do it in Worldcraft. Whichever way works for you is the "right" way.

Worldcraft

The above Quake map file is obsolete as far as Sierra's BSP compiler is concerned. That's bad because you won't be able to make an SCN out of it. The good news is that Worldcraft can read it so you need to load the map into Worldcraft and then Export a new .map file. If you've got Worldcraft correctly configured you could then build the map at this point or you could export it into your SWAT directory and compile it with:

map -v -buildmat filename.map -texpath c:\path\to\textures

For this to work you'd need to copy map.exe from your Worldcraft directory to somewhere in your PATH. If you don't know what that means, do it inside Worldcraft. To test the map:

swat -blmaps -map filename

Here, filename should NOT contain the .scn extension.

Conclusion

Mapping with 3D Studio MAX is tricky. It requires you to have a good understanding of how SWAT3 maps work. It may only be worth the effort for making prefabs or small test maps. Indeed, I wrote this tutorial mainly to prove it can be done. It is, however, a possibility and it's out there for budding mappers who are frustrated with Worldcraft's clunkiness to try.


Jump to a section

| intro | part 1: What you need | part 2: Creating world geometry | part 3: Creating entities | part 4: Exporting the map |