GPL Track Creating - The Beginners Guide Part 4

From Grand Prix Legends Wiki
Jump to: navigation, search

Authored by the GPLEA


Adding Textures

Ok, so now we got our GTK done for the moment. Now we need to add textures. The textures are defined in a text file called mytrack.tex. The file defines the name of the texture, how it is stretched/mapped, and if it has height/width, which textures to use on the top, bottom, sides, front and rear. Lets look at that! Start notepad, and open the mytrack.tex you made, remove the contents, and start by adding these lines:

0 0 0 10.0 10.0 error

1 0 0 10.0 10.0 asphalt

4 0 0 10.0 10.0 grass

6 0 0 10.0 10.0 gravel

2055 0 0 10.0 10.0 hay

2055 0 1 10.0 10.0 hay

2055 0 2 10.0 10.0 hay

2055 0 4 1.0 1.0 hay

2055 0 5 1.0 1.0 hay

2056 0 1 10.0 10.0 trees

2056 1 1 10.0 10.0 barrier


So what does this mean? We're defining textures. Remember surface type 1 = tarmac (asphalt)? Let's look at them again, and specifically the 2055 wall (the hay) to explain things.

First: the names here will be needed as mip-files in the track dir in GPL (not necessarily the dir you are making the track in). These files are included in your zip. Ok, let's look!


gpltrk25.jpg


Line 1 says; Wall type = 2055, Unk3 = 0, side = 0 (floor) Stretch 10m sideways, 10m upwards, use a Mip called hay. Easy!

I've explained wall types/surface types. What is Unk3?? It's Unknown3 which is known; it's a sub value. Look at the lines above: there's one line that starts with:

2056 0 - this means, use texture 2056 - 0. Which means trees.

2056 1 - means, use texture 2056 -1, which means barrier.

Basically, the same type of wall, but the sub-value defines the texture used. The Unk3 value can be set in GPLtrk, and in fact, let's go back to mytrack and fin it so that the inside wall uses 2056 Unk3 = 1 (which is the barrier).

Here I'm fixing Wall 0 of section 0. Please do the same for wall 0 of all the sections, and SAVE.


gpltrk26.jpg


Ok, now we got the Unk 3. This means that you can have a LOT of walls which are type 2056, 4, 2048, whatever, and none look the same, because you define a different texture in the Unk3 (subtype).

Even more Good news, look at 2055 again, the lines all look the same, except for the 3rd value from the right. This defines which side gets which texture. 0= flat, the ground. So, obviously, grass, gravel and Asphalt only needs the ground defined, while the 2055 needs the other sides as well, since it has got width & height. Here they are:


0= Ground

1= Sides (left and right)

2= Top

3= Advanced! See trk23dow guide

4 = Start of wall

5 = End of Wall

6= Advanced ! See trk23dow guide


You can, if you like, use a separate texture for each side of walls with height.

Got that sorted? Good! The first line, the error.mip, is in case you missed something, or did a typo in GPLtrk. The error.mip is usually a very bright and easily seen one, so you can see where you've made a fool of yourself!

OK! Now let's just add a couple of objects, and by cheating (avoiding the more advanced stuff) we can compile and take mytrack for a drive!


Go to Part 5

Return to Index


Updated: 6-Jan-2001

Transferred to the wiki: 30.04.2009