News:

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

Resources for painting in 128x128 size

Started by VS, November 07, 2008, 08:01:31 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

VS

Hello,
right now there is a moderate amount of examples, templates and so on here:

Graphic archive - 128

The items of special interest are probably:
Rail vehicle alignment -1-, -2-, -3-,
Road vehicle alignment,
Tile with terrain shape,
and the most important - plain tile for 128!

For houses you will probably want to use the standard pavements.

Before painting anything, please take your time to understand how light and shadows work in Simutrans world: -1-, -2-.

Special colors are your friends, too! You can achieve different special effects with them. They can be corrected later with special editor Shades.

The preferred location may change in future, but this won't go away.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

VS

#1
This is something I found while looking for correct building height. Everything still counts, even if it was written far in the past.

Please keep in mind: it was written from the perspective of trying to get your graphics included in the main set.



128x128 Image Painting How-to

This document is intended to help painters to get acquainted with some basic rules that need to be followed in order to make their images fit well to the Simutrans game as a whole. It should be compilation of all exiting documents posted so far.

It has following sections:

  • Basic rules and scales
  • Allowed properties of buildings
  • Coloring rules
  • Hints and tips
  • How to make .pak
  • References
  • Appendix


Basic rules and scales

Overall perspective of Simutrans is isometric, so lines parallel in real world remain parallel in Simutrans.

In game sun shines from south (bottom left corner of screen) and it is 60° degrees above real ground in game. To better understand this, you can look at image:



One square represents approximately 20x20 meters, and thus 12 pixels are about 2 meters. This scale applies to buildings, and other terrain objects.

For buildings this means those pixel values:

  • A story (floor) is about 14 pixels tall. 12 or 16 pixels may be ok for extremely small or large buildings. Avoid other heights, this looks very strange when combined with the existing buildings. Believe me!
  • Standard windows usually have a height of 8-10 8-6 pixels. (special sized windows of course keep appropriate sizes)
  • Don't use the whole square for your buildings. When a town is build from the buildings it looks better if there are small gaps between the buildings.
    (there can be exceptions from this rule, but be very careful. Rather consult it first.)
  • Proper shading is vital. Try to look on existing buildings. (there may be few errors though.)

Vehicles have slightly different scaling. It is because of their importance for the player, they cannot be so tiny to fit the standard scale, they are bigger.

The following is a base for trains:

Vehicles can be longer, but twice as long as the base is about the maximum that can still be aesthetically pleasing in most conditions. The base length works well in turns, while significantly longer vehicles will often look funny, with ends sticking out, far from track. Shorter vehicles are possible, too, and have almost no problems of this kind.

Note for addons and other sets:
a) Everything concerning vehicle length applies always.
b) Since monorail, maglev and narrow gauge vehicles are formally derived from regular trains, similar rules usually apply to them as well. However, in main pak128 mnorail is replaced by "schwebebahn", hanging from its track. This is a good example of using Simutrans game engine to its limits, but don't expect any other guidelines to make sense in so drastically different cases.


To see allowed sizes and positioning of buses and trucks, look at file:

Road vehicles should not exceed the red line, unless they are very big, in fact too big to drive on regular roads and be part of Simutrans. One notable exceptions are truck trailers.

When making a vehicle of different length (any type), use entry length in dat files to make the game recognize the intended length. Default value, corresponding to the red outline in RV template and base for rail, is length=8.

There is no special agreement on size of ships, but please make your own such, that it will fit to already existing ships. So small fishing boat surely should not fill whole square.

Planes - pending replacement in indefinite future, no guidelines yet.

Please use common sense when deciding on size, proportions etc. You can surely see yourself how your vehicle looks next to other vehicles from set - open depot, make a screenshot, paste to it your vehicle and drag around... Remember that the vehicles already included in set will not change, so it's up to you to make your new vehicle look similar.


Allowed Properties of Buildings


Simutrans gfx engine poses some restrictions on building sizes and properties:


  • Buildings can be animated, have different graphic for winter (with snow) and have four different rotations. Also, they can have transparent ground and have Simutrans paint it with texture of the climate this building stands in - in desert, ground is sand, in temperate areas lush grass etc.
  • City buildings can be only 1x1 square large!
  • City buildings need to be placed on standard city pavement manually.
    (industries use browner version)
  • Stations (the parts build on roads or tracks) must consist of single tiles, but offer a large number of complicated layouts depending on position of theeir items. (TODO: link something useful showing all possibilities)
  • Industries are unlimited in size, but 10x10 industry is really too large. They can have base of any shape.
    If the whole building has even dimensions (AxA), it needs justone view.
    For uneven dimensions (like 2x3), it is necessary to provide arrangements for both possibilities (2x3, 3x2).
    Finally, industries can have even irregular shapes; for those all four views are needed!
    Of course, full four views can be provided for any shape of industry.
  • Most buildings can be higher than one square - then frames are put on top of each other so the building using two frames can have 256 pixels from top to bottom. But don't use too high buildings, two squares are usually way enough.
  • When animating a building, please consider using FrontImage, which adds another layer above BackImage. Separating only the changing part of animated building (usually small) into front layer and leaving the big, static rest of building in BackImage can reduce size by 60% or even more for very long animations. This is a wonderful saving for both file size and memory needed when Simutrans runs!
  • Here is a description of factory image:
BackImage[dir][x][y][z][time][snow]=unix_style_image_path(no .extension).row.column



Coloring Rules


In 16bit ((5,5,5) + 1 special) Simutrans graphic engine you have relatively large freedom in coloring your images. But you should keep in mind these few facts:


  • In most cases in real world, you will not find large areas of single color so try to use shading, texturing and adding noise for larger spaces like walls or so. It looks much better.
  • Except for some shiny enamel paints, most colors are not fully saturated, eg. 255 0 0 color can look ok on picture of new Porsche, but will be very strange on a roof, even if it is painted metal roof!
  • there are reserved colors with special behaviors, use them where it is appropriate, avoid them on places where they are not wanted. Special colors are these (all are 8bit per channel precise!):
  • The most important special color is:
    transparency key: R231 G255 B255 (cannot be seen in game)

It is important to check your images for unwanted occurrence of those colors!!!! Recommended way of creating of image is to create it as it is, without keeping reserved colors in mind - then scan it for occurrence of these colors and eliminate them. AND THEN add them on places where they are wanted. Both steps are possible with Shades quite easily.



Hints and Tips


  • Again be careful with scaling, improperly scaled images are nice by themselves but cannot be put into the game; there can be no exceptions!
  • Try to benefit from 16bit color engine - use variety of colors, use shading, use light noise, all that makes images more real. But be careful with that, too much is worse than too little.
  • Don't hesitate to use special colors on windows, on lights, on sidewalks under the lights, it looks neatly in the night.


How to make .pak file from image (example)


  • This section has been removed. Many superior examples can be found elsewhere.
  • Be careful, dat files vary quite bit between different building types, so if you want to crate for example city building, try to obtain some dat file of existing city building, so you will see what you need to put in. :)
  • As you can see, png files usually contain more images and have a structure of matrix (square width is 128x128) with more separate images. Then position of the image in this matrix is given by mentioned coordinates. You can also use separate files for each image, then coordinates are always .0.0




Advanced topics

Bigger objects
It is possible to mix pak sizes, usually the desired effect is to get bigger objects (planes, ships), when the regular 128 pixel tile does not offer enough space. This is achieved by creating and compiling the object in bigger size, such as 192, and using additional corrections to shift it visually into right place. (see the following part)

Please remember: this is not a method for making objects such as trains look larger! It is intended for making objects, that must be made smaller, look better by letting them be bigger than the defaut, too small case. Examples include planes or ships, which can in normal pak size never look in scale with other kinds of objects.

Offsets
Sometimes, positioning of object's graphic in tile is not optimal, but it cannot be shifted further - out of the tile in source picture. Offsets provide exactly this functionality: the graphic is painted a bit aside, and you can specify how much in which direction.



Appendix


This text had been written by:
Tomas Kubes
<email removed>
05-Jan-2003

updated:
18-Feb-2003 - Minor language updates.
01-Sep-2003 - Now Howto reflects all rules for images for 128x128 Simutrans.
26-Nov-2008 - Reformatting for BBcode, a few minor updates for techincal matters, links and images, removed outdated parts (VS)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

the almighty snark

Thanks a ton VS!! ;D

In a different document it showed the sun at a 60 degree angle from the ground.

VS

Yes, it is 60. (I have been editing this after first posting for nearly one hour)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

the almighty snark

I'm sorry, il refrain from further commenting until you give the all green :)

VS

No, now I'm done, so please report what you think is wrong.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

IgorEliezer

Seems to be a good tutorial.

VS, have you posted it in the Wiki?

VS


My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Izzy

#8
I have look on those templates and for me something is not right

Picture 1 shows largest possible dimensions of buses and rail vehicles, I assume that "units" are pixels

On train-align-template (picture 2) which is example of biggest possible rail vehicle, i have discovered that dimensions are completely different to information on picture 1

Then I have discovered similar different with buses template

My question is which templates are actually right????

I would suggest to create completely new templates for vehicles.
In my opinion there should be unification between vehicles.

My proposition of maximum dimensions for all vehicles:
length= 50 pix
width=  13 pix
height= 20 pix

At the end i would like to mention about shadow templates.
There is quite a few of templates explaining shadow and sum at the game but there is no template showing exactly which players colours should be use to get proper shadow effect.

Cheers

yoshi

I also think this document seems to be quite different from how the real pak128 is, in terms of length of vehicles, especially trains. Most pak128 vehicles have length=8 for historical reasons (i.e. the length parameter was introduced relatively recently), this means their pixel length is around 30 pixels, because the length=8 equates to 32 pixels and there is usually a small gap between vehicles. Considering the fact that the European standard passenger waggons' length is 26.4 metre, pak128 vehicles are way too small. Acording to this document, 26.4 metre long vehicles should have length=14.

No wonder that pak128 trains look so small compared with road vehicles...

VS

#10
Let's start with pictures - the texts under them on the site:

1) This picture shows some "common" 128 items and their respective sizes if measured in 3D space.
-> Nothing about pixels, you can't compare these numbers to them.
-> Nothing about these measures being maximal.
-> Tile length 100 units - this should also tell you something, no? There isn't any measure in Simutrans that evaluates to such number. And, that text is in the image, so?

In fact these numbers are just relative scales, based off tile side (100 units) as a starting point for 3d modelling - try these proportions, render and see if it's in pixels similar to the picture.

2) The text is deprecated now that we can have longer vehicles, too, but it is generally a good idea to stay inside the box.
-> What it says.

3) This is not in the graphic archive. Where did you get it then? Just curious...

Now that you demonstrated on yourself ;) , I understand that these pictures may be misguiding, but what exactly should be changed so that they give proper information? Please help me with this...




Maximal size for RVs will stay. Trailers can of course exceed it in length somewhat, but it is proven to be optimal. Other dimensions are just right, and height is even too much for me, but once it is set so... meh.

Max. length for trains - of course they can be longer. But then again, all the other parameters are tied to the whole set, irreversibly. You can't make half the wagons wider or higher "just like that" and expect the result to be nice.




Also...

Unless someone comes and gives me a complete set of wagons to be used in 128, in "good lengths", the current short length will stay as at least a suggestion.




Quotethere is no template showing exactly which players colours should be use to get proper shadow effect

There is no guideline concerning this. Just pick the colours sensibly, so that you get enough tones of dark for the side, and enough tones of light for roof, and do your best :)

Or... are you asking what is "special shadow colour"? The the answer is - none.




I modified the first picture and some others with some more text.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Izzy

OK! Now I understand a little bit more, I've mixed up a bit.
But what I can't understand is template saying that 30pix=15m, that double decker bus seams to be a 3 axle 15m version of a real bus, but it is 50 pix long vehicle?

I don't understand the way how dimension been calculated for the game, I have never done anything on 3d format, I just wanted to PAINT some buses in photoshop a I was looking for some templates because I wanted to create something which can be use in official pack, but what i discovered just confused me and that is why a wrote that post.

What I would expect is just straight forward template telling me about max size of my bus and which player colour should be used on which side.
If dimensions of that bus (picture of which I found on my computer and I can't remember where I found it, but it was probably when I played game last time few months ago) are THE RIGHT ONE I just stick with it and try create something on my own.

Thank you for help

Cheers
             
       

DirrrtyDirk

Different types of vehicles use different scales. So the pixel to meter ratio of buses is different from trains (and from ships and aircraft... and buildings and... etc.).

Just take an existing, similar vehicle and create your own using that size.

The shadow side (east) just needs to be darker than the brightly lit side (south). Personally I use HSB color mode (instead of RGB) most of the time to figure the difference out. Or I just reduce brightness on a selected area... Anyway, between south and east sides I lower brightness by about 22% - others people will probably use different numbers. Just try it yourself, see what looks about right and then stick to that.
  
***** PAK128 Dev Team - semi-retired*****

VS

I updated the text again. Now there should be no numbers whatsoever, leaving it instead to "common sense" and comparison with existing content... :)

Also all the templates with vehicles are updated, too.

Izzy, the size of that bus is definitely right. You can use that as your reference.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

ӔO

how about 3D templates for various 3D programs like blender, google sketchup and others?
The perspective/viewing angle isn't too hard to setup, but getting the correct 3D size to fit into 2D image can be a bit complicated, especially for sloped tiles.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

VS

Then give us some and we (I + vilvoh) will gladly add them to graphics.simutrans.com...

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

The Hood

I can provide a template for blender - there's a 1x1 building and a vehicle in this zip:

http://simutrans-germany.com/files/upload/pak128Britain-blender-examples.zip

Lighting setup is for pak128.Britain though, but the angles of the tile are correct.  Somewhere I have one set up which does slopes properly too, is that of interest?

ӔO

here's a 3D template for sketchup.
http://files.[ simutrans [dot] us (site down, do not visit) ]/files/get/F-YiH2k0ng/simutrans-template.skp
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

vilvoh

Quote from: VS on January 05, 2010, 08:56:14 AM
Then give us some and we (I + vilvoh) will gladly add them to graphics.simutrans.com...

There's already some stuff available... ;D

Go to User galleries > vilvoh > blender files and there you'll find a file called master scenes set and several blend files of vehicles, stations and tourists attractions. You just have to modify the image size from 64x64 to 128x128 and voila! you've blender templates for pak128.

Escala Real...a blog about Simutrans in Spanish...

wlindley

In first post: "Except for some shiny emails, most colors are not fully saturated..."

Presumably, the meaning was "émail" which is French for "enamel."  Could we correct the translation to "Except for some enamel paints..." please?

VS

Ah, thanks. I always wondered about that one :D

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!