If the filename has a '''*''' prefix, then the file must be placed in the '''effects/sounds/''' directory.

If the filename has a '''*''' prefix, then the file must be placed in the '''effects/sounds/''' directory.

−

==Extra Files==

+

==.amb file==

−

*If desired, you can adjust the sun position & colour, fog amount & colour, ambient light colour, and sky rotation for all conditions. Open the .amb file in notepad, and use [[Map Viewer]] to see the changes. Please note that you should use the same settings for the sun direction in the amb file and the params.ini file.

+

You can adjust the sun position & colour, fog amount & colour, ambient light colour, and sky rotation for all conditions. Open the .amb file in notepad, and use [[Map Viewer]] to see the changes. Please note that you should use the same settings for the sun direction in the amb file and the params.ini file.

+

You can use custom skies if desired by exporting your skydomes in .edf format.

maxrace.tl & minrace.tl ''(auto-generated for resetting the bike to track)''

==Distribution & Registration==

==Distribution & Registration==

−

For distribution, zip up your track folder and rename the zip file to '''.pkz'''. The folder must be zipped, not just the files. Now users only need to drop the single .pkz file into their MX Bikes/tracks folder.

+

For distribution, '''zip up your track folder''' and rename the zip file to '''.pkz'''. The folder must be zipped, '''not just the files'''. Now users only need to drop the single .pkz file into their mods\tracks folder.

Material Layers

Due to the dynamic track surface in MXB, bikes will 'dig through' the material layers over time. In the above example, the top layer is soft, loose soil. Just underneath is regular soil, and then the bottom layer is a compact soil. This generally works best as the softer soils erode faster. Each material type has unique grip characteristics, and generates it's own particle effects.
You can also have material types sand and gravel.

Terrain Textures & Shaders

Textures must be in TGA or BMP truecolor format.
Size must be power of 2 (256, 512, 1024, 2048, 4096).
Textures can be rectangle ( for example: 256x512, 1024x64 )

SHD files

These allow you to use specular & normal maps.
Must be named the same as the texture it will be applied to (for example, mud.tga & mud.shd)

Please note that if "repetitions" is missing it is automatically set to 1. If, instead, it is explicitly set to 0 then the texture repetitions are used.

Masks

If you want to use a tiled ground texture, you can use a mask to specify on which parts of the terrain it should appear.
The mask MUST BE IN THE ALPHA CHANNEL of the dedicated mask tga. All colour channels are ignored.
Then you can assign it to the correct texture layer in the HMF file:

TerrainEd

TerrainEd is a command-line program.
It is needed to generate a .map (graphics) file and a .trh (collisions) file.
Shadows are generated automatically during the .map export.
Arguments:

TerrainEd inputfile outputfile [params]

params.ini

Here you can change light / shadows settings.

[params]
lightdir_x = 2 (position of the sun east)lightdir_y = 10 (position of the sun up [can be left at 10 usually])lightdir_z = -7 (position of th sun north)shadowvolumes_create = 1 (enable shadow volumes generation, turn off for faster exports for testing)shadowvolumes_supersampling = 4 (quality of the shadow volumes, can usually be left at 4)shadowmaps_create = 1 (enable shadows generation, turn off for faster exports for testing)shadowmaps_scale = 0.2 (can usually be left at 0.2)shadowmaps_supersampling = 4 (quality of the shadow volumes, reduce for faster exports)shadowmaps_terraincast = 1 (the terrain self-casts shadows)

Run map.bat to generate a track.map file

Run trh.bat to generate a track.trh file

Rename these files to your chosen track name.

TrackEd

Open your .trh file in tracked.

You will need to create a centerline, merge it, and then save the trh.

mindistance is the distance under which volume is the max.
Samples must be in .wav format and mono channel.
The files must be placed in the track folder.
If the filename has a * prefix, then the file must be placed in the effects/sounds/ directory.

.amb file

You can adjust the sun position & colour, fog amount & colour, ambient light colour, and sky rotation for all conditions. Open the .amb file in notepad, and use Map Viewer to see the changes. Please note that you should use the same settings for the sun direction in the amb file and the params.ini file.
You can use custom skies if desired by exporting your skydomes in .edf format.

Other Files

You should edit the .ini file to change the track name, author, location etc.

Distribution & Registration

For distribution, zip up your track folder and rename the zip file to .pkz. The folder must be zipped, not just the files. Now users only need to drop the single .pkz file into their mods\tracks folder.

Look in code.txt (in the same folder as your trh file) for your unique track code. You only need to enter 'Prev. Track Code' if you are updating a previously registered track.
Once successfully registered, do a couple of laps online and your fastest lap should appear in the records: http://stats.mx-bikes.com/records.php