The International Simutrans Forum

 

Author Topic: Making train carriages/passenger cars  (Read 10004 times)

0 Members and 1 Guest are viewing this topic.

Offline stmaker

  • *
  • Posts: 215
  • am lost noaw.
Making train carriages/passenger cars
« on: November 16, 2011, 01:07:25 PM »
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?

Offline MHD

  • *
  • Posts: 199
  • Languages: DE,EN,CZ,FR
Re: Making train carriages/passenger cars
« Reply #1 on: November 17, 2011, 08:14:22 AM »
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....

Offline stmaker

  • *
  • Posts: 215
  • am lost noaw.
Re: Making train carriages/passenger cars
« Reply #2 on: November 17, 2011, 09:54:51 AM »
So there's no limit of dimension of the vehicle being made?

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: Making train carriages/passenger cars
« Reply #3 on: November 17, 2011, 11:11:28 AM »
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.

Offline stmaker

  • *
  • Posts: 215
  • am lost noaw.
Re: Making train carriages/passenger cars
« Reply #4 on: November 17, 2011, 11:34:46 AM »
Oh my.

Are there any clear detailed understandable explanations about alignment offsets? And are there new vehicle templates around?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Making train carriages/passenger cars
« Reply #5 on: November 17, 2011, 02:30:03 PM »
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.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Making train carriages/passenger cars
« Reply #6 on: November 18, 2011, 09:18:04 AM »
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.

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Making train carriages/passenger cars
« Reply #7 on: November 18, 2011, 10:58:43 AM »
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.  ;)

Offline stmaker

  • *
  • Posts: 215
  • am lost noaw.
Re: Making train carriages/passenger cars
« Reply #8 on: November 18, 2011, 11:27:36 AM »
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?

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. ;)

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Making train carriages/passenger cars
« Reply #9 on: November 18, 2011, 12:04:13 PM »
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

Offline stmaker

  • *
  • Posts: 215
  • am lost noaw.
Re: Making train carriages/passenger cars
« Reply #10 on: November 18, 2011, 12:36:30 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. ;)

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Making train carriages/passenger cars
« Reply #11 on: November 18, 2011, 12:41:47 PM »
You might notice that trains in Simutrans are mostly shorter than precise numbers would make them...

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Making train carriages/passenger cars
« Reply #12 on: November 18, 2011, 01:57:52 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...

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.).

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:

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).
« Last Edit: November 18, 2011, 02:11:04 PM by DirrrtyDirk »

Offline stmaker

  • *
  • Posts: 215
  • am lost noaw.
Re: Making train carriages/passenger cars
« Reply #13 on: November 18, 2011, 02:11:48 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.

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?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Making train carriages/passenger cars
« Reply #14 on: November 18, 2011, 02:23:29 PM »
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.  ;)