DIF/Map2Dif/Setup
From TDN
|
Map2Dif Setup Overview
Below you will find some good information on the structure of the Map2Dif program and how it's setup for Torque.
Torque Directories
The Torque engine expects textures to be in the same directory as the source art, or in a parent directory. Parent directories are searched all the way to the root of the run time exe path (the root itself is not searched). With the example directory and test app, all interior art is stored in the data mod and organized into texture set directories located in the root of the data mod:
data/interiors/evil1 data/interiors/test data/interiors/...
Each texture set includes all of its textures in its root directory. Map and .dif files are organized by type into sub directories which may be more than one level deep. As an example, one may create a collection of medieval buildings using the evil1 texture set and organize the .map and .dif files as follows:
.../evil1 .../evil1/medieval .../evil1/medieval/walls .../evil1/medieval/towers .../evil1/medieval/towers/small .../evil1/medieval/towers/large etc.
In this example, all the textures associated with the evil1 set are still located in the evil1 directory and the .map and .dif files are located in the leaf directories. The medieval module may introduce new textures for use by its own sub modules by placing them in the ../evil1/medieval directory.
Since map2Dif will scan the parent directories looking for textures, map files are simply processed in place. Using the medieval example above, a wall map would be converted as follows:
map2dif data/interiors/evil1/medieval/walls/crenelated.map
This example command would be run from the test application's root directory, but could be run from any location as long as the map file's path is specified correctly.
Special Textures
Torque requires that you use some textures for your BSP editing; NULL, ORIGIN, TRIGGER, FORCEFIELD. They are provided for you - Torque Map Textures Provided is a .wad for Hammer, .qrk for QuArk and the original files in .psd, .jpg and .png for your use.
These textures can optionally be .jpg files.
Place the downloaded pictures in the data/interiors/ directory. Normally they would be places inside each map directory, but to avoid repeating textures, you can place these in the directory above your map folder which is the interiors and Torque will look in the directory above to find the correct data.
Lighting
Here is a list of lights that are defined for Map2Dif.exe - There are some extra lights in Torque provides by the WorldEditor. More on the exact details of the entity definitions can be found here - Map2Dif Map Entities
light_omni
It is just a normal light, that shines in all directions.
Color: There you can change the colour of the light, the Falloff 1 + and Falloff 2
Falloff 1: defines how far the light starts shining around the light
Falloff 2: defines the range at the end of the cone of light.
light_spot
A normal directional spot light.
light_strobe
A disco strobe light for fast flickers and flashs. Warning: This light could cause epiletic seizures in certain people.
light_pulse
A slow pulsating glow between two colors make up this light.
light_pulse2
No description - Presumably a variant of the above.
light_flicker
Equal to the strobe, but here you can define five different colours!
light_runaway
No description.
Map Entities
Extras
Map2Dif GUIAs you will be able to see from the screenshot, there has been a some work on a GUI-version of the Map2Dif executable. You can use this program on linux and Windows. This tool is especially useful when you have many maps to compile. Thanks to Jeffrey Bakker.
Map2Dif User Interface for Windows/Linux





