News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Contributing graphics to pak128.Britain

Started by The Hood, June 06, 2009, 11:36:33 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

jamespetts

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.


jamespetts

If it's to go in that thread, it would have to be in the first post, or else it will get lost. Does The Hood have any views on whether it is suitable to go there (since it is his thread/post)?
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.

kierongreen

There should really be one stickied locked thread with all blender information  I think. Colours are just as important as other setings but there's already toomany stickied threads in my opinion.

jamespetts

I hope that I am correct in taking the view that it would be inappropriate for me to do the reorganising myself, and to let you or The Hood make such changes as he/you think necessary.
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.

The Hood

Happy to put it in that thread. I'm at at the minute and can't make the changes easily film my phone so if either of you can do it that would be fine by me.

jamespetts

I have merged the topics, and added a reference above to the list of colours further down the post. Is this satisfactory?
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.

The Hood


jamespetts

I wonder whether we should update this to include:

(1) automatic rendering from Blender using the scripts;
(2) the new transparent workflow; and
(3) the now standardised scales?

The new version of these instructions thus amended should be much easier for new contributors to work with.
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.

jimbolimbo9

Quote from: jamespetts on December 27, 2016, 05:17:51 PM
I wonder whether we should update this to include:

(1) automatic rendering from Blender using the scripts;
(2) the new transparent workflow; and
(3) the now standardised scales?

The new version of these instructions thus amended should be much easier for new contributors to work with.

Sounds like a good idea to me.
James L

My Flickr - click here.

jamespetts

I have now added the colours for the tram liveries. Does anyone else have any views on the additions/modifications that I suggest above?
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.

jamespetts

#46
For reference, I reproduce here (with some modifications) a post that I made in response to another topic a few months ago, which contains details of the new, transparent workflow.

The best way to get started in creating graphics for the pakset is to download some of the existing .blend files from one of the two repositories (here and here) and modify it (e.g. to create a very similar but slightly different vehicle, or a different livery for the same vehicle; the different liveries are only used in Simutrans-Extended, however).

For exporting the graphics from Blender, you will need to use this Blender script (there are multiple tutorials on how to install a Blender script: it is very simple).

To use the new, easier workflow (using alpha transparency rather than a specially coloured background), make sure that "output" under render options is set to RGBA rather than RGB (so that Blender automatically adds the transparent background so that you don't have to do it separately); most of the older .blend files have "output" set to RGB, which will produce black backgrounds.

For road vehicles, you need to set the "Rendering views for Simutrans" Blender plugin to "Render 8 views normal alignment". For any other type of vehicles, including trams, rail vehicles, water vehicles and aircraft, you will need to set "Rendering views for Simutrans" to "Render 8 views vehicle alignment". For buildings, signs, signals, stations and stops, you will need to set it to "Render 4 views normal alignment". You can ignore the "make masks" button on that plugin: it is designed for a different pakset's workflow (and is in any event obsolete now that Simutrans supports alpha transparency; see here for a discussion of the alpha transparency feature).

For multi-tile buildings, however, the special program needed to break up the graphics into the multiple tiles does not currently work with alpha transparency. Unfortunately, this means either using the old, pre-transparency workflow (and a version of Blender earlier than 2.65), or splitting the graphics into tiles manually, which is a little complex.

Once you have the graphics (8 .png files per vehicle or way or 4 .png files for other objects, one for each alignment as will be produced automatically from the Simutrans render plugin), you need to create the .dat file. The .dat file is a text file used to specify the vehicle's data, such as its name, introduction date, capacity, power, graphics and so on. Again, the easiest thing to do is to adapt an existing .dat file. Note that there are some parameters in .dat files that are only relevant to Simutrans-Extended. With the exception of multi-tile buildings and objects needing special colours (e.g. the player colour), no post-processing is any longer necessary for the graphics exported from Blender.

Once you have the .dat and .png files, you will need to compile these into .pak files using a program called makoebj. There is a separate makeobj for Simutrans-Extended and for the normal version of Simutrans (Simutrans-Standard). .pak files compiled for Simutrans-Extended cannot be used with Simutrans-Standard, and .pak files for Simutrans-Standard will lack the data necessary for the Simutrans-Extended specific features. You can download versions of makeobj for both Standard and Experimental from links on these forums.

For road vehicles, you will need to specify offsets in the .dat files. Do this just by copying the following code, and replacing the name of the graphics in this instance ("daimler-wagonette") with the name of the graphics in question:


EmptyImage[E]=./images/daimler-wagonette_E.0.0,-33,14
EmptyImage[SE]=./images/daimler-wagonette_SE.0.0,-13,0
EmptyImage[S]=./images/daimler-wagonette_S.0.0,0,0
EmptyImage[SW]=./images/daimler-wagonette_SW.0.0,-8,10
EmptyImage[W]=./images/daimler-wagonette_W.0.0,4,5
EmptyImage[NW]=./images/daimler-wagonette_NW.0.0,12,10
EmptyImage[N]=./images/daimler-wagonette_N.0.0,0,33
EmptyImage[NE]=./images/daimler-wagonette_NE.0.0,0,24


Make sure to put the graphics in the /images subfolder of the main road vehicles folder ("/bus"). For Simutrans-Extended, if you want to specify liveries, a slight change in the format is required, as in this example:

l
liverytype[0]=General-early
liverytype[1]=General

EmptyImage[E][0]=./images/lgoc-x-type-double-general-early_E.0.0,-33,14
EmptyImage[SE][0]=./images/lgoc-x-type-double-general-early_SE.0.0,-13,0
EmptyImage[S][0]=./images/lgoc-x-type-double-general-early_S.0.0,0,0
EmptyImage[SW][0]=./images/lgoc-x-type-double-general-early_SW.0.0,-8,10
EmptyImage[W][0]=./images/lgoc-x-type-double-general-early_W.0.0,4,5
EmptyImage[NW][0]=./images/lgoc-x-type-double-general-early_NW.0.0,12,10
EmptyImage[N][0]=./images/lgoc-x-type-double-general-early_N.0.0,0,33
EmptyImage[NE][0]=./images/lgoc-x-type-double-general-early_NE.0.0,0,24

FreightImage[E][0]=./images/lgoc-x-type-double-general-early-loaded_E.0.0,-33,14
FreightImage[SE][0]=./images/lgoc-x-type-double-general-early-loaded_SE.0.0,-13,0
FreightImage[S][0]=./images/lgoc-x-type-double-general-early-loaded_S.0.0,4,0
FreightImage[SW][0]=./images/lgoc-x-type-double-general-early-loaded_SW.0.0,-8,10
FreightImage[W][0]=./images/lgoc-x-type-double-general-early-loaded_W.0.0,4,5
FreightImage[NW][0]=./images/lgoc-x-type-double-general-early-loaded_NW.0.0,12,10
FreightImage[N][0]=./images/lgoc-x-type-double-general-early-loaded_N.0.0,0,33
FreightImage[NE][0]=./images/lgoc-x-type-double-general-early-loaded_NE.0.0,0,24

EmptyImage[E][1]=./images/lgoc-x-type-double_E.0.0,-33,14
EmptyImage[SE][1]=./images/lgoc-x-type-double_SE.0.0,-13,0
EmptyImage[S][1]=./images/lgoc-x-type-double_S.0.0,0,0
EmptyImage[SW][1]=./images/lgoc-x-type-double_SW.0.0,-8,10
EmptyImage[W][1]=./images/lgoc-x-type-double_W.0.0,4,5
EmptyImage[NW][1]=./images/lgoc-x-type-double_NW.0.0,12,10
EmptyImage[N][1]=./images/lgoc-x-type-double_N.0.0,0,33
EmptyImage[NE][1]=./images/lgoc-x-type-double_NE.0.0,0,24

FreightImage[E][1]=./images/lgoc-x-type-double-loaded_E.0.0,-33,14
FreightImage[SE][1]=./images/lgoc-x-type-double-loaded_SE.0.0,-13,0
FreightImage[S][1]=./images/lgoc-x-type-double-loaded_S.0.0,4,0
FreightImage[SW][1]=./images/lgoc-x-type-double-loaded_SW.0.0,-8,10
FreightImage[W][1]=./images/lgoc-x-type-double-loaded_W.0.0,4,5
FreightImage[NW][1]=./images/lgoc-x-type-double-loaded_NW.0.0,12,10
FreightImage[N][1]=./images/lgoc-x-type-double-loaded_N.0.0,0,33
FreightImage[NE][1]=./images/lgoc-x-type-double-loaded_NE.0.0,0,24


See the bottom of the Pak128.Britain-Ex simuconf.tab for a list of the current liveries and livery schemes: you can add to this if necessary. This also gives an example of the loaded and empty graphics which are useful to have for old open top 'buses where it is possible to see whether there are people on board or not. This system is also useful for lorries that are not entirely enclosed so that it is possible to see the load, if there is one.

Just to be clear, the "EmptyImage" and "FreightImage" system (empty and full graphics) can be used both in Experimental and Standard, whereas the liveries (the zero and one, etc. in square brackets after FreightImage or EmptyImage can be used only in Experimental.

Because the pakset is open source (under the Artistic Licence 1.0), you may only modify and distribute existing objects and .blend files (and your objects can only be included in a release of the pakset) if and in so far as the new objects/graphics/.blend files that you produce are also made available under the Artistic Licence 1.0.

Road vehicles are in the process of being rescaled for Simutrans-Extended (they have not been rescaled for Simutrans-Standard). At the date of writing (April 2017), all of the 'buses, private cars, horse drawn vehicles, horses, and steam lorries have been re-scaled, as have some light vans. Most goods vehicles remain unrescaled. Bear in mind, therefore, that any of the older .blend files for road vehicles (with a modification date of earlier than about December 2016) will be in the wrong scale. These will already be set up for rendering with the new system and be in the correct scale. The rail vehicles should mostly be to the correct scale, except for earlier (pre-1960s) wagons, many of which are too large (I have not got around to re-scaling those yet). The trams, aircraft and boats should all now be to the correct scale.

In order to calibrate the scale accurately, you can import this 15 meter ruler into Blender. In Pak128.Britain, we use a slightly odd scaling system, in that the width and height are 1.25 times the scale of the length. Also, any vehicle over 15 meters in length uses a special logarithmic scaling system, as a linear scaling system would result in large ships and aircraft being too big to fit in the largest allowed size of graphics. However, rail and road vehicles are never this long, so this need be considered only if you are producing ships.

Aircraft have been produced to a different scale (see here), in which 128 pixels (i.e., one tile) represents 46 meters. This is a linear scale, not a logarithmic scale, as with ships. See here for a downloadable scale guide ruler for aircraft in Collada format, which can easily be imported into Blender.

Some aircraft and ships require special graphics, larger than 128x128 pixels to fit them within the scale.  The two standard sizes other than 128x128px are 192x192px and 254x254px (the latter being the maximum that Simutrans can support). To produce such vehicles, change the resolution under "dimensions" in the render panel on Blender to the relevant figures, and then scale the vehicle down by 128 divided by the new figure. For example, when using a 192x192px size, scale the vehicle by 192/128 (or 3:2), i.e. 0.67. These vehicles then need offsets applied in much the same way as road vehicles, above. The offsets are given in the example below:


liverytype[0]=BOAC-speedbird
liverytype[1]=BA-Union-flag

EmptyImage[E][0]=../images/vickers-super-vc10-boac_E.0.0,-64,-56
EmptyImage[SE][0]=../images/vickers-super-vc10-boac_SE.0.0,-32,-32
EmptyImage[S][0]=../images/vickers-super-vc10-boac_S.0.0,-110,0
EmptyImage[SW][0]=../images/vickers-super-vc10-boac_SW.0.0,-32,-32
EmptyImage[W][0]=../images/vickers-super-vc10-boac_W.0.0,0,-24
EmptyImage[NW][0]=../images/vickers-super-vc10-boac_NW.0.0,-32,-32
EmptyImage[N][0]=../images/vickers-super-vc10-boac_N.0.0,-110,0
EmptyImage[NE][0]=../images/vickers-super-vc10-boac_NE.0.0,0,-32

EmptyImage[E][1]=../images/vickers-super-vc10-ba_E.0.0,-64,-56
EmptyImage[SE][1]=../images/vickers-super-vc10-ba_SE.0.0,-32,-32
EmptyImage[S][1]=../images/vickers-super-vc10-ba_S.0.0,-110,0
EmptyImage[SW][1]=../images/vickers-super-vc10-ba_SW.0.0,-32,-32
EmptyImage[W][1]=../images/vickers-super-vc10-ba_W.0.0,0,-24
EmptyImage[NW][1]=../images/vickers-super-vc10-ba_NW.0.0,-32,-32
EmptyImage[N][1]=../images/vickers-super-vc10-ba_N.0.0,-110,0
EmptyImage[NE][1]=../images/vickers-super-vc10-ba_NE.0.0,0,-32


For reference, the logarithmic system (discussed fully in this thread) is as follows: for vehicles or other objects of over 15m in length, the objects are scaled to be proportional to square root of length in so far as it exceeds 15 meters. For example, for a 50m ship, one would take the square root of 15 (3.87) and the square root of 50 (7.07), and divide the latter by the former to get 1.83, and multiply the length ruler on the y axis by 1.83. One would then duplicate the length ruler and re-scale it as a width ruler. Suppose, for example, that this 50m long ship was 4m wide: one would take the re-scaled ruler, rotate it by 90 degrees, and scale it by 0.08 (4 / 50) on the x axis.

One would then use freeform scaling to get the ship's bow and stern just touching the red vertical bars on the length ruler, and use x axis constrained scaling to get the ship's sides touching the vertical bars on the width ruler.

For a reference source for Simutrans-Extended .dat file options, see the following links:

How to make Simutrans-Extended compatible paksets (.dat reference addendum)

Dat file reference for: Buildings and Stops

Dat file reference for: Factories and Goods

Dat file reference for: Signals and Signalboxes

Dat file reference for: Vehicles and Ways
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.

Y5mpF3

Maybe that should be a new topic?
I'm graphically completely untalented. But because James Hood has done an excellent job, just unfortunately not enough, I has tried to get something with Blender. But the Blends can not be opened. It comes the message that the file version would be incompatible.

kierongreen

Quote from: Y5mpF3 on March 22, 2019, 08:14:19 AM
Maybe that should be a new topic?
I'm graphically completely untalented. But because James Hood has done an excellent job, just unfortunately not enough, I has tried to get something with Blender. But the Blends can not be opened. It comes the message that the file version would be incompatible.
It may be that the blender version you are using is too old? Check that it is updated - there might be a small possibility that newer version on blender don't open old blends I suppose too...

Y5mpF3

It was the latest version. I has tried version 2.78 now. The problem is the same: "File format is not supported..."

kierongreen

Not at home at moment, can maybe try after the weekend but last time I tried using blender on my system it was refusing to open at all...

Mariculous

#51
Eurostar colors according to class 373 blendfiles:
Yellow: BFB800
Blue: 080026 was used on the roof, 120059 on the sides. Both don't match well and in the real-world roof and sides seem to be the same blue. I have now chosen a brightness in between those now: 0f004a
White: E6E5E5
Window black: 000000
Some further dark greyish colors that don't matter pretty much.

Comparing these colors to real-world images of that train, the colors are usually brighter and the white is darker.
Obviously that's due to different lightning but in any case it feels the white used is too bright in relation to the darker colors.

I'll need to know GNER blue and GNER red, hopefully I can find it in one of the blendfiles, I'm really bad at selecting colors.

Edit: According to br-mk4-to-gner, GNER colors are as follows:
dark blue: 141C32
slightly brighter greyish blue: 141D32
red: FF0000 (although feels much too red, I've used 7f0000 now, still a quite strong red)

Edit: Eurostar blue feels too dark, especially with their new livery.

Rollmaterial

Anglia Railways turquoise: 0.46, 0.806, 0.365
Source: Class 170 .blend file

Anglia Railways orange: 0.11, 0.909, 0.988
Source: https://en.wikipedia.org/wiki/File:Anglia_railways_logo.svg

Rollmaterial

#53
ONE dark blue: 0.599, 0.415, 0.559
ONE light blue: 0.577, 0.25, 0.88
ONE turquoise: 0.419, 0.542, 0.922
ONE yellow: 0.16, 1.0, 0.75
ONE pink: 0.869, 1.0, 0.68

Source: Class 170 .blend

Edit: change the colours to match the already existing Class 170, as that one looks closer to the original.