tm creative xfire grouptm creative xfire group
english francais deutsch nederlands 
newstutorialsspecialsforumsupportshoplinkscontactsearch
TM Creative | Tutorial | Modifying Environments
welcome

Modifying Environments

go to tutorial list
Author : Tamonte, addon by Firefly  
Translations : NicoG60 , MindXperience   eng fra ger ita ned por
Questions & Discussion : Discussion thread Last updated : February 08 2010

 

 

Introduction

 

3 facts about Mods

 

An Environment Modification (called "Mod") is a .zip archive file, containing modified texture graphics, which determine the looks of the Environment in which you play.

 

When a Mod is beeing loaded, Trackmania will replace its default textures, as long as the .zip file contains a specific modified texture.

All other textures will be the default ones.

 

To assign a Mod to a driving track:

While chosing which track to open for the Track editor, hold the CTRL button and then click your track.

A window appears, listing the mods which are installed.

 

ATTENTION !

In Trackmania Forever, lots of DDS textures have changed. Most of the new DDS textures are compressed with DXT1 format, either with/without alpha channel.

 

 

Download

Download our TM CREATIVE STADIUM MOD

This Mod can be used as a specimen example for the zip's structure and content.

 

I assume you're familiar with creating/editing .dds texture files.

I assume you're also familiar with file locations.

 

 

Examples

 

Some examples of how mods can make the Stadium environment look like...

"Venice Challenge"

venice challenge mod

"Fallen Angel"

fallen angel mod

"Sweet Dreams"

sweet dreams mod

"Tron"

tron mod

 

 

Part 1: Preparations

 

Nadeo's default Mod

 

Of course all textures which are loaded into the game must already exist on the harddisk.

Look up the detailed file locations for the environment textures you want to modify. In these harddisk folders you will find all the original textures.

 

Which texture does what ?

 

Every Trackmania environment has lots of textures... when browsing the texture folders, you will recognise a lot of these textures from the gameplay and often enough, the filename of the texture tells you what it's used for...

 

But to understand the purpose of every single texture, it will take lots of practice on environment modding.

You'll understand that we can only introduce a few examples of the Stadium environment, learning all the rest is up to you...

 

Which texture is compressed with which DXT settings ?

 

You should always save your modified texture with the same format settings as the original texture. Basically you have 2 possibilities to do that:

 

1) For lazy people: Try to save your new texture with different settings. The result file with the same file size as the original will have the right settings ;-)

2) For clever people: Let your favorite image viewer / graphic program show you the properties of the original texture file (DXT 1a,1c,3,5, mipmaps yes/no, alpha channel etc...) and use the same settings when saving your own file :-)

 

Needless to say

Just leave these files unchanged and where they are to keep the game’s original look intact.

 

 

Structure of the .zip archive

 

The non-default mods are always integrated via a .zip archive file. Trackmania will automatically read all necessary files from the zip archive and integrate them into the gameplay.

 

Open up our TM CREATIVE STADIUM MOD zip file to view it's structure...

mod zip structure

The root folder contains 1 file (Icon.dds) and 2 subfolders.

"Image" contains textures for all trackworks parts (road,grass,roofparts etc...)

"Moods" contains textures for your environment (day/night/...)

"Day" contains textures for your daytime environment (sky,clouds,etc...)

 

Case sensitive

You're well advised to handle the directories filenames and folders case sensitive (upper/lowercase letters should remain as they originally are)...

 

 

Working with temporary files

 

This procedure is good for people who are completely unexperienced in environmental modding, but it will provide a good overview of the stuff you're working on:

 

1) I'd suggest you create c:\temp\ , this shall be the "root folder" for your Mod...

 

2) Now go to your chosen[Environment]\Media\ folder and look out for the "Moods" and "Texture" folders...

 

3) Copy the "Moods" folders to c:\temp\

 

4) Go into the "Texture" folder and copy the "Images" folder toc:\temp\ . Don't copy the "Texture" folder itself, this won't work later on.

 

You have all default textures of your chosen environment copied to c:\temp\ ... Now you can start to work on specific textures you want to be modified...

 

Cleaning up the mess

Later on, after we edited all textures we wanted, we will clean up the mess and delete all files we didn't modify, so don't worry about the masses of temporary files ;-)

 

 

Part 2: Working on the "Image" files

 

The files in this folder define the textures used on all the game blocks.

 

For some block parts, there are 3 different textures... "DNS textures"

 

Diffuse Maps

 

Diffuse map (end with letter D)

 

Diffuse is the map that shows how the texture will look in reality, with no special effects applied..

 

Save it in DDS format with DXT1

StadiumRoadTurboD.dds

stadiumroadturbod

click to zoom

PC0/1 (graphic settings) only uses the Diffuse map.

 

Specular Maps

 

Specular map (end with letter S)

Specular map tells where the texture should shine, and in what colour.

 

In the alpha/transparency channel you set how much it will shine;

 

0% transparency = shiny

100% transparency = matte

 

The image looks like the Diffuse texure, but a lot brighter.

StadiumRoadTurboS.dds

stadiumroadturbod

click to zoom

PC2 (graphic settings) uses Diffuse & Specular maps.

 

Normal Maps

 

Normal map (end with letter N)

 

"Normal maps" are commonly used to apply "depth" to a diffuse map.

 

 

StadiumRoadTurboN.dds

stadiumroadturbod

click to zoom

 

But how to generate such a map ? There are several methods, but after all, they all do the same:

They create a "Relief" effect with the color (128/128/255) as the surface color. Every graphics program can apply this effect.

 

A "normal map" in nadeo is just a little different. In addition to the relief effect, all "red" elements are removed out of the RGB range of the picture, only green and blue remain...

PC3 (graphic settings) uses diffuse,specular and normal maps.

 

 

Creating our own Diffuse Map

Source : StadiumInflatable2D.dds (512x512 pixel)

 

Surely you'll recognise this texture: it's the ugly grey floor on top of the inflatables, we want to create something nicer...

 

Note that StadiumInflatable has a 512x512 resolution so you should get/make a texture with minimum 512x512 to avoid losing quality.

 

As most textures in TM, it's a "tiled image", which means it will be repeated next to itself, left/right, above/below when put on objects... so make sure the borders to all sides fit the opposite side...

 

Original Texture

diffuse map

click to zoom

New Texture

diffuse map

click to zoom

 

 

Creating our own Normal Map

Source : StadiumInflatable2N.dds (512x512 pixel)

This is the map that makes the texture look much more realistic giving it some relief.

It's not really easy to create this map properly...

 

With Adobe Photoshop

 

1) Apply the "NormalMapFilter" (NVidia's Photoshop plugins) to your diffuse map picture.

 

2) The only value to be edited is the "Scale", it will set the "height" of the relief.

 

3) Click OK and you've already created your normal map.

 

4) Eliminate all red elements out of the picture: Set your background Color to Black, Select the whole picture (only in "Red channel") with the Marquee tool and press DEL. Take a look at the RGB channel to check the result.

 

5) Additionally, you might want to smooth your picture a lot, so the surface doesn't get too crumbly.

 

With Corel Photopaint / other paint programs

 

1) Apply "3D Relief" effect to your diffuse map picture, options: Surface color RGB (128/128/255), chose Depth & Intensity after your taste.

 

2) Apply the Color channel mixer to remove all red elements out of the picture. The results should look similar to the ones below.

 

3) Additionally, you might want to smooth your picture a lot, so the surface doesn't get too crumbly.

Original Texture

diffuse map

click to zoom

New Texture

diffuse map

click to zoom

Save your picture as dds, options: DXT5, no alpha channel.

 

 

Creating our own Specular Map

Source StadiumInflatable2S.dds (512x512 pixel)

 

Specular map tells where the texture should shine, and in what colour.

 

1) Apply a brightness +80% / contrast +50% to your diffuse texture picture. This will show the shine color...

2) Select background color "black", then apply a 30% transparancy/alpha to your picture. Results should look similar to the pictures below...

3) If you can't directly save the file as DDS (DXT5 compression, with transparency), then export the picture to .PNG with transparency and convert to .DDS afterwards (e.g. with DDS Converter 2.1 or nvDXT)

Original Texture

diffuse map

click to zoom

New Texture

diffuse map

click to zoom

 

 

Viewing the result

 

The inflatable surface will now use these 3 textures to deliver some 3-dimensional impression of the surface...

 

It takes some time indeed to work on all 3 textures, but a real quality Mod should follow this path.

 

Don't be too lazy, after all Environment modding is quite a piece of work !

final result

click to zoom

 

 

Part 3: Working on the "Mood" files

 

The files in this folder are very important as they can change dramatically the looks of a mod with little work. They determine of how the surrounding "world" looks like...

 

The Sky

SkyColor.tga (256x256 pixels)

You guessed right, this is the file where you can change the sky’s color :P

Yet you have some limitations
The file represents an horizontal stripe of the sky, not all of it.
This means that the color at the top and bottom of the image will continue up and down respectively.
It’s not possible to add stars or other objects, cause the file is infinitely stretched horizontally
Before editing

skycolor.tga

After Editing

skycolor.tga

 

The Sunlight

LightSun.tga (512x32) before editing

lightsun.tga

The left ¼ of this file corresponds to the color of the shadows, the right ¾ , determines both the sun, and it’s light color.

 

Lightsun.tga after we edited it...

lightsun.tga

 

 

The Clouds Part 1

 

CloudsMinColor.tga (512x64 pixels) before editing

cloudsmincolor.dds

CloudsMaxColor.tga (512x32 pixels) before editing

cloudsmincolor.dds

This one will determine how the clouds in the sky look like...

 

Although the original files seam quite complex, there’s a simple way of editing them.

First you can reduce their resolution to 32x32.

 

Then just paint CloudsMaxColor.tga with the color you want for the enlightened part of the clouds and CloudsMinColor.tga with the color for the shadowed part.

 

cloudsmincolor That's how our new CloudsMinColor.tga and CloudsMaxColor will look like. Trackmania has no problem accepting smaller textures than the original... But of course you're free to paint the graphics as complex as the originals...

 

 

The Clouds Part 2

 

StadiumFXClouds.dds (512x512 pixels)

 

This file is responsible for the clouds shadows projection in all the Stadium and building blocks.

 

You can use it to project anything you want, making cool new effects like huge flying logos, rainbow color or fog creeping on the floor etc...

 

Note that a small object becomes a huge projection, so you can’t have much detail.

 

Save it in DDS format with DXT1 (No Alpha)

 

StadiumFXClouds.dds before editing

stadiumfxclouds.dds

StadiumFXClouds.dds after editing ;)

stadiumfxclouds.dds

Yes, our new cloud shadow will send a projection of our TMC logo through the stadium ;-)

 

 

Reflections

 

EnvCubic.dds and EnvCubicSpecA.dds (768x128) before we change them ;-)

envcubic.dds

These files as well as the other Environment files are responsible for the Environment reflections on the reflexive surfaces, like a car’s or an inflatable’s.

 

Note that this files consist in 6 square images placed side by side, which are the six faces of a cube, that makes our Environment.

 

As you can see in the original file, it shows (from left to right) the

Stadium forwards / Stadium backwards / Sky / Floor / Stadium left / Stadium right.

 

So if have changed one or more of this elements, you may want to change this files accordingly.

envcubis simple texture Attention! This is a texture for the "Big Boys", because it's a genuine "Cube Map".

 

If you want to keep it simple, you can also just work on it as a (2D) 256x256 pixel texture.

Most programs can only import this sort of DDS texture anyway (Photoshop and Nvdxt can properly import/export Cube Maps).

 

It has a little drawback, final result is not 100% as detailed as if you handled it with 768x128 pixels, but it will do just fine for most people...

 

EnvCubic.dds and EnvCubicSpecA.dds (768x128) AFTER we change them ;-)

envcubic.dds

If you can, Save this file(s) as a cube map instead of a 2d texture, in DDS format with DXT5 (Interpolated Alpha).

 

 

Part 4: Presentation

 

There are 2 files important left for identifying and presenting the Mod within TM.

 

LoadScreen.dds (1024x1024 pixel)

 

As the name suggests this file defines the screen that shows up, when a track is being loaded, when playing online or lan (not in solo mode).

 

The file is 1024x1024 pixels, but the visible part of it will be the central 1024x768, so the top and bottom 128 pixels stripe won’t appear.

 

Except for the bottom 32 pixels stripe which corresponds to the loading bar. Also note that in this area the black is set as an invisible/transparent color.

Before editing

loadscreen.dds

After editing

loadscreen.dds

 

 

Icon.dds (128x128 pixels)

 

As you may notice, this file is not among the original files.

This is the Icon that appears at the mod selection window in the editor.

icon.dds Before editing:

Boring standard Icon

icon.dds After editing:

our new flashy TM Creative Icon ;-)

To make one, just create a new 128x128 image file, make your icon and save it as Icon.dds with DXT1 (No Alpha). It's stored in the root directory of your zip file.

 

 

Part 5: Finishing your work

 

Now that we modified all our files, we can clean up the mess and prepare to use our mod.

 

1) Delete all files which you did not modify out of yourc:\temp\Image andc:\temp\mood\. After all we don't want to use all the default textures in our Mod but just our modified files...

 

2) Use your favorite zip application to create an archive from the contents of thec:\temp (not including the folder itself, just all contents within). In case you forgot, check the "Structure of the Zip File". Use standard compression.

 

3) Put the .zip archive file into your ...My Documents\Trackmania\Skins\[Environment]\Mod\ directory. Restart Trackmania and you're ready to use it. Have fun !

 

Part 6: Workflow by Firefly

 

The problem: When you make an environment mod, you can not "reload" the mod in the game, because it uses the cache data until you select a different mod, and then load your own mod again. Since i have seen a lot of people quit and restart the whole game to test their environment mods, here is my little advice that can save you a lot of time.

 

How to test your environment mods

 

1. Zip your mod, for example "test1.zip",and copy it into your skins folder ("My Documents/TrackMania United/Skins/Stadium/Mod")

2. Make another copy of that mod in the same folder, and rename it to "test2.zip"

3. Start the game

4. Load your track with the mod "test1"

 

5. Press ALT+TAB,and make your changes to your mod

6. Zip your mod as "test2.zip", and copy it in your skins folder

7. Switch over to the game with ALT+TAB again

8. Load your track and select the "test2" mod

9. Press ALT+TAB,and make edit your mod again

10. Zip your edited mod as "test1.zip", and copy it in your skins folder

11. Switch over to the game

12. Load your track and select the "test1" mod

13. Repeat at Step5, if necessary

 

That way you don't have to restart the whole game, and can immediatly see your mod improvements everytime you reload your track.

english

TM Creative offers online games, electronic computer hardware and of course internet programming services, like for example free music (HiFi luxury) for mobile phones or graphics software. 2D/3D texture models and buying dvds and bluray are supported,too.

francais

TM Creative offre créatrice de jeux en ligne, du matériel informatique électronique et de services Internet du cours de programmation, comme par exemple la musique libre (deluxe HiFi) pour les téléphones mobiles ou de logiciels graphiques. 2D/3D texture de modélisation et d'acheter des DVD et BluRay sont aussi supportées.

nederlands

TM Creative biedt online spelletjes, elektronische computer hardware en natuurlijk Internet programmeren diensten, zoals bijvoorbeeld gratis muziek (hifi luxe) voor mobiele telefoons of grafische software. 2D/3D textuur modellering en het kopen van DVD's en BluRay worden ondersteund, ook.

deutsch

TM Creative bietet Online-Spiele, elektronische Computer-Hardware und natürlich Internet-Programmierung Dienstleistungen, wie zum Beispiel freie Musik (HiFi Luxus) für Mobiltelefone oder Grafiksoftware. 2D/3D Textur Modelle und Kauf-DVDs und Blu-Ray werden auch unterstützt.

italiano

TM offre una creativa giochi online, hardware elettronico e di servizi internet corso di programmazione, come ad esempio la musica gratis (di lusso HiFi) per i telefoni cellulari o software di grafica. Texture 2D/3D modellizzazione e di acquistare DVD e BluRay sono supportati, anche.

türkce

tm yaratici sunan online oyunlar, elektronik bilgisayar donanim ve ders internet programlama hizmetleri, ücretsiz müzik cep telefonu veya grafik yazilimi (HiFi lüks) örnegin gibi. 2D/3D doku modelleme ve DVD satin alma ve bluray de desteklenmektedir.
user panel
Name
Pass
Register | Forgot pass? | Activation mail
user panel
united base players
user panel
pop rock soul
hiphop jazz lounge
house electro drum and bass
reggae punk alternative
experimental instrumental ambient
click to play random song of a genre