Train car length changes depending on orientation?

Post all other topics which do not belong to any other category.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3716
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Train car length changes depending on orientation?

Post by DaveMcW »

Here are the results of trying to force trains to a 7-tile grid using only spaces.
Attachments
train-spaces.jpg
train-spaces.jpg (2.45 MiB) Viewed 6469 times
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Train car length changes depending on orientation?

Post by ssilk »

What I can see immediately is that the vertical expansion looks stupid.
Thanks for this insight.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Re: Train car length changes depending on orientation?

Post by imajor »

DaveMcW wrote:Here are the results of trying to force trains to a 7-tile grid using only spaces.
What if you mix the two hacks? So increase the empty space, but the same time scale the length of the wagon somewhat?
Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: Train car length changes depending on orientation?

Post by Zeblote »

ssilk wrote:What I can see immediately is that the vertical expansion looks stupid.
Thanks for this insight.
Well that's because he hasn't done it properly. He just moved them further apart.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Train car length changes depending on orientation?

Post by ssilk »

Might be, that it is not made properly, but it is more than needed. I really can imagine in my brain, how it will look, even if it is made very, very properly.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: Train car length changes depending on orientation?

Post by Peter34 »

I like the current level of graphics quality, but whenever I look back at much earlier Factorio, I always think that that's actually a bit too crude, a bit too ugly. I wouldn't have wanted to play that. There are minimum standards that have to be met, in order for a game to be taken seriously by a lot of people. You can't neglect graphics quality completely.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1686
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Train car length changes depending on orientation?

Post by MeduSalem »

The problem is that the Train Cars are simply... wrong... in comparison to all other sprites. Always have been. There is no discussion about that.


First of all to clear up which projection Factorio is using... Take a close look at the following axonometric projections taken from Wikipedia:
Projections
The game is using the one in row 3, column 3. No Isometric Projection or anything else. It's a special case of the military projection where the x and z axis are in line.


Anyways independent from which Projection the game is using the thing that is utterly wrong when comparing Train Cars to everything else is the following fact:
  • Everything except the Train Cars is using a scaling factor of x=y=1, while z-axis-scaling is somewhat "clinched" so that foreground objects don't block background objects that much.
  • Train cars are using a scaling factor of x != y, which is the first huge mistake and additionally the z-axis scaling might also not be identical to what everything else is using.
For reference: x=z = vertical axis, y = horizontal axis

The latter causes the trains to look awkwardly stupid no matter how much one fiddles around with the sprites taken from the game. To solve the problem first the x and y axis have to be made identical and then the z-axis scaling matched to the one of everything else. That should actually fix the notorious train car problem.
Nemoricus
Filter Inserter
Filter Inserter
Posts: 255
Joined: Mon Jan 19, 2015 7:48 am

Re: Train car length changes depending on orientation?

Post by Nemoricus »

MeduSalem wrote: The latter causes the trains to look awkwardly stupid no matter how much one fiddles around with the sprites taken from the game. To solve the problem first the x and y axis have to be made identical and then the z-axis scaling matched to the one of everything else. That should actually fix the notorious train car problem.
This is much easier said than done, since it implies reworking the graphics of literally everything in the game.

I don't expect that we'll see a resolution for this soon, if at all.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1686
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Train car length changes depending on orientation?

Post by MeduSalem »

Nemoricus wrote:...since it implies reworking the graphics of literally everything in the game.
Not necessarily. Rendering the vertical/diagonal Train Car sprites from scratch in the same projection all the other game sprites were done would suffice as a solution. This means setting the projection to angle between x&y=90°; y&z=90°, scaling of x=y=1 (which equals to unshortened base area of the object in both directions) and scaling of z<1 (to control its "height").

This should solve the problem entirely (at least if one doesn't want to invest more resources in developing a proper axonometric projection) because x=y, so rotating by 90° actually doesn't change the train length anymore. That is without the train cars looking awkwardly "too long" because the "height effect" gets mitigated by z<1 scaling.



That said the special case of a military projection Factorio is using where the x and z axis fall into the same plane/axis (angle in between them being exactly 180°) was a poor design decision in the first place. No offense meant, but it was a poor design decision a first year student in geometry would make in the believe of making things easier on the short term but causing lots of trouble on long term. I hope this will get fixed in Factorio 2 eventually which will hopefully use a proper Axonometric Projection or a real Perspective. :D

The problem is it creates causality and comprehension problems for someone who doesn't know the true shape of the 3D object the projection originated from. Since 2 axis are reduced to one and the same axis the projected image unavoidably looses information about the original object, which is why such projections are rarely used in architecture, engineering and elsewhere.

The Train Cars are the best example for such a causality/comprehension problem. Their sprites have to be a simple product of imagination compared to everything else. If I would have to take a wild guess there don't exist any 3D models behind the train cars as they were from a period of game development where the devs resorted on 2D drawings only and they screwed up badly in x&z-axis scaling OR that the sprites were captured in a projection differing greatly from all other objects before they set standard rules for the projection used for rendering 3D objects into 2D sprites, which is also a screw-up. Thereby causing a lot of problems when trying to understand why they don't fit with the rest of the game.

Other games share similar problems with the projections not following any "realistic" projection rules at all, like for example Prison architect that is a composition of 2 different projection types, resulting in a visually pleasing/sufficient image, but one that is geometrically completely wrong and unrealistic. But there it is do-able because the sprites are hand-drawn and simple enough, something that cannot be said about Factorio because of the High Quality sprites.

Those problems are mostly the reason behind why most games are eventually using other types of projections where only a maximum of ONE angle between any of the three axis equals 90°, while the remaining are freely chosen. That resolves the problem on how to deal with the x and z axis falling into the same plane, the later being the cause of the scaling problem.

Anything differing from a true perspective will always look somewhat awkward because nature meant us to have a true perspective with depth perception, with all the attributes that come along with that, like parallel lines seemingly converging to a point and things becoming proportionally scaled the further away they are from the viewpoint.

So the only way to eventually not make it look too strange while remaining to use axonometries is to either use Isometric/Dimetric/Trimetric Projections, a true Military Projection (Angle between x & y = 90°) or Cavalier Projection (Angle between y & z = 90°).
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Train car length changes depending on orientation?

Post by ssilk »

MeduSalem wrote:
Nemoricus wrote:...since it implies reworking the graphics of literally everything in the game.
Not necessarily. Rendering the vertical/diagonal Train Car sprites from scratch in the same projection all the other game sprites were done would suffice as a solution. This means setting the projection to angle between x&y=90°; y&z=90°, scaling of x=y=1 (which equals to unshortened base area of the object in both directions) and scaling of z<1 (to control its "height").
MeduSalem, we had that already.

The result will look like so:
Image
Taken from https://forums.factorio.com/forum/vie ... 37#p109337
You see, it looks a bit strange as the graphics of the wagons are stretched vertically. Maybe it works, but I think it could be a bit complex to render this thing without projection errors.
This should solve the problem entirely (at least if one doesn't want to invest more resources in developing a proper axonometric projection) because x=y, so rotating by 90° actually doesn't change the train length anymore. That is without the train cars looking awkwardly "too long" because the "height effect" gets mitigated by z<1 scaling.
Then the train will look strange. Maybe. I don't really know, but I think I can imagine enough to see that it is not so easy and that the devs had a reason to make it like it is.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1686
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Train car length changes depending on orientation?

Post by MeduSalem »

ssilk wrote:The result will look like so:

[...]

You see, it looks a bit strange as the graphics of the wagons are stretched vertically. Maybe it works, but I think it could be a bit complex to render this thing without projection errors.

Then the train will look strange. Maybe. I don't really know, but I think I can imagine enough to see that it is not so easy and that the devs had a reason to make it like it is.
Ah I see we are engaged in a philosophical debate here. So either we have "realistic" rendering enabling to have rotation-secure train cars/stations or we make "trade offs" gameplay-wise because the projection chosen for the game turns out to be fundamentally flawed/problematic just because some people can't stand how "awkward" the special edge case of Factorio's projection looks like when rendering it "realistically".


At least the object shown in the gif would be an approximately correct rendering of the behavior of a train car when turning around. It may look strange for some people, but it doesn't because the changing size is only an optical illusion caused by the "height projection" of the object. It is the projection the devs chose for the game itself that is the true problem why things rendered "correctly" look awkward to the common human eye way more often than it could be.

That's why I said it was a "bad" design decision to chose this form of projection as a base for the game. In proper chosen axonometric projections that problem doesn't arise in that amount (though still being there) except for extreme edge cases like Factorio's projection which is a rare special case of axonometric projections that causes this kind of problems in real applications a lot more noticable.

In Dimetric projections (Including Isometric and Military) it would also happen, but there the diagonals (which would be horizontal & vertical then) would be the problematic zones instead. But since the grid is dimetric the most objects would be dimetric as well, including train tracks. That said the diagonals would still suffer the same problem as the current projection, but they would be much less common in that case because realistically how much diagonal stuff do people build?

This behavior can be observed in games like Sim City 4 for example... as long as one builds with the grid there is no problem, but as soon as one builds diagonally things get awkwardly stretched. But since building diagonally is less common than building with the grid... the problems are better mitigated/hidden. Also in Sim City 4 they resort on a Trimetric Projection, which means that even the diagonals are not completely aligned horizontally/vertically, which hides the scaling problem even further. They did a great job when selecting the base projection for that game.


As for how "hard" it is to render the train cars correctly... well it is not that hard. They already have the correct projection settings around because they use it for all other objects. Re-Render and be done with. It would problaby even simplify the behavior calculation of train couplings and several other things related to that they had to botch around with to make them work with the incorrect projection of train cars.


There is no other available solution other than the four below:
  1. Leave everything as it is, but cause another 100 debates over the same problem because it won't go away.
  2. A compromise of only changing the train cars a little bit but as 1) suggests it would also end in 100 debates as to why it is still not equally scaled both horizontally and vertically.
  3. Re-Render the Train Cars to the correct projection Factorio is using. Causes 100 debates because it may look awkward to some due to the illusion of changing lengths/scales.
  4. Change the entire axonometry of Factorio to some form of Trimetric/Dimetric/Isometric/Military Projection. Everything has to be rerendered and un-imaginable amounts of code rewritten to make it possible.
As for now I would go either for 2) (which seems legit for both parties) or 3) (which would be the correct solution but not the most pleasing one to look at). Thereby real satisfaction won't be achieved in Factorio 1.

My advice for a future Factorio 2 would be... Have a real perspective or make the damn projection a balanced Trimetric one like in Sim City 4 where the scaling is massively mitigated by the chosen projection itself and no one will ever bother with that stupid Train Car problem ever again.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1686
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Train car length changes depending on orientation?

Post by MeduSalem »

Well I have been bored and after giving some thought to it, the axonometry with the least z-scaling problems while remaining a square grid would probably be the following special military projection I drafted with the values specified:
Projection
Angles: xy = 90°; xz = 112.5°; yz = 157.5°
Scaling factors: x = y = 1; z ≤ 1.

The above approach to a projection would only have noticable z-scaling problems when a train is exactly at the peak of south/east/west/north curves because there would be a point where the projection will be exactly vertical (parallel to z-axis) or horizontal (90° to z-axis). But it would only happen in the curves while the rest of the time the scaling is almost uniform and thereby acceptable.

The red-dotted 45° diagonal grid is the green-dotted orthogonal grid mirrored around the z-axis. It works because the angle of the axis of both grids are as far away from the z-axis as possible. This effectively allows 4 common directions to share almost the same z-scaling without looking too strange.

Everything diverging from that will suffer major z-scaling problems, at least when remaining a square grid. The z-scaling problems become more prominent during regular gameplay the more a line becomes parallel to the z-axis. In Factorio's case... pretty much everything, but especially the train cars.



If I had to do a simplistic axonometric game or something I would probably resort on using that projection above because it allows for simplistic sprites (a lot of flipping/rotating possible), while minimizing the z-scaling problem to an absolute minimum.

Also I want that special projection to be called after me if it ever gets mentioned in a geometry book in the future or something. :lol:


But yeah, otherwise than looking in-depth into the projection problem there is not much to it. I don't really expect the devs to change anything on the matter anymore or at least not for Factorio 1. Altough my above solution might even be adapted for the current Factorio because it basically would tilt the grid only by 22.5° for the graphical display, but all the sprites originating from 3D objects would have to be re-rendered to match the new projection viewpoint. Don't know if it is worth the effort even if it would hack a way better axonometry into the game and help mitigating the z-scaling problems and still be compatible with existing savegames. I wonder what Factorio would look like with the projection above. xD
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Train car length changes depending on orientation?

Post by ssilk »

I like, that you go so deep into this subject. My post just wanted to point to already discussed parts, not philosophical discussion.

I'm with you, that I think there needs to be some change in the train/train station or whatever, cause this is - also already discussed - some kind of very unpredictable behavior of the train station. I think it goes into the direction of your suggested point 2).
There are much more suggested ideas how to solve this in this thread than only yours (which does not mean, that yours are bad or so, it's just that I want other readers to read the whole thread before answering). For example: One very simple idea was to make the difference between horizontal and vertical train stop very clear by having two types of train stops: one for vertical, one for horizontal. That is a very simple and working solution, but of course too simple; but what it shows is, that there are much more ideas how to fix this than just fixing the geometry.

The end-result is the key: Me as a player of Factorio want to have fun with the trains, so I don't want to care about horizontal/vertical or - other idea - it should be very clear that there is a difference.

The rest is task of the devs. :twisted:
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: Train car length changes depending on orientation?

Post by Zeblote »

ssilk wrote: - other idea - it should be very clear that there is a difference.
It should be very clear that it makes no sense?
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Train car length changes depending on orientation?

Post by ssilk »

The rest is task of the devs.
I don't care about the way, how this is resolved, in the end it counts only how good I can play with it.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
hitzu
Filter Inserter
Filter Inserter
Posts: 539
Joined: Tue Sep 09, 2014 5:55 pm
Contact:

Re: Train car length changes depending on orientation?

Post by hitzu »

MeduSalem wrote:The problem is that the Train Cars are simply... wrong... in comparison to all other sprites. Always have been. There is no discussion about that.
...
  • Everything except the Train Cars is using a scaling factor of x=y=1, while z-axis-scaling is somewhat "clinched" so that foreground objects don't block background objects that much.
This is not true. Look at the roboport. Its output hatch is obviously circular, but its projection on the screen is an ellipse (x != y). It proves that at least roboports are rendered in the same way as trains.
Post Reply

Return to “General discussion”