Author Topic: Contributing graphics to pak128.Britain  (Read 29791 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15558
  • Total likes: 384
  • Helpful: 172
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Standard colours for Blender
« Reply #35 on: December 26, 2014, 10:10:51 AM »
Ahh, which one do you suggest?
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.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Moderator
  • *
  • Posts: 2250
  • Total likes: 46
  • Helpful: 90
Re: Standard colours for Blender
« Reply #36 on: December 26, 2014, 02:35:45 PM »

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15558
  • Total likes: 384
  • Helpful: 172
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Standard colours for Blender
« Reply #37 on: December 26, 2014, 03:00:08 PM »
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.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Moderator
  • *
  • Posts: 2250
  • Total likes: 46
  • Helpful: 90
Re: Standard colours for Blender
« Reply #38 on: December 26, 2014, 07:26:34 PM »
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.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15558
  • Total likes: 384
  • Helpful: 172
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Standard colours for Blender
« Reply #39 on: December 26, 2014, 07:42:50 PM »
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.

Offline The Hood

Re: Standard colours for Blender
« Reply #40 on: December 28, 2014, 12:12:49 PM »
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.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15558
  • Total likes: 384
  • Helpful: 172
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Contributing graphics to pak128.Britain
« Reply #41 on: December 28, 2014, 12:45:18 PM »
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.

Offline The Hood

Re: Contributing graphics to pak128.Britain
« Reply #42 on: December 28, 2014, 01:18:19 PM »
Thanks

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15558
  • Total likes: 384
  • Helpful: 172
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Contributing graphics to pak128.Britain
« Reply #43 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.
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.

Offline jimbolimbo9

Re: Contributing graphics to pak128.Britain
« Reply #44 on: December 27, 2016, 05:29:24 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.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15558
  • Total likes: 384
  • Helpful: 172
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Contributing graphics to pak128.Britain
« Reply #45 on: January 03, 2017, 11:19:38 PM »
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.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15558
  • Total likes: 384
  • Helpful: 172
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Contributing graphics to pak128.Britain
« Reply #46 on: April 27, 2017, 01:05:21 AM »
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:

Code: [Select]
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:

Code: [Select]
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:

Code: [Select]
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
« Last Edit: May 29, 2017, 01:19:05 AM by 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.