Instructions for creating Mechanik Routes...
We are extremely grateful for these instructions for creating Mechanik
route files, as very kindly translated by PilotHN. Please send us your
thoughts or tips for inclusion in a forthcoming faq, which will hopefully
clarify some of your issues of concern.
Take this brother, may it serve you well...
Click here for some Australian Trains
The specification of route file
Translation by Tomasz Kuzniak
The route file in the "Mechanik" simulator contains The set of all objects, which are visible
during the journey. These objects are differentiated between two types: graphic objects - visible
during the journey and non-visible objects but influencing the journey (e.g.:speed fixing objects,
objects which manage a train motion, etc.).
There are two types of graphic objects in current format of the track: textured objects (which are
subject to usual rules of 3D transformation such as: rotation) and flat objects constantly faced to plane of the screen ( colled further calibratable objects).
Triangles, qadrangles and pentagons belong to objects which are able to be covered by texture. All
of this poligons are described in 3D space by means of points with three co-ordinates (x,y,z).
There are 3 points for triangle, suitably 4 and 5 for qadrangles and pentagons. It must be paid
attention to set points onto the same plane in 3D space - it ensure proper texturing of poligon.
During design of the route it's necessery to take the following scale: 200 units (points)in
designed track relate to 1 metre in real life.
Tips:
-
All of the numbers located in the *.dat files should be separated by white signs i.e.
space or tabulator.
- Remember Y axis in our 3D enviroment is directed down.
- Correctness of the route files is not checked, so running simulator with any errors in
the file may cause suspension of the computer.
- Points in the poligons must be set clockwise.
- Whole the track should be written in accordance with the order of appearance of the
objects, i.e. first objects which are close to the begining, then the farther etc.
It is possible to make some small departures. The tracks make an exception, their are
able to be set in advance. It i possible to experiment with this.
- The most interesting during the journey but the most difficult is design of the bends.
Writting a small programme is inevitable.
- The observer is on altitude y=0 so tracks and all of other should be subordinated to this
Here tracks are on altitude y=400.
- There are numbers describing texture numbers and file names corresponded with them in the
file colled "tekstury.dat". Use any viewer for bmps to view it. "Dzwieki.dat" file
contents list of *.wav files used in the programme.
There are following types of visible objects:
- textured free object - which is almost able to be set wherever in the world. It only
should not be set non-vertical objects crossing the Y axis.
- textured horizontal object - which is able to be set only in horizontal way (parallel to
Z axis), e.g.: tracks. Calculatings for such objects are done faster than for previous objects so it is necessery to use these objects where it should be done.
- textured transparent object - type of textured free object but black colour ( number 0) is as transpsrent - forests are such objects.
- calibratable object - specific type of objects, which are textured in different, faster way. However they are quite limited, i.e. they are always vertlical and theirs front walls face towards the observer. In route enclose to the "Mechanik" there are trees, poles etc. which are such objects.
- semaphore - object which describes only semaphores.
Markers:
- sound marker - describes where exactly does sound signal appear on the route, e.g. bell sound on the car crossing.
- speed marker - fixes maximum permissible speed on the section to the next marker or semaphore.
- siren marker - fixes place on the route where the suond signal should be given by siren. It always should be fixed two markers: initial (place where e.g. sign ordering to give a signal stands) and final (place where requirement of giving the signal is past and if driver do not give the signal between initial marker and final marker than he will obtain penalty).
- stop marker - describes where exactly on the ststion train has to stop. As above there should be properly set on the route a pair of markers descibing the begining and the end of area where the train should be stand. It concerns only ststions, semaphores have theirs own rules. Stop markers are allowed to be only on the stations.
- SHP security device marker - describes place on the route where security device SHP will be activated.
- currentless drive marker - fixes section of the route where driver should drive without consumption of current (drive switch on 0 position). Descibed by pair of markers.
- rotation marker - describes angle of rotation of enviroment relative to train. Used for any kind of bands.
- correcting marker - marker which should be set on the end of bands and sometimes on bands themselves. It is used to avoid train "go out of" the tracks.
Each of these markers is activated while the train has passed him.
Each of graphic objects (visible) as well as markers has his own data format described below ( I translated a part of parameters):
textured free object
-
#t - heading of an object,
-
km - on which kilometer (in points of route) an object is set,
-
how_m - how many points has an object (3,4 or 5),
-
x1,y1,z1 - co-ordinates of the first point ( relative to km, as other points),
-
x2,y2,z2 - co-ordinates of the second point,
-
... - co-ordinates of other points, but it is taken as many as how_m describes into consideration,
-
x5,y5,z5 - co-ordinates of las point,
-
x6,y6,z6 - for future formats of *.dat files (set triple zero, alternatively use for describe foothold of a texture),
-
x7,y7,z7 - for future formats of *.dat files (set triple zero, alternatively use for describe foothold of a texture),
-
nr_0 - number of point, of which co-ordinates are used to describe foothold of a texture (between 1 and 7). Here it is possible to put one of points or define another point and insert it into co-ordinate 7. It is advisable that a point describing the foothold of a texture should be the nearest point from point of view of the front of the train.
-
m_v - scale and directionof v vector,
-
m_u - scale and directionof u vector,
-
lgh - scale of a texture
-
nr_t - number of a texture in "trasa.dat" file,
-
quality - the less the less perspective distortions but the bigger price of calculating; number must be divisible by 4,
-
nr_end - number of last point in an object (for the sake of Z axis) multiplied by 3.
textured transparent object
-
#t_prz -heading of an object,
-
The other parameters are identical as for textured free object.
textured horizontal object
-
#t_p - heading of an object,
-
The other parameters are identical as for textured free object with exception quality parameter, which does not exist.
calibratable object
-
's -heading of an object
-
km - on which kilometer (in points of route) an object is set,
-
x,y,z - co-ordinates of an object ( relative to km),
-
s - scale of an object. If we set 1 than object will have its own normal size, if 2 - twice bigger, ctc..
-
nr_t - number of a texture in "tekstury.dat" file,
semaphore
-
'sem - heading of an object,
-
km - on which kilometer (in points of route) an object is set,
-
x,y,z - co-ordinates of an object ( relative to km),
-
v_cur - number describing speed annouced by current semaphore (see below)
-
v_next - number describing speed annouced by next semaphore (see below)
-
typ_sem - number describing typ of semaphore (see below)
Numbers describing speed (for semaphores) have following equivalents (see v_cur and v_next):
-
0 - speed indeterminate
-
1 - 0 km/h
-
2 - <= 40 km/h
-
3 - <= 60 km/h
-
4 - <= 100 km/h
-
5 - the highest permissible speed
Numbers describing type of semaphore have following equivalents (see typ_sem):
-
1 - independently of settings of v_cur and v_next red light is lightning untill train stops on the station, and after some time light fixed by v_cur and v_next will be lightning.
-
3 - semaphore displays signal according to v_cur and v_next .
sound marker
-
'z_d - heading of an object,
- km - on which kilometer (in points of route) an object is set,
-
x,z - location of the marker. Y co-ordinate is not needed. All markers are invisible objects. In principle only Z co-ordinate is important,
-
nr_snd - number of a sound from "dzwieki.dat" file. If we woul'd like to turn off an active sound than set -1,
-
k - here it always should be 5.
-
loop - sound should be looped or not: 1-yes, 0-no,
-
hz_v - frequency of a sound should be dependent on speed of the train: 1 -yes, 0-no,
-
vol - volume of a sound from 0 to 128,
speed marker
-
'z_p - heading of an objesct,
-
km - on which kilometer (in points of route) an object is set,
-
x,z - location of the marker.
-
speed - how many should amount permission speed
siren marker
-
'z_s - heading of an objesct,
-
km - on which kilometer (in points of route) an object is set,
-
x,z - location of the marker.
-
status - the begining of the section, on which the marker is in force: set 1 , final marker: set 0
Another values are improper.
stop marker
-
'z_z - heading of an objesct,
-
km - on which kilometer (in points of route) an object is set,
-
x,z - location of the marker.
-
status - initial marker- 1,final marker- 0.
SHP security device marker (automatic brake of the train)
-
'z_shp - heading of an objesct,
- km - on which kilometer (in points of route) an object is set,
-
x,z - location of the marker.
-
status - it always should be 1.
currentless drive marker
-
'z_jb - heading of an object,
-
km - on which kilometer (in points of route) an object is set,
-
x,z - location of the marker.
-
status - initial marker- 1,final marker- 0.
rotation marker (very hard)
-
'o - heading of an objesct,
-
km - on which kilometer (in points of route) an object is set,
-
x,z - location of the marker. Here both co-ordinates are important.
-
ang - angle to rotate the envitoment in radians multiplied by 1000000. For example if you wont to rotate to 0.005 radian set 5000. Positive value means rotation to right, and negative values means rotation to left.
correcting marker (nobody knows how to use it)
-
'k- heading of an objesct,
-
km - on which kilometer (in points of route) an object is set,
-
x1,z1 - location of the marker.
-
x2,z2 - location of directing point, which should be in stright line ( parallel to tracks, if they go stright farther). Whole enviroment after meeting correcting marker will move itself so as point (x1,z1) will be in point (0,0,0) and rotate so as point (x2,z2) will has 0 as x co-ordinate.
Back to the Control Stand
Web Design by...