Track Files Explained

Post Reply
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Track Files Explained

Post by DJ99X »

Here's a bit of a tutorial on the layout of track files. A few things to remember

> In track editor mode, you are looking at the x and z plane, x is horizontal, z is vertical. So, y is the height of the object.
> The aspect ratio is always x:y (so is calculated by x/y)
> Units are in 'feet'
> Rotation angles are in 'radians' (just put 0, and rotate in game)
> If you are putting the file in your track folder, 'foldername' is the name of your track folder.
> For things that can't be placed in game (like flaggers), put your mouse where you want them to be, and write down the co-ordinates that appear in the left panel in the editor. The y value in these co-ordinates is the height of the terrain. But for the following things, the y value is the height with respect to the y value of the terrain (so when y=0, the object is on the ground)

Desc
trackname
eg.
Washougal 2008
(this file is used so you don't have to use spaces or capitals in your folder name. This file has to be made yourself, it doesn't have a file extension)

Billboards
[x y z] height aspectratio @foldername/image.png
eg.
[820.000000 0.000000 10.000000] 80.00000 0.500000 @randomtown/largetree.png

Statues
[x y z] rotation @foldername/object.jm @foldername/skin.png @foldername/shape.shp
eg.
[1401.199341 0.000000 1143.900757] 2.838703 @djsobjectpk1/teamtent.jm @djsobjectpk1/suzukitent.ppm @djsobjectpk1/teamtent.shp

Add _lod# to the name for the lower detail levels, where # is the base 2 log of the distance it will be used at.
E.g.
tree.jm < 2 feet
tree_lod1.jm 2-4 feet
tree_lod2.jm 4-8 feet
tree_lod3.jm 8-16 feet
tree_lod4.jm 16-32 feet
tree_lod5.jm 32-64 feet
tree_lod6.jm 64-128 feet
tree_lod7.jm 128-256 feet
tree_lod8.jm 256-512 feet
tree_lod9.jm > 512 feet
If an lod is missing it will use the next higher lod.

Decals
[x z] rotation scale aspectratio @foldername/decal.png
eg.
[1215.841431 1044.001099] 2.955113 32.000000 1.100000 @washougal2008/trackdirt.png

______________________________________________________________________________________________________

Flaggers

There are 3 parts in the original file.

Top part
This is for the start runner
You only have to pay attention to the first 2 lines. The first line is where the runner starts, the 2nd line is where he finishes.
eg.

[1975.000000 0.000000 1294.000000] (Start)
[1975.000000 0.000000 1397.000000] (Finish)
8.4 1 (Ignore)
12
@30sec_30.png
@30sec_turn.seq
@30sec_5.png
@30sec_run.seq
@30sec_done.png (Ignore)

Middle part
This is for the finish line flagger.

[450 0.0 2000] (Location of flagger)
8 -1 (Ignore)
@finish_green.png
@finish_crossed.png
@finish_white.png
@checkerwave.seq (Ignore)

Last part
This is for the track marshalls (ie people who wave yellow flags etc). You can put as many of these in as you like, just copy this part thats in the file and paste it a few times.

[1174.52 0.00 1032.30] (Location)
9.6 1 (Ignore)
1 2 -1 -1 (The timing gates the flagger waves for. Can handle 4 gates. -1 is used if you want less than 4 gates)
@flagger_resting.png (Ignore)
@flagger_waving.seq (Ignore)

______________________________________________________________________________________________________

Timing_Gates
startinggate
Write down the start and end co-ordinates of a line of gates you would like, but only the X and Z co-ordinates (ie the 1st and 3rd number). Put the co-ordinates into this, then copy and paste what is outputed under 'startinggate:'
http://www.mxsimulator.com/gate.html

checkpoints
Done in game. If you need to add more, copy and paste some lines from an untouched timing_gate file into this.

firstlap
Order of timing gates you need to take to complete the first lap
normallap
Order of timing gates you need to take to complete a normal lap
______________________________________________________________________________________________________

Texturelist
Not so important what you do with this because of the new texture system. But is handy for changing frictional and resistance numbers (so you can add mud and sand)

friction lowspeedresistance highspeedresistance foldername/image.ppm
eg.
1 20 50 grass.ppm

Terrain.hf
resolution scale minaltitude maxaltitude
eg.
9 2.000000 -5.146564 48.516369

'resolution' specifies the size of the terrain.png and shading.ppm you are using. The formula is 2^(n+1)+1. So 2^(9+1)+1=1025, hence standard tracks use 1025x1025 pixel terrains.

'scale' is in feet/pixel, so standard tracks are 2 feet/pixel.

______________________________________________________________________________________________________

Lighting
Standard stuff
sun_vector [ 1.00 1.00 1.00 ] (Vector of the sun, [x y z])
sun_color [ 1.00 1.00 0.50 ] (Floating-point colour value, [Red Green Blue]. Equivalent to RGB values in photoshop divided by 255)
ambient [ 0.25 0.25 0.50 ] (Ditto)

Skybox
sky_x @foldername/image_x.png (x is first letter of direction, eg x=n if north. x=u for up)
eg.
sky_n @oldgoldberry/sky_north.png

sky_env @foldername/image.png (used for reflections)

Fog
fog [red green blue] density
eg.
fog [0.56 0.64 0.35] 0.0032

Flare
flare_elements must be added first, then either flare_point or flare_vector is added underneath

flare_element [x y] [red green blue] size @foldername/image.png (size should be ~1. x=0, y=0 flare is centre of screen, x=0, y=1 flare is on vector. Black in image represents transparency)
flare_vector [x y z] (self explanatory, if sun flare, same as sun_vector)
flare_point [x y z] (location on terrain of flare. Very tedious, as it needs a white pixel behind it to work)

eg.
flare_element [0 1] [1 1 1] 0.8 @mainflare.png
flare_element [0 1] [0.62 0.45 0.24] 0.4 @light.png
flare_vector [1 1 1]

______________________________________________________________________________________________________

Feel free to ask questions!
hiltongreen984
Posts: 43
Joined: Fri Nov 28, 2008 8:02 am

Re: Track Files Explained

Post by hiltongreen984 »

I Didnt Get The Flagger Part?
Team Stock Honda Hiltongreen984
Image
Garasaki
Posts: 1959
Joined: Mon Feb 04, 2008 4:33 pm

Re: Track Files Explained

Post by Garasaki »

I don't even begin to know how to apply textures?
Image
DR.MIZ wrote: Keeping something "secret" so you can be "cool" is not making a flourishing community.
DankeKTM21
Posts: 1070
Joined: Mon Dec 24, 2007 5:10 pm
Team: Danke KTM
Location: chile
Contact:

Re: Track Files Explained

Post by DankeKTM21 »

its a decal system, is a topic here how to apply them, i dont remember where, add me to msn i can help you
Image
Kawasakis wrote:Hah yeah, because basketball and football requires just one ball - two balls just only for motocross riders haha
ddmx
Posts: 5375
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: Track Files Explained

Post by ddmx »

I cannot for the life of me get the lighting to work for some reason. I have copied the filenames word for word or so I thought. It will not show up in game. Any help would be appreciated by me and also Danke I'm sure.

Code: Select all

sun_vector [ 0.50 0.50 0.50 ]
sun_color [ 1.00 1.00 .25 ]
ambient [ 0.25 0.25 0.50 ]
sky_n @valkenswaard/sky1.png
sky_e @valkenswaard/sky2.png
sky_s @valkenswaard/sky3.png
sky_w @valkenswaard/sky4.png
sky_u @valkenswaard/sky5.png
sky_env @valkenswaard/sky_env.png
(space)
jlv
Site Admin
Posts: 15020
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Track Files Explained

Post by jlv »

What size is the file? It should be 264 bytes. If it is 273 bytes you have dos line endings and need to save it in unix format.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
ddmx
Posts: 5375
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: Track Files Explained

Post by ddmx »

It is 273 indeed. I'm trying to figure out saving in UNIX format right now. Neither notepad or wordpad seem to give me that option. I'm trying notepad ++ now.
Garasaki
Posts: 1959
Joined: Mon Feb 04, 2008 4:33 pm

Re: Track Files Explained

Post by Garasaki »

I've heard people describe changing the "traction" of a track.

How does one do this?
Image
DR.MIZ wrote: Keeping something "secret" so you can be "cool" is not making a flourishing community.
Pumaxcs
Posts: 13216
Joined: Sat Dec 15, 2007 11:50 pm
Team: Kyle/Luiz
Location: Western, Kentucky

Re: Track Files Explained

Post by Pumaxcs »

in the texture list is what your gunna want
i think the first number is the traction the second is low resitance and the third is high resitance correct me if im wrong and dont go by this cause im not completely poitive
all i do know is the first number is the one your gunna want to mess with
Image
Everytime you post something stupid, a baby gets punched in the face. Please be smart, for the children.
MXS Cares
jlv wrote: Thu Nov 05, 2020 1:09 am Pumaxcs would know better than I do.
Garasaki
Posts: 1959
Joined: Mon Feb 04, 2008 4:33 pm

Re: Track Files Explained

Post by Garasaki »

So I'm generally understanding this bit about changing the traction. But I have a question:

Is it possible to have different parts of your track have different tractions, and how?
Image
DR.MIZ wrote: Keeping something "secret" so you can be "cool" is not making a flourishing community.
FactoryBR21
Posts: 2353
Joined: Sat Dec 15, 2007 2:13 am
Team: Privateer
Location: Cascavel - Brazil

Re: Track Files Explained

Post by FactoryBR21 »

Yeah , you can do that but how i dont know so much about but i belive that you can do that by cordinates
Image
Mbutler183 wrote:I remember when we had to play mva instead of mxs, what a load of shit that was.
wheels1758
Posts: 4132
Joined: Tue Oct 21, 2008 5:20 pm
Location: Washington, USA
Contact:

Re: Track Files Explained

Post by wheels1758 »

It is possible. It is difficult to explain in one post. MSN me and i can help. You can make a new tilemap with different values, and paint that on the track to make it slippery or loamy in different parts.
Mikey
Posts: 7018
Joined: Sat Nov 08, 2008 1:27 am
Location: Melbourne
Contact:

Re: Track Files Explained

Post by Mikey »

God damm i can not get my Decal onto the track :evil:
My photography work
www.mikeowenphotographer.com
Rallemx
Posts: 1136
Joined: Fri Nov 21, 2008 2:00 pm

Re: Track Files Explained

Post by Rallemx »

Not sure if this belongs here, but I thought it'd be better to post it here than make a new thread...
When I try to open this track I get an error saying Can't open '@-nameoftrack-/texturelist'
Anyone knows what it might be? :(
Image
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Track Files Explained

Post by DJ99X »

Ah, you dont think it might be having trouble opening texturelist because you don't have it in your folder?
Post Reply