Lade...
 

Cutting graphics



Why do graphics need to be cut?link




The graphics system in Simutrans is based on tiles, in order for an image to be displayed correctly in-game, the source image needs to be divided into tiles depending on their intended position. Each tile is a square area with the following dimensions:

Pakset size Width in pixel Height in pixel
32  32  32
64  64  64
96  96  96
128  128  128
192  192  192



A building consists of ground-level tiles (blue) and up to 3 height-level tiles for each ground-level tile (red - 1 height).

The parts of the ground-level tile shown in green in the image to the right will not be visible in-game.

A building which only consists of a single ground-level tile does not need to be cut. Only when a building is made up from several ground-level tile is it necessary to cut the graphics.
1x1
1x1




Top

Position of the image and its tileslink




The information in the graphics file correspond to the values of [B] [C] [D] of the BackImage parameter. Their relative ordering from top to bottom is given vertically.

1x2
1x2

2x1
2x1

2x2
2x2

2x3
2x3


3x2
3x2

3x3
3x3


other sizes can be found here


Top

How to do itlink



To help cut up an image according to these specifications, there is a Windows-program called TileCutter (German description only); under Linux TileCutter works well with Wine.

It will take 2x the original graphics, a target file and the appropriate interface mask.

Output file
Output file

Interface mask
Interface mask


Target file
Target file


The next step is to mask the intersection of the two original images; with red and blue respectively being used as transparent.
cut output file
cut output file


Then the partial images are copied into the target file.
raw target file
raw target file


Finally, the red and blue of the mask as well as the tile backgrounds of the target file are filled with transparent color. The original image is also copied into the target file.

It is a very good idea to add a copyright notice to the target file. Then everyone knows by whom the picture is, even if the file name changes.
Target file ready
Target file ready


Top



Seite bewerten

Zu dieser Seite haben beigesteuert: Frank , IgorEliezer und system .
Seite zuletzt geändert: am Mittwoch Mai 10, 2017 22:32:04 GMT-0000 von Frank.

Page discussion

There are no discussions currently on this page Start discussion

Online Benutzer

9 Benutzer (alle) online

Neueste Forenbeiträge