Svenska 3D-Tåg - Forum

Svenska 3D-Tåg - Forum (http://www.e-buzz.se/forum/index.php)
-   3D-design/Ommålningar - MSTS / Open Rails (http://www.e-buzz.se/forum/forumdisplay.php?f=14)
-   -   Hur man gör spår. [tips] (http://www.e-buzz.se/forum/showthread.php?t=206)

Zzarr 2002-05-15 23:54

Hur man gör spår. [tips]
 
Här är ett tips om hur man gör spår från X-Tracks (OG).

Making your own track sections is not very difficult if you have experience making scenery objects.
Track shapes are ordinary objects but with some special rules regarding texturing and animation of switches.

Creating the shape

To fit the other track sections and the dynamic track visually you should follow this profile.

Normal gauge
A 0.3
B 0.125
C 1.435
D 0.2
E 5.0
F 8.0
G 2.0

Narrow gauge
A 0.18
B 0.075
C 0.861
D 0.2
E 3.0
F -
G -

(Kan inte infoga bilden <img src=icon_smile_dissapprove.gif border=0 align=middle>, tänker lägga upp bilden på gallerit då jag kommit hem)

The origin should be located at the start end of the shape.
This results in a problem where the shapes dissapears in some viewing angles.
The problem is easily solved by manually editing the shape file.
One of the first sections in the file is named 'volumes' (example from a1t10mStrt):

volumes ( 4
vol_sphere (
vector ( 0 0.2625 5 ) 5.87005
)
vol_sphere (
vector ( 0 0.2625 5 ) 5.59052
)
vol_sphere (
vector ( 0 0.2625 5 ) 5.59052
)
vol_sphere (
vector ( 0 0.2 5 ) 5.59017
)
)

The last number in each row (red) should be at least equal to the third (blue) or a little larger (~10%).
This example is OK.

Another problem with own built track sections is that they might not look proper regarding light and
shadows. If an engine standing on top of the track section does not cast a shadow on the track but
on the ground beneath the track you need to make another change in the shape file in the section
named 'prim_states' (example from a1t20mStrt):

prim_states ( 2
prim_state No_Name_SolidNorm ( 00000000 0
tex_idxs ( 1 0 ) 0 0 0 0 1
)
prim_state No_Name_AlphNorm ( 00000000 1
tex_idxs ( 1 1 ) 0 0 0 0 3
)
)

You must find the 'prim_state' associated with the track bed, usually the only one with 'AlphNorm',
and change the last number to a three (red). Depending on how you built your shape there could
be more than two prim_states and several with 'AlphNorm'. If you name your parts the name will
appear instead of 'No_Name'.

Animating switches

Building a switch you must make an animated object.
The main object can be named anything you want (I name it 'TRACK').
The moving part should be named 'MOVINGTRACK' for MSTS to find it (the name might not
be a requirement). Tests have shown that it's possible to have more than one moving part thus
you should have no problem even if your switch has a complicated working.
The structure should be flat with the track as parent and all moving parts as children to it.
Looking at the shapes of the included points you can see that the animation should have 3 frames.
First and last frame should be of the switch in its original position, middle frame when it's in the 'other'
position. How you do the animation is up to you as long as there is an animated part.

Texturing

When texturing you should use the standard textures used by the other track sections
(narrow gauge has the same textures but with a 'N'-prefix ).

ACleanTrack1 - trackbed texture
ACleanTrack2 - rails and water
ATrackTunFloor - tunnel floor
ATrackTunWall - tunnel walls

Trackbed for straights can be textured using part texturing tiling the texture to fit.
Curves and switches need to be textured each polygon.
It's easier to get a good result if you split the trackbed along the middle
and texture left and right halfs separately.

Testing and deploying

To use the shape you need to add an entry for it in the global tsection.dat file
describing the track path and identifying the shape-file.
If you like to share it with others I suggest you get your track section(s) included in
the standardised tsection.dat. Send an e-mail to tsection@train-sim.com with your shapes,
any additional textures and the entries you want added to the tsection.dat.
You may also contact me for possible inclusion in future XTracks distributions.
Pl

Hawk 2002-05-15 23:58

!!!!!!!
Va nu då, har forumet blivit Engelskt nu <img src=icon_smile_dead.gif border=0 align=middle>

Hawk
http://www.e-buzz.net/forum/attachments/2537869.gif



Zzarr 2002-05-16 08:39

Nej det har det inte, det var jag som glömde skriva att jag kopierat in det från X-Tracks dokumentet.

Förlåt!!! <img src=icon_smile_blush.gif border=0 align=middle><img src=icon_smile_blush.gif border=0 align=middle>


OG 2002-05-17 18:06

Istället för att kopiera in texten här skulle jag föreslå att gå till min sida där hela dokumentationen finns on-line i aktuell version.

http://www.geocities.com/okrasaghia/XTracks

/Okrasa


Zzarr 2002-05-20 17:43

Visste inte det!!!



Alla tider är GMT +2. Klockan är nu 17:29.

Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Svensk översättning av: Anders Pettersson
© Svenska 3D-Tåg 2001-2009