Rail3D*


 

Updating Linear Scenery



The latest builds of Rail3D only support linear scenery with a skin texture: many older linear scenery models need to be update to work with the latest code.

Example, “gwr Linear Platform_L” prior to update - no textures show on platform model.

To update an old linear scenery model.

  • Open the Rail3D editor program and locate the scenery model in the “Scenic” list.

Make a composite texture “skin”

  • Identify the textures used in the model. In this example, the textures used are: “gwr_plat-ap.bmp”, “mauldeth-platedge.bmp”, “brick-ap01-tile2.bmp”
  • Locate these textures in your Rail3D texture folder or the scenery item folder.
  • Make a new composite texture by copying and pasting these textures into a single texture. For optimum performance the texture should be square with sides a power of 2 in size (eg 64, 128, 256, 512 etc) and to work with linear scenery the texture should tile in the vertical direction (you may need to repeat your source textures to achieve this)

Composite skin created from source textures.

  • Save your new composite texture as a windows bmp file in the same folder as the scenery item in question.

Edit the scenery file

you will find it helpful to have the editor preview window open as you make these changes

  • Add a statement for “Track2″ format.
  • Add a “Skin” statement to the model:
Name	GWR Linear Platform_L
LINEAR
TRACK2
SKIN "GWR-Platform-Skin.bmp"
Credit	MRG mod AP
  • for each panel in the model, delete the third and fourth position coordinates (they are not used in Track2 format), thus

Fill -52/-3/35 -200/-3/35 -200/33/30 -52/33/30 32.32.32 "gwr_plat-ap.bmp"

becomes

Fill -52/-3/35 -200/-3/35 32.32.32 "gwr_plat-ap.bmp"

  • for each panel in the model, remove the texture reference on the panel, and replace with the coordinates (x coordinates only) in the composite texture skin. You can also remove the colour term where a texture is used. For the above example, the gwr_plat_ap bitmap formed the left half of the skin, so coordinates of 0 and 0.5 are used to reference this:

Fill -52/-3/35 -200/-3/35 255.0.0 @0,0.50

  • repeat the above for any other models in the same file.
  • save the edited file
  • you will need to close and reopen Rail3D to see the results in Rail3D

Finished file

this finished, updated file looks like this:

Name	GWR Linear Platform_L
LINEAR
Track2

SKIN "GWR-Platform-Skin.bmp"
Credit	MRG mod AP
Description BrickSide LEFT

## Platform Face
	 Fill	-52/-3/35 -200/-3/35 255.0.0    @0,0.49
	 Fill  	-46/-3/35 -52/-3/35 @0.5,0.55
 	 fill    	-46/-3/26 -46/-3/35 @0.5,0.55
	 fill    	-55/-3/-10 -55/-3/26 @0.8,1.0

[END]
Name	GWR Linear Platform_R
LINEAR
Credit	MRG mod AP
Description BrickSide RIGHT
#Platform Face

	fill  200/-3/35 52/-3/35  @0,0.49
	 fill  52/-3/35 46/-3/35 @0.5,0.55
	 fill    46/-3/35 46/-3/26 @0.5,0.55

	 fill    55/-3/26 55/-3/-10  @0.8,1.0

[END]

and in Rail3D:

And finally

And Finally, please share your update with the Rail3D community by posting to the yahoo group, or by sending to Mark@Rail3D.net for inclusion in the library.



import