News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Step by step tutorial: making vehicles for the pakset.

Started by jamespetts, November 02, 2017, 12:15:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

Introduction

There is already some detailed information on how to produce graphics/objects for this pakset, I thought that a detailed step by step tutorial might be more digestible to those creating pakset objects for the first time.

The way that this will work is to go through every step of the process for changing the livery on a single set of rail vehicles (the BR Class 455 EMU, chosen because of the simplicity of the livery change). I will not repeat detailed instructions that can be found elsewhere (such as how to install Blender), but I will post a link to the relevant material here.

In outline, the process has a number of components: (1) setting up the file management system (Git); (2) modifying the 3D models; (3) exporting the 3D models; (4) editing the data files (".dat files"); and (5) compiling your new vehicles so that they work in the game.

I have posted this in the forum for the Simutrans-Extended version of the pakset, as some of the features described (especially liveries) work only with Extended, but most of these steps will work equally well in producing graphics for Simutrans-Standard.

I have assumed that you are using Windows, but many of the steps are agnostic as to which operating system that you use. You will need to install some software, but none of it costs anything to download or use.

Important: All content for Pak128.Britain (both the Standard and Extended version) is made available under The Artistic Licence 1.0. You will need to release your content under the same licence if it is in any way based on the existing content or it is to be incorporated into the pakset.

Stage 1 - setting up file management

This step is not absolutely essential, as you can just download the files of the 3D models to modify directly from here and get the .dat files to modify from here, but if you are planning to do more than a very few, setting this up properly will make a huge difference to how easy that it is in the long term.

First, set up Git itself. Follow the tutorial here. You will need to set up two Git repositories: one for the 3D models and one for the .png and .dat files.

When you clone the Github repositories in the relevant part of the tutorial, use this link for the .png and .dat files (i.e. the pakset repository):

https://github.com/jamespetts/simutrans-pak128.britain.git

and this link for the 3D models:

https://github.com/jamespetts/Pak128.Britain-blends.git

Stage 2 - modifying the 3D models

Although Simutrans has no 3D engine, Pak128.Britain's graphics are all made from 3d models which are rendered and exported as 2D sprites. This gives a much more realistic and consistent look to the graphics then if they were pixel painted by hand, and it is also much easier to make the graphics this way.

All of the graphics for the pakset are made using a piece of open source 3D modelling software called Blender. Here is a tutorial on how to install Blender for Windows.

In late 2019, a new version of Blender was released, 2.80. This version made radical changes compared to previous versions, and this version is not compatible with the workflow described here. This is discussed in more detail here. Fortunately, it is easy to download old versions of Blender. The version immediately before 2.80, being version 2.79, can be downloaded here.

Some people think that Blender is complex to use, and it might be for very advanced functions, but, because the graphics in Simutrans are very low resolution (up to 128x128 pixels in this pakset), you will only need to use the most basic features of Blender. However, it does help to know the basic features of Blender. Here is a good tutorial on how to use Blender. You only need to get part of the way through, as it quickly moves into more advanced features that you will not need. This was the tutorial that I used to learn Blender.

If you have followed the instructions in Stage 1, you should have a directory on your computer with all of the 3D model files (with the extension .blend) for the pakset. Most of the vehicles and other objects in the pakset have their 3D models here, although there are unfortunately a number with the 3D models missing for various reasons.

The 3D model that we want, however, is this one:

https://github.com/jamespetts/Pak128.Britain-blends/blob/master/trains/Railcars/br-455-driving-nse.blend

You will find it here, where "~" represents the folder in which you stored all of the 3D model files:

~/trains/Railcars/br-455-driving-nse.blend

This is the 3D model for the driving car of the BR Class 455 EMU in Network SouthEast livery. We are going to change this into the early SouthWest Trains livery, as this is a very simple colour change of some of the stripes, to go from this:



to this:



(Images courtesy of Wikimedia Commons) The shape of the livery does not need changing, making this an easier amendment.

First, open the file in Blender. What you will see will look rather like this:



What you need to do is change the colours of the stripes one by one. To change the colours, select the material tab with this button:



Your view will then look like this:



First, save it under a different filename (I recommend br-455-driving-swt.blend to keep everything consistent) so that any changes that you save as you go along do not overwrite the NSE version.

You can right click on different parts of the model to select the different materials used there. If you select the red or the grey area, you will see that they are both a single mesh (shape) with two colours. We need to change the grey to white and the red to orange. See here for a list of the correct colours for each sort of livery so far documented. The SouthWest Trains livery is identical to the Stagecoach livery in colours, so the colours are:

Stagecoach White: 0,0,1
Stagecoach Red: 0,1,1
Stagecoach Blue: 0.603,0.875,0.778
Stagecoach Orange: 0.084,1.000,0.904

To change a colour, click the solid bar of colour, and you will see a colour wheel:



Make sure that the wheel is set to "HSV" (click the middle button), as all the values given in the standardised livery post are in HSV. ("HSV" stands for "hue, saturation and value". Hue describes what colour that something is. Saturation describes how strong that the colour is (whether a deep colour or a greyish colour) and value describes how light or dark that the colour is; all the numbers range from 0 to 1 using 3 decimal places).

The red that we have highlighted here we need to change to orange. We know that the orange livery has a hue of 0.084, a saturation of 1.000, and a value of 0.094. Once you have done that, press return and the vehicle will now look like this:



You just need to repeat the process for all the colours. In the above image, the grey has already been selected for you to turn that into white.

You will also have to adjust in some cases which colours go where: for example, when you change the white to red, the white stripe at the top will become red, too, which is not what you want, so you need to re-assign those colours to white.

Select the colour as shown here:



and then change it to white (note that I have renamed the colour here; if you have not renamed it, it will still be "grey"). You should also change the colour of the very top band of white on the stripe to blue to make the sides better proportioned. Similarly, you will need to make sure that the end lights are red rather than orange in the same way, as, in the NSE version, they share a colour.

Once you have finished, what you should have will look like this:



Stage 3 - exporting the 3D models

You are now ready to render and export the graphics to .png files for use in Simutrans. This process has now been almost entirely automated, but you will first need to download and install the addon for doing this.

The addon can be downloaded here. See here for a tutorial explaining how to install the addon.

For reference, this is what the addon looks like in the addons menu: you will need to enable it to make it work:



To render, switch to the render tab using this button:



The screen should now look like this if the addon is properly installed:



You will need to change some things as highlighted below:



The change from 11 to 16 and from RGB to RGBA make sure that the image is exported to a transparent background. The change of the name makes sure that the images have a unique name.

Important: When you are ready to render, always save before rendering, as, if you save after rendering, it will already be rotated and the automatic rendering will not work properly.

To show a preview of what the graphic will look like (to make sure that everything is in order), press F12. You should see something that looks like this:



Press ESC to quit the preview.

To render, press "Render Views". Sometimes, Blender stops responding properly after you have done this: this appears to be a bug in Blender (as of 2.78). To work around this, close Blender and open it again. Remember, do not save after rendering.

Edit: If any of the newly rendered vehicles (especially railway carriages) are to be used in the same convoy/train as vehicles produced using the old method (those whose .png files have a sky blue rather than a transparent background), you may need to increase the vehicle's size slightly to make it fit with the other vehicles: see here for details.

Step 4 - editing the data files

If all has gone well, you will end up with a number of files that look like this:



Move those files now over to the directory where the images for trains are stored. On my computer, this is:

C:\Users\James\Documents\Development\Simutrans\PakBritain sources\New\trains\images

On your computer, it will be wherever you put the data files. The "trains\images" will always be the same.

Now, navigate one directory up to ...\trains, and find the corresponding .dat file. In this case, the .dat file that we are after is br-455.dat. It currently looks like this:

obj=vehicle
name=BR-455-Driving-Front
speed=121
copyright=Kieron/JamesPetts
intro_year=1982
intro_month=3
retire_year=1992
retire_month=9
waytype=track
freight=Passagiere
payload=74
overcrowded_capacity=56
length=10
engine_type=electric
power=0
brake_force=23
rolling_resistance=13

weight=30
axles=4
cost=1860000
runningcost=120
sound=video47-class-508.wav

can_lead_from_rear=1
bidirectional=0
way_constraint_permissive[0]=0

min_loading_time=15
max_loading_time=50
comfort=57

Constraint[Prev][0]=BR-456-DTSO
Constraint[Prev][1]=BR-455-Driving-Rear
Constraint[Prev][2]=none

Constraint[Next][0]=BR-455-Motor

liverytype[0]=BR-Blue
liverytype[1]=NSE-Standard

EmptyImage[E][0]=./images/br-455-driving-trailer-front-bg.1.4
EmptyImage[SE][0]=./images/br-455-driving-trailer-front-bg.1.5
EmptyImage[S][0]=./images/br-455-driving-trailer-front-bg.1.6
EmptyImage[SW][0]=./images/br-455-driving-trailer-front-bg.1.7
EmptyImage[W][0]=./images/br-455-driving-trailer-front-bg.1.0
EmptyImage[NW][0]=./images/br-455-driving-trailer-front-bg.1.1
EmptyImage[N][0]=./images/br-455-driving-trailer-front-bg.1.2
EmptyImage[NE][0]=./images/br-455-driving-trailer-front-bg.1.3

EmptyImage[E][1]=./images/br-455-driving-trailer-front-nse.1.4
EmptyImage[SE][1]=./images/br-455-driving-trailer-front-nse.1.5
EmptyImage[S][1]=./images/br-455-driving-trailer-front-nse.1.6
EmptyImage[SW][1]=./images/br-455-driving-trailer-front-nse.1.7
EmptyImage[W][1]=./images/br-455-driving-trailer-front-nse.1.0
EmptyImage[NW][1]=./images/br-455-driving-trailer-front-nse.1.1
EmptyImage[N][1]=./images/br-455-driving-trailer-front-nse.1.2
EmptyImage[NE][1]=./images/br-455-driving-trailer-front-nse.1.3

---

obj=vehicle
name=BR-455-Motor
speed=121
copyright=Kieron/JamesPetts
intro_year=1982
intro_month=3
retire_year=1992
retire_month=9
waytype=track
freight=Passagiere
payload=84
overcrowded_capacity=63
length=10
engine_type=electric
power=746
gear=80
tractive_effort=75
brake_force=38
rolling_resistance=13

weight=50
axles=4
cost=1860000
runningcost=120


can_lead_from_rear=1
bidirectional=0
way_constraint_permissive[0]=0

min_loading_time=15
max_loading_time=50
comfort=57

Constraint[Next][0]=BR-455-Trailer
Constraint[Next][1]=BR-507(centre2)

Constraint[Prev][0]=BR-455-Driving-Front

liverytype[0]=BR-Blue
liverytype[1]=NSE-Standard

EmptyImage[E][0]=./images/br-455-motor-bg.1.4
EmptyImage[SE][0]=./images/br-455-motor-bg.1.5
EmptyImage[S][0]=./images/br-455-motor-bg.1.6
EmptyImage[SW][0]=./images/br-455-motor-bg.1.7
EmptyImage[W][0]=./images/br-455-motor-bg.1.0
EmptyImage[NW][0]=./images/br-455-motor-bg.1.1
EmptyImage[N][0]=./images/br-455-motor-bg.1.2
EmptyImage[NE][0]=./images/br-455-motor-bg.1.3

EmptyImage[E][1]=./images/br-455-motor-nse.1.4
EmptyImage[SE][1]=./images/br-455-motor-nse.1.5
EmptyImage[S][1]=./images/br-455-motor-nse.1.6
EmptyImage[SW][1]=./images/br-455-motor-nse.1.7
EmptyImage[W][1]=./images/br-455-motor-nse.1.0
EmptyImage[NW][1]=./images/br-455-motor-nse.1.1
EmptyImage[N][1]=./images/br-455-motor-nse.1.2
EmptyImage[NE][1]=./images/br-455-motor-nse.1.3

---

obj=vehicle
name=BR-455-Trailer
speed=121
copyright=Kieron/JamesPetts
intro_year=1982
intro_month=3
retire_year=1992
retire_month=9
waytype=track
freight=Passagiere
payload=86
overcrowded_capacity=64
length=10
engine_type=electric
power=0
brake_force=18
rolling_resistance=13

weight=25
axles=4
cost=1860000
runningcost=120


can_lead_from_rear=1
bidirectional=0
way_constraint_permissive[0]=0

min_loading_time=15
max_loading_time=50
comfort=57

Constraint[Prev][0]=BR-455-Motor

Constraint[Next][0]=BR-455-Driving-Rear

# Identical to the Class 317 in appearance, so graphics are shared

liverytype[0]=BR-Blue
liverytype[1]=NSE-Standard

EmptyImage[E][0]=./images/br-317-trailer-bg.1.4
EmptyImage[SE][0]=./images/br-317-trailer-bg.1.5
EmptyImage[S][0]=./images/br-317-trailer-bg.1.6
EmptyImage[SW][0]=./images/br-317-trailer-bg.1.7
EmptyImage[W][0]=./images/br-317-trailer-bg.1.0
EmptyImage[NW][0]=./images/br-317-trailer-bg.1.1
EmptyImage[N][0]=./images/br-317-trailer-bg.1.2
EmptyImage[NE][0]=./images/br-317-trailer-bg.1.3

EmptyImage[E][1]=./images/br-317-trailer-nse.1.4
EmptyImage[SE][1]=./images/br-317-trailer-nse.1.5
EmptyImage[S][1]=./images/br-317-trailer-nse.1.6
EmptyImage[SW][1]=./images/br-317-trailer-nse.1.7
EmptyImage[W][1]=./images/br-317-trailer-nse.1.0
EmptyImage[NW][1]=./images/br-317-trailer-nse.1.1
EmptyImage[N][1]=./images/br-317-trailer-nse.1.2
EmptyImage[NE][1]=./images/br-317-trailer-nse.1.3

---

obj=vehicle
name=BR-455-Driving-Rear
speed=121
copyright=Kieron/JamesPetts
intro_year=1982
intro_month=3
retire_year=1992
retire_month=9
waytype=track
freight=Passagiere
payload=74
overcrowded_capacity=56
length=10
engine_type=electric
power=0
brake_force=23
rolling_resistance=13

weight=30
axles=4
cost=1860000
runningcost=120
sound=video47-class-508.wav

can_lead_from_rear=1
bidirectional=0
way_constraint_permissive[0]=0

min_loading_time=15
max_loading_time=50
comfort=57

Constraint[Next][0]=BR-456-DMSO
Constraint[Next][1]=BR-455-Driving-Front
Constraint[Next][2]=none

Constraint[Prev][0]=BR-455-Trailer
Constraint[Prev][1]=BR-507(centre2)

liverytype[0]=BR-Blue
liverytype[1]=NSE-Standard

EmptyImage[E][0]=./images/br-455-driving-trailer-rear-bg.1.4
EmptyImage[SE][0]=./images/br-455-driving-trailer-rear-bg.1.5
EmptyImage[S][0]=./images/br-455-driving-trailer-rear-bg.1.6
EmptyImage[SW][0]=./images/br-455-driving-trailer-rear-bg.1.7
EmptyImage[W][0]=./images/br-455-driving-trailer-rear-bg.1.0
EmptyImage[NW][0]=./images/br-455-driving-trailer-rear-bg.1.1
EmptyImage[N][0]=./images/br-455-driving-trailer-rear-bg.1.2
EmptyImage[NE][0]=./images/br-455-driving-trailer-rear-bg.1.3

EmptyImage[E][1]=./images/br-455-driving-trailer-rear-nse.1.4
EmptyImage[SE][1]=./images/br-455-driving-trailer-rear-nse.1.5
EmptyImage[S][1]=./images/br-455-driving-trailer-rear-nse.1.6
EmptyImage[SW][1]=./images/br-455-driving-trailer-rear-nse.1.7
EmptyImage[W][1]=./images/br-455-driving-trailer-rear-nse.1.0
EmptyImage[NW][1]=./images/br-455-driving-trailer-rear-nse.1.1
EmptyImage[N][1]=./images/br-455-driving-trailer-rear-nse.1.2
EmptyImage[NE][1]=./images/br-455-driving-trailer-rear-nse.1.3

That stores the data for the four separate carriages that make up the train. For the moment, we are concentrating on the front driving trailer, which is:

obj=vehicle
name=BR-455-Driving-Front
speed=121
copyright=Kieron/JamesPetts
intro_year=1982
intro_month=3
retire_year=1992
retire_month=9
waytype=track
freight=Passagiere
payload=74
overcrowded_capacity=56
length=10
engine_type=electric
power=0
brake_force=23
rolling_resistance=13

weight=30
axles=4
cost=1860000
runningcost=120
sound=video47-class-508.wav

can_lead_from_rear=1
bidirectional=0
way_constraint_permissive[0]=0

min_loading_time=15
max_loading_time=50
comfort=57

Constraint[Prev][0]=BR-456-DTSO
Constraint[Prev][1]=BR-455-Driving-Rear
Constraint[Prev][2]=none

Constraint[Next][0]=BR-455-Motor

liverytype[0]=BR-Blue
liverytype[1]=NSE-Standard

EmptyImage[E][0]=./images/br-455-driving-trailer-front-bg.1.4
EmptyImage[SE][0]=./images/br-455-driving-trailer-front-bg.1.5
EmptyImage[S][0]=./images/br-455-driving-trailer-front-bg.1.6
EmptyImage[SW][0]=./images/br-455-driving-trailer-front-bg.1.7
EmptyImage[W][0]=./images/br-455-driving-trailer-front-bg.1.0
EmptyImage[NW][0]=./images/br-455-driving-trailer-front-bg.1.1
EmptyImage[N][0]=./images/br-455-driving-trailer-front-bg.1.2
EmptyImage[NE][0]=./images/br-455-driving-trailer-front-bg.1.3

EmptyImage[E][1]=./images/br-455-driving-trailer-front-nse.1.4
EmptyImage[SE][1]=./images/br-455-driving-trailer-front-nse.1.5
EmptyImage[S][1]=./images/br-455-driving-trailer-front-nse.1.6
EmptyImage[SW][1]=./images/br-455-driving-trailer-front-nse.1.7
EmptyImage[W][1]=./images/br-455-driving-trailer-front-nse.1.0
EmptyImage[NW][1]=./images/br-455-driving-trailer-front-nse.1.1
EmptyImage[N][1]=./images/br-455-driving-trailer-front-nse.1.2
EmptyImage[NE][1]=./images/br-455-driving-trailer-front-nse.1.3

Most of these things will not need changing, however some things will need changing to add the new livery. Firstly, we need to add the new livery definition. The livery definitions are here:

liverytype[0]=BR-Blue
liverytype[1]=NSE-Standard

The names for these liveries come from all the liveries defined in simuconf.tab (that is, the pakset's simuconf.tab, not the base simuconf.tab). The livery that we want to add is the South West Trains livery. As it happens, this has already been defined as livery no. 64 as we see in this excerpt from simuconf.tab:

livery_scheme[64] = SWT
retire_year[64] = 2999
retire_month[64] = 12
livery[64][0] = SWT-orange-stripe
intro_year[64][0] = 1996
intro_month[64][0] = 2
livery[64][1] = SWT-standard
intro_year[64][1] = 2000
intro_month[64][1] = 6
livery[64][2] = SWT-modified
intro_year[64][2] = 2013
intro_month[64][2] = 10

This works by defining an entire livery scheme ("SWT"), which can be chosen by players, and then individual liveries within that scheme which are automatically applied depending on the current date and availability of that livery in each vehicle.

Within the livery scheme SWT, the livery that we are interested in is SWT-orange-stripe. All that we have to do to add this livery definition to the vehicle is to add this line below the existing livery definitions:

liverytype[2]=SWT-orange-stripe

So, now, our complete set of livery definitions will look like this:

liverytype[0]=BR-Blue
liverytype[1]=NSE-Standard
liverytype[2]=SWT-orange-stripe

Now it is time to add the graphics. The graphics are defined by this section:

EmptyImage[E][0]=./images/br-455-driving-trailer-front-bg.1.4
EmptyImage[SE][0]=./images/br-455-driving-trailer-front-bg.1.5
EmptyImage[S][0]=./images/br-455-driving-trailer-front-bg.1.6
EmptyImage[SW][0]=./images/br-455-driving-trailer-front-bg.1.7
EmptyImage[W][0]=./images/br-455-driving-trailer-front-bg.1.0
EmptyImage[NW][0]=./images/br-455-driving-trailer-front-bg.1.1
EmptyImage[N][0]=./images/br-455-driving-trailer-front-bg.1.2
EmptyImage[NE][0]=./images/br-455-driving-trailer-front-bg.1.3

EmptyImage[E][1]=./images/br-455-driving-trailer-front-nse.1.4
EmptyImage[SE][1]=./images/br-455-driving-trailer-front-nse.1.5
EmptyImage[S][1]=./images/br-455-driving-trailer-front-nse.1.6
EmptyImage[SW][1]=./images/br-455-driving-trailer-front-nse.1.7
EmptyImage[W][1]=./images/br-455-driving-trailer-front-nse.1.0
EmptyImage[NW][1]=./images/br-455-driving-trailer-front-nse.1.1
EmptyImage[N][1]=./images/br-455-driving-trailer-front-nse.1.2
EmptyImage[NE][1]=./images/br-455-driving-trailer-front-nse.1.3

The
[0] or [1]

after EmptyImage and the direction tells us the livery number from the definition above, so we want to add a whole set of

EmptyImage[*][2]=...
definitions after the existing definitions.

There is a slight extra complexity here, however, as the existing graphics for this train are made using the old system with a coloured rather than a transparent background, and look like this:



with all the rotations in a single image instead of each being in its own image. This means that we cannot just copy the existing code and replace "[1]" with "[2]" and replace "nse" with "swt" using search and replace as would be possible were we using the same system. Instead, we have to use this different scheme (which you can then copy and paste and then alter for any other graphics):

EmptyImage[E][2]=./images/br-455-driving-trailer-front-swt_E.0.0
EmptyImage[SE][2]=./images/br-455-driving-trailer-front-swt_SE.0.0
EmptyImage[S][2]=./images/br-455-driving-trailer-front-swt_S.0.0
EmptyImage[SW][2]=./imagesbr-455-driving-trailer-front-swt_SW.0.0
EmptyImage[W][2]=./images/br-455-driving-trailer-front-swt_W.0.0
EmptyImage[NW][2]=./images/br-455-driving-trailer-front-swt_NW.0.0
EmptyImage[N][2]=./images/br-455-driving-trailer-front-swt_N.0.0
EmptyImage[NE][2]=./images/br-455-driving-trailer-front-swt_NE.0.0

So, ultimately, our .dat file should now look like this:

obj=vehicle
name=BR-455-Driving-Front
speed=121
copyright=Kieron/JamesPetts
intro_year=1982
intro_month=3
retire_year=1992
retire_month=9
waytype=track
freight=Passagiere
payload=74
overcrowded_capacity=56
length=10
engine_type=electric
power=0
brake_force=23
rolling_resistance=13

weight=30
axles=4
cost=1860000
runningcost=120
sound=video47-class-508.wav

can_lead_from_rear=1
bidirectional=0
way_constraint_permissive[0]=0

min_loading_time=15
max_loading_time=50
comfort=57

Constraint[Prev][0]=BR-456-DTSO
Constraint[Prev][1]=BR-455-Driving-Rear
Constraint[Prev][2]=none

Constraint[Next][0]=BR-455-Motor

liverytype[0]=BR-Blue
liverytype[1]=NSE-Standard
liverytype[2]=SWT-orange-stripe

EmptyImage[E][0]=./images/br-455-driving-trailer-front-bg.1.4
EmptyImage[SE][0]=./images/br-455-driving-trailer-front-bg.1.5
EmptyImage[S][0]=./images/br-455-driving-trailer-front-bg.1.6
EmptyImage[SW][0]=./images/br-455-driving-trailer-front-bg.1.7
EmptyImage[W][0]=./images/br-455-driving-trailer-front-bg.1.0
EmptyImage[NW][0]=./images/br-455-driving-trailer-front-bg.1.1
EmptyImage[N][0]=./images/br-455-driving-trailer-front-bg.1.2
EmptyImage[NE][0]=./images/br-455-driving-trailer-front-bg.1.3

EmptyImage[E][1]=./images/br-455-driving-trailer-front-nse.1.4
EmptyImage[SE][1]=./images/br-455-driving-trailer-front-nse.1.5
EmptyImage[S][1]=./images/br-455-driving-trailer-front-nse.1.6
EmptyImage[SW][1]=./images/br-455-driving-trailer-front-nse.1.7
EmptyImage[W][1]=./images/br-455-driving-trailer-front-nse.1.0
EmptyImage[NW][1]=./images/br-455-driving-trailer-front-nse.1.1
EmptyImage[N][1]=./images/br-455-driving-trailer-front-nse.1.2
EmptyImage[NE][1]=./images/br-455-driving-trailer-front-nse.1.3

EmptyImage[E][2]=./images/br-455-driving-trailer-front-swt_E.0.0
EmptyImage[SE][2]=./images/br-455-driving-trailer-front-swt_SE.0.0
EmptyImage[S][2]=./images/br-455-driving-trailer-front-swt_S.0.0
EmptyImage[SW][2]=./imagesbr-455-driving-trailer-front-swt_SW.0.0
EmptyImage[W][2]=./images/br-455-driving-trailer-front-swt_W.0.0
EmptyImage[NW][2]=./images/br-455-driving-trailer-front-swt_NW.0.0
EmptyImage[N][2]=./images/br-455-driving-trailer-front-swt_N.0.0
EmptyImage[NE][2]=./images/br-455-driving-trailer-front-swt_NE.0.0
...

You can then modify all the other vehicles that form this class of unit in the same way (including the steps about modifying and exporting the 3D model above) so as to apply this livery to the whole train.

Stage 5 - Compiling the vehicles

If you have followed Stage 1, this step should be quite easy. First, you need to download the latest version of makeobj. Currently, that can be found here.

Then, in the top directory containing all the pakset folders, edit the file called parameter.mos (right click it in Explorer and select Open With > Word Pad) and change the part after !makeobj= to the location of wherever you have put the Makeobj-Extended.exe file that you have downloaded. For example, in my case, this is set to:

!makeobj=C:\Users\James\Documents\Development\Simutrans\simutrans-extended-sources\simutrans\makeobj-extended.exe

Save the file and then close it. Then, just double click on makeALL.mos, and the entire pakset, including your newly modified vehicle with the new livery, will automatically compile itself. Just move the resulting pakset directory to wherever you put your Simutrans-Extended pakset directories, and you will be able to test and use your modified vehicles.

Once you are happy with them, go back to the Git tutorial in Stage 1 and learn how to create your own Github repository and push your changes to that so that I can easily automatically download your changes and merge them into the pakset.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

fam621

I've just made a livery for Simutrans and I've been wanting to make the livery and I cant download the addon which allows you to render liveries for Simutrans. How do I get the addon for rendering?

Rollmaterial

#2
Are you having trouble downloading it or installing it?

Edit: I think I know what you mean. Which browser are you using? In Chrome you have to right-click and save as.

By the way, I have produced the complete Class 455 livery including the Class 508 trailer. It is available on the new-liveries branch of my repository: https://github.com/Rollmaterial/simutrans-pak128.britain-ex-Rollmaterial/tree/new-liveries

Huge thanks for the tutorial, it is very useful!

jamespetts

Fam621 - may I ask what happens when you click on the link for the rendering addon for Blender? When I do so in Firefox, it immediately gives me the option to download it. I do not use Chrome, but Rollmaterial may be correct about what you have to do there. For reference, the full link is:

http://bridgewater-brunel.me.uk/downloads/render_SimutransRender_pak128Britain-65.py.

Rollmaterial - excellent work on the livery - now incorporated. Thank you for that. I am glad that the tutorial helped - do let me know if you have any questions.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.


Rollmaterial

I just made the Classes 410 and 421. James, have you got the NSE blends for the Class 423?

fam621


Rollmaterial

Go to the User preferences in Blender, then Add-ons, then Install from file.


fam621

You know to make a new livery, how do you crop and extend colours on blender

jamespetts

What do you mean by "crop and extend colours"? Colours, per se, cannot be cropped or extended - that makes no sense. Are you referring to how to manipulate the underlying meshes (shapes) to which the colours are assigned so as to change the shapes of liveries or even the vehicles themselves?

If so, the best answer to that is to read the dedicated Blender tutorial to which I put a link in the tutorial above specifically for that purpose. You will want to read the background section to get more familiar with Blender's interface, and then this section from Unit 2A to understand how to do basic editing of meshes. You might also find this and this part of the tutorial helpful, too.

To learn more about materials and textures, look at Unit 2C of the tutorial, starting here.

Currently, all of the liveries for trains are made with solid colours using meshes to give the liveries their shapes. This works well for simple liveries, which were predominant before the 21st century, but in modern times, complex liveries make this technique difficult to use successfully. Aircraft in this pakset have always been made with textures for liveries, which you might find easier to do if you want to produce modern liveries, although you will not have any examples to work from unless you look at the aircraft models, which are produced differently in any event. In any event, Unit 2C does explain how to use textures. Ultimately, it is your choice as to whether to make the liveries from solid colours or to use textures, or some combination of the two (but if you do use textures, make sure that the colours are the same as in the solid coloured liveries).

In that tutorial, anything beyond Unit 2C is probably more advanced than you will need for making graphics for Simutrans using the already set up templates and addons.

I hope that this helps.

Edit: Incidentally, would anyone be interested in a tutorial on how to add new sound effects to Simutrans? (This would be the same for Standard and Extended).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.


Matthew

This tutorial suggests downloading Blender 2.79 and points to the 2.79b download. However, having a look around that link, it turns out that the Blender community continued development of the 2.7 branch long after the 2.79b release. This page has packages with the final head of the 2.7 branch, which contains about four thousand commits that weren't in 2.79b..... That's a huge number of bugfixes.

The latest Linux x64 version seems to run fine. They haven't made checksums available, but for that package my sha256sum is 25316c7e7483d8b7c808dd50146e230180285c14a663193f3c9c3243cb5a340f, so if you get something different then one of us has a corrupted download.

I suggest editing the OP to point users of this tutorial at the download page for the latest version.

Off-topic
The fact that so much development was never released is more evidence for my theory that Blender was at that point being run by someone on a power trip.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

Thank you for that - link updated as suggested.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.