Track Files Explained
Track Files Explained
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!
> 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!
-
- Posts: 43
- Joined: Fri Nov 28, 2008 8:02 am
Re: Track Files Explained
I don't even begin to know how to apply textures?
DR.MIZ wrote: Keeping something "secret" so you can be "cool" is not making a flourishing community.
-
- Posts: 1070
- Joined: Mon Dec 24, 2007 5:10 pm
- Team: Danke KTM
- Location: chile
- Contact:
Re: Track Files Explained
its a decal system, is a topic here how to apply them, i dont remember where, add me to msn i can help you
Kawasakis wrote:Hah yeah, because basketball and football requires just one ball - two balls just only for motocross riders haha
Re: Track Files Explained
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)
Re: Track Files Explained
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.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: Track Files Explained
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.
Re: Track Files Explained
I've heard people describe changing the "traction" of a track.
How does one do this?
How does one do this?
DR.MIZ wrote: Keeping something "secret" so you can be "cool" is not making a flourishing community.
Re: Track Files Explained
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
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
Re: Track Files Explained
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?
Is it possible to have different parts of your track have different tractions, and how?
DR.MIZ wrote: Keeping something "secret" so you can be "cool" is not making a flourishing community.
-
- Posts: 2353
- Joined: Sat Dec 15, 2007 2:13 am
- Team: Privateer
- Location: Cascavel - Brazil
Re: Track Files Explained
Yeah , you can do that but how i dont know so much about but i belive that you can do that by cordinates
Mbutler183 wrote:I remember when we had to play mva instead of mxs, what a load of shit that was.
-
- Posts: 4132
- Joined: Tue Oct 21, 2008 5:20 pm
- Location: Washington, USA
- Contact:
Re: Track Files Explained
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.
Re: Track Files Explained
God damm i can not get my Decal onto the track
My photography work
www.mikeowenphotographer.com
www.mikeowenphotographer.com
Re: Track Files Explained
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?
When I try to open this track I get an error saying Can't open '@-nameoftrack-/texturelist'
Anyone knows what it might be?
Re: Track Files Explained
Ah, you dont think it might be having trouble opening texturelist because you don't have it in your folder?