News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Making train carriages/passenger cars

Started by stmaker, November 16, 2011, 01:07:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

stmaker

With reference from this
Quote
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.

I'm a beginner in making addons. At first I want to make a C151. So I got the template (shown above) base and then, I measured the train dimension and converted it into pixels. The problem is that the length of the train in pixels is 138px (approx.) and somehow, it is too long for a SimuTrans train and it passes the 128px mark. If you were to put it in the game, it would looked funny. So, I got confused and stop the project to find out how to solve.

I looked at the topic again and found out this line: "Vehicles have slightly different scaling"
So, does that mean the vehicle size can be anything? The "6px is 1m" rule (used for buildings) is ruled out? The measurement of 1m could be 3-4px in vehicles?

I don't know. Can someone help me?
Version using: Simutrans v111.0
Paks: pak64, pak96.comic, pak128 openr582, pak128.Britain, pak128.Japan, pak192.comic
Using: Paint.NET, Paint, Photoshop, SketchUp
Future Addon(s): Building (Link)
Current Addon(s): Eye-See Mart and Several Building addons  Ask me any questions. I'm free.

MHD

Hi st,

I am not that specialist in making graphics, but I managed to solve some vehicles. I think, the different dimensions are to understand in a different way.

Try to imagine the line of motion of these vehicles (middle of the street). If you do so, the motion of road vehicles and trains are different, because a train is running more far from the middle of the road. This means, the images of the train have to be more shifted to the left (parallel to the imagined line).

Generally I think, that the length can be bigger than in the templates. But when you do so, the longer the vehicle is, the more rigid it will behave when changing the direction. Always think abaou the situation, that one vehicle is following the other. You have to manage, that these two vehicles are not building an intersection.

This would be my point of view. Maybe someone can answer more precise....

stmaker

So there's no limit of dimension of the vehicle being made?
Version using: Simutrans v111.0
Paks: pak64, pak96.comic, pak128 openr582, pak128.Britain, pak128.Japan, pak192.comic
Using: Paint.NET, Paint, Photoshop, SketchUp
Future Addon(s): Building (Link)
Current Addon(s): Eye-See Mart and Several Building addons  Ask me any questions. I'm free.

ӔO

you can use a slightly larger pak size for vehicles if they don't fit.
You will need to use the alignment offsets in the dat file, however.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

stmaker

Oh my.

Are there any clear detailed understandable explanations about alignment offsets? And are there new vehicle templates around?
Version using: Simutrans v111.0
Paks: pak64, pak96.comic, pak128 openr582, pak128.Britain, pak128.Japan, pak192.comic
Using: Paint.NET, Paint, Photoshop, SketchUp
Future Addon(s): Building (Link)
Current Addon(s): Eye-See Mart and Several Building addons  Ask me any questions. I'm free.

DirrrtyDirk

Why don't you just use roughly the same scale as existing trains? Otherwise your train will not fit in with any other...

Just give each carriage a length=8 or so setting (personally I'm using 2.5m = 1 length unit, so the 25m Shinkansen carriages use l=10, while the 20m "normal" - narrowgauge - trains from Japan use l=8, etc.) With length=8, the side of the carriage (in the first view of the image you posted) should be 32px (=length x 4) long.

Or better yet, do it the easy way: for you very first try (as long as you still have to figure things like this out), just grab an already existing train from the pak128 sources and simply paint over it - that way you have the correct size and position already established.

Oh and I would not recommend using different pak-sizes for trains - they usually are troublesome enough for single vehicles like ships and aircraft.
  
***** PAK128 Dev Team - semi-retired*****

Fabio

Quote from: DirrrtyDirk on November 17, 2011, 02:30:03 PM
Just give each carriage a length=8 or so setting (personally I'm using 2.5m = 1 length unit, so the 25m Shinkansen carriages use l=10, while the 20m "normal" - narrowgauge - trains from Japan use l=8, etc.) With length=8, the side of the carriage (in the first view of the image you posted) should be 32px (=length x 4) long.

Very interesting! My trams to be released, instead, use roughly 1 length unit = 1.25 m.
Like this i had small cars (length 2 to 7) in order to fill one tile with 20 m combinations and 2 tiles with 40 m combinations (lhe longest ever built in real life, as far as I know).
But I had another problem: with a total length of 32 the tram requires 3 tiles, and I don't get why. So my base compositions are ment not to exceed length=28 (empirically the max length for 2 tiles) and still a good 35 m tram.

DirrrtyDirk

Yes, Fabio, for the only tram I did so far, I threw that scale out of the window, too. Had I stuck to the same scale, the tram would have become tiny - and would have looked kinda ridiculous. So I just drew it to look about right (primarily) among the buses and trucks (worrying less about other trains then). IMHO, in order to look good, Simutrans simply requires different scales for more or less every group of objects (ships, aircraft, trains, trams, road vehicles... and with buildings, several different scales might be needed in that object group alone - skyscrapers and small suburban houses for example.) - but I can live with that quite comfortably.

The scale I use is not the "official" scale of pak 128, by the way. Just the scale I chose to draw my favorite japanese trains to. And since the majority of japanese (narrowgauge) passenger trains use 20m carriages - with exeception of the (standard gauge) Shinkansen - I was lazy and decided to make that equal the simutrans default length of 8.  ;)
  
***** PAK128 Dev Team - semi-retired*****

stmaker

Quote from: DirrrtyDirk on November 17, 2011, 02:30:03 PM
Just give each carriage a length=8 or so setting (personally I'm using 2.5m = 1 length unit, so the 25m Shinkansen carriages use l=10, while the 20m "normal" - narrowgauge - trains from Japan use l=8, etc.) With length=8, the side of the carriage (in the first view of the image you posted) should be 32px (=length x 4) long.

Does one length unit = 1px?

Quote from: DirrrtyDirk on November 17, 2011, 02:30:03 PM
Oh and I would not recommend using different pak-sizes for trains - they usually are troublesome enough for single vehicles like ships and aircraft.

Will do. ;)
Version using: Simutrans v111.0
Paks: pak64, pak96.comic, pak128 openr582, pak128.Britain, pak128.Japan, pak192.comic
Using: Paint.NET, Paint, Photoshop, SketchUp
Future Addon(s): Building (Link)
Current Addon(s): Eye-See Mart and Several Building addons  Ask me any questions. I'm free.

Fabio

This for sure, DirrrtyDirk.

I think it would be nice to collect in a single place all the scales used by active pak128 artists. This would be of great help for new artists or when an active artist wants to try himself with different objects (as I recently took an interest in vehicles and buildings, which I didn't consider earlier :))

E.g. for buildings, given the old 14-16 px per floor specific, I ran some calculations and I figured out this rule of thumb:
16 px = 3 m
(14 px are 2.625 m, which I can also consider 2.70 m -- a standard height for most of newer residential buildings in real life -- even if 2.70-3.00 m is usually the living inner space, whereas I didn't consider the floor thickness.
This made everything simpler:
16px=3m; 8px=1.5m; 4px=0.75m and so on, e.g. balcony railrings are 6px tall, meaning 1.13m; but this scale works also horizontally: a tile has an edge of 64px, which means 12x12m=144m2 (plenty of space for two medium sized apartments). My blocks are roughly 64x48px=12x9m=108m2, a good sized apartment per floor or two small ones.




@stmaker:
not at all, 1 length unit = 4px
the tile edge is 64 px and it contains 2 cars with length=8, so
64=2*(8*4)
length unit=(64/2)/8=4

stmaker

Quote from: fabio on November 18, 2011, 12:04:13 PM
@stmaker:
not at all, 1 length unit = 4px
the tile edge is 64 px and it contains 2 cars with length=8, so
64=2*(8*4)
length unit=(64/2)/8=4

Ok, thanks for the info.




The length of a C151 is 23.65m. I tried converting lengths getting 1px = 2m or 1px = 1m but it doesn't work that way. So I think of this - 2px = 1m. It is quite longer than the template train (shown on main post on template) but I don't know whether it is suitable for the game.

I have SketchUp. I tried and made it isometric.

From:


To:

Not finished though

I'll try to recreate. ;)
Version using: Simutrans v111.0
Paks: pak64, pak96.comic, pak128 openr582, pak128.Britain, pak128.Japan, pak192.comic
Using: Paint.NET, Paint, Photoshop, SketchUp
Future Addon(s): Building (Link)
Current Addon(s): Eye-See Mart and Several Building addons  Ask me any questions. I'm free.

VS

You might notice that trains in Simutrans are mostly shorter than precise numbers would make them...

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!

DirrrtyDirk

#12
Quote from: stmaker on November 18, 2011, 12:36:30 PM

The length of a C151 is 23.65m.

The 2 end cars, yes. The 4 middle cars are 22.8m according to the wiki page you linked to.  ;) But not to worry...

Quote from: stmaker on November 18, 2011, 12:36:30 PM
I tried converting lengths getting 1px = 2m or 1px = 1m but it doesn't work that way. So I think of this - 2px = 1m. It is quite longer than the template train (shown on main post on template) but I don't know whether it is suitable for the game.

In my scale (presented and explained earlier) I'd probably use length=9 (=36px for the side of the first view) for all 6 cars to make the train fit in perfectly. But I am usually more concerned about sticking to detail than about easy usability in game. Staying with a standard length of 8 however, has some advantages: the whole 6-car train will exactly fit into 3 tiles (1 tile equals length=16). With length=9 you'd need a fourth tile in stations, even though that would be not even filled half way (6/16 to be exact.).

Quote from: stmaker on November 18, 2011, 12:36:30 PM
I have SketchUp. I tried and made it isometric.

I don't think this will lead to a good result. Forget working with photos, it is (as far as I can say) not going to work. Simutrans objects are so small, consisting of so few pixels, that shrinking any photo down to that size will not have any details, probably not even a recognizable form.




@Fabio:

I meant to adress this earlier, but ran out of time:

Quote from: fabio on November 18, 2011, 09:18:04 AM
But I had another problem: with a total length of 32 the tram requires 3 tiles, and I don't get why. So my base compositions are ment not to exceed length=28 (empirically the max length for 2 tiles) and still a good 35 m tram.

That "problem" was discussed in another thread several months ago (don't even remember if it was here or in the german forum). I take it, that you are referring to the minimal station size displayed by the depot? Unfortunately that display does not always show correct numbers. The way it currently works, is designed to prevent another potential problem from occuring (forgot what it was exactly, I only remember that to me, it was minor, compared to the wrong numbers being displayed now - apparently the Devs think differently ;)). Anyhow, just because the depot says 3 tiles, doesn't mean it really does require 3. I had the same problem, also with a tram - and it always loaded and unloaded just fine, even though the station was shorter than what the depot said (2 instead of 1 tiles in my case - but everything worked perfectly, as expected with 1 tile - as it should, since the tram did not exceed 16 length units).
  
***** PAK128 Dev Team - semi-retired*****

stmaker

Quote from: DirrrtyDirk on November 18, 2011, 01:57:52 PM
In my scale (presented and explained earlier) I'd probably use length=9 (=36px for the side of the first view) for all 6 cars to make the train fit in perfectly. But I am usually more concerned about sticking to detail than about easy usability in game. Staying with a standard length of 8 however, has some advantages: the whole 6-car train will exactly fit into 3 tiles (1 tile equals length=16). With length=9 you'd need a fourth tile in stations, even though that would be not even filled half way (6/16 to be exact.).

Ok, will keep in mind for that.

Quote from: DirrrtyDirk on November 18, 2011, 01:57:52 PM
I don't think this will lead to a good result. Forget working with photos, it is (as far as I can say) not going to work. Simutrans objects are so small, consisting of so few pixels, that shrinking any photo down to that size will not have any details, probably not even a recognizable form.

Well, those photos help me to create vehicles. I remembered I saw a topic that someone used SketchUp (or Blender) to convert planes to Simutrans.

Is Blender a good choice for making buildings and vehicles rather than SketchUp?
Version using: Simutrans v111.0
Paks: pak64, pak96.comic, pak128 openr582, pak128.Britain, pak128.Japan, pak192.comic
Using: Paint.NET, Paint, Photoshop, SketchUp
Future Addon(s): Building (Link)
Current Addon(s): Eye-See Mart and Several Building addons  Ask me any questions. I'm free.

DirrrtyDirk

There is nothing wrong with either Sketchup or Blender. I guess Sketchup is easier to learn and use, but I think Blender is far more powerful as a tool. However, I have only glimpsed into sketchup myself and never really tried Blender at all, I'm just drawing every pixel by hand up to this date. So I'm really no expert in 3D-modelling or the software to use.

The problem is not the software, but the way you seem to try and put that photo on top of a 3D model - and that won't work (IMO) when you scale things down to simutrans sizes. At least it will probably look anything but pretty that way. But maybe Zeno so some other rendering genius around here can tell you a little more about 3D modelling. As I said: I'm just an old-fashioned pixel-painter myself.  ;)
  
***** PAK128 Dev Team - semi-retired*****