The International Simutrans Forum

PakSets and Customization => Pak128 Bug Reports => Pak128 => Pak128 Solved Bug Reports => Topic started by: gauthier on April 18, 2010, 01:38:14 PM

Title: graphical glitches of the latest releases
Post by: gauthier on April 18, 2010, 01:38:14 PM
Here is a list of graphical glitches I have noticed to help devloppers ;)

1) Seems to happen with the needs ground property. Here in the meat_packing_plant :
(http://img1.imagilive.com/0410/glitch.jpg)

When I delete what is in front of one tile of this industry (if there is something), the glitch disappear on the concerned tile. But it appears again later.
(You can see that the glitch doesn't appear on the north-east tile since I removed some trees in front of it)

2) Tunnels ...
(http://img1.imagilive.com/0410/tunnel1.jpg)(http://img1.imagilive.com/0410/tunnel2.jpg)(http://img1.imagilive.com/0410/tunnel3.jpg)

3) After terraforming, there are glitches on the concerned tiles :
(http://img1.imagilive.com/0410/terra1.jpg)(http://img1.imagilive.com/0410/terra2.jpg)

4) the eternal bridge glitch ...
(http://img1.imagilive.com/0410/bridge.jpg)


That's all I found now, perhaps I will add some others.
Have a nice work dev. team ;)
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on April 18, 2010, 06:52:55 PM
At first: which version did you run? I suppose, you used some nightly...

1) I cannot reproduce this. Does this happen with all building or just with this particular one? I cannot observe any glitches with the meat packing plant.

2) These are infact two errors: one in the code, which shows a vehicle that is in the tunnel, the other one is in the tunnel-pak: there the way graphic is drawn in top of the vehicle (the way has to be drawn in the background-image, it only happens with the tunnel going west).

3) and 4) are actually the same errors. But they are present in 102.2.2 as well, so a did not introduce new glitches here.

Lets see what I can do with 2-4.
Title: Re: graphical glitches of the latest releases
Post by: prissi on April 18, 2010, 07:59:16 PM
3) & 4) are broken ground tiles. Ground tiles (and ways) should never ever go into the front tile, before it or after it, since the order ground tiles are drawn are not guarantied.
Title: Re: graphical glitches of the latest releases
Post by: Zeno on April 18, 2010, 08:42:18 PM
Quote from: Dwachs on April 18, 2010, 06:52:55 PM
...I cannot observe any glitches with the meat packing plant...

Comparing the picture here with the ones in this thread (http://forum.simutrans.com/index.php?topic=3164.msg31248#msg31248) you can see some areas (to south and west) where ground should be placed. Hope it helps.
Title: Re: graphical glitches of the latest releases
Post by: gauthier on April 18, 2010, 09:19:26 PM
I run 102.3-3151
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on April 19, 2010, 06:19:47 AM
Quote from: gauthier on April 18, 2010, 09:19:26 PM
I run 102.3-3151
Could you please re-test the first bug with a newer nightly and pak128 1.4.6? I cant reproduce this one.
Title: Re: graphical glitches of the latest releases
Post by: gauthier on April 19, 2010, 08:09:39 AM
I will try later, impossible to reach the nightly page now  :-X
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on April 21, 2010, 06:39:36 PM
Something is fixed in revisions 3176 & 3177:

3 & 4) completely

2) the bug in the middle picture, left picture: missing train in tunnel mouth is pak an error, right picture: hard to fix.

1) I could not reproduce, maybe you have a broken pak that misses the needs-ground property?
Title: Re: graphical glitches of the latest releases
Post by: gauthier on April 28, 2010, 06:42:30 PM
It's the original pak downloaded on the nightly page ... I'll try with a more recent one.

I found some other minor glitches, I'm going to see if they're still there in the new releases.
Title: Re: graphical glitches of the latest releases
Post by: gauthier on April 29, 2010, 10:18:33 AM
Quotesim-winsdl_2010-04-29_v102.3_r3190.zip 2.53MB
sim-winsdl_2010-04-27_v102.3_r3185.zip 2.53MB
sim-winsdl_2010-04-26_v102.3_r3184.zip 2.53MB
sim-winsdl_2010-04-25_v102.3_r3182.zip 2.53MB
sim-winsdl_2010-04-22_v102.3_r3179.zip 2.53MB
sim-winsdl_2010-04-21_v102.3_r3175.zip 2.53MB

Can't find 3176 or 3177 :'(

The bug is fix in later releases too ?

EDIT : that's good there're fixed ;)
I'm checking if the glitches I found are still present in r3190.

EDIT² : these are the three glitches I found.
The third happen only with the grey platform.
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on April 29, 2010, 12:32:18 PM
Thank you for investigating! Simply take the newest nightly to test for glitches.

As to your bugs:

Bug1: the signal is overdrawn by the pole of the tile behind. Hard to fix. Maybe move the signal some pixels to the front in the pak?

Imho, the other two glitches are pak-errors: the supermarket has this missing pixels. And this grey platform is missing some pixels in its foreground images to overdraw the foreground images of the stations behind.
Title: Re: graphical glitches of the latest releases
Post by: gauthier on April 29, 2010, 01:33:12 PM
in the 1) it seems to be the catenary of the crossing which hide the signal.
in the 3) I think it's that the forward part of the platform is defined as back image.

EDIT : Useless to show a screenshot for the tree's placing problem  :D
Title: Re: graphical glitches of the latest releases
Post by: VS on April 29, 2010, 02:58:05 PM
#3 - Yep, comes from pak. Actually at least 4 stations have this problem now.
#2 - I don't know how would I check that... investigating.




#3 (stations) is fixed now.
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 03, 2010, 01:47:27 PM
There are two problems with trees.

1) as everyone know there are sometimes placed on a tile next to their one.
possible solution : on a tree source file we could define a "base pixel" which must be the base of the trunk.
Afterwards the code of tree's placing should be fixed, so trees will be placed only on their tile.

2) as you can see in attached picture : tree's shadows sometimes intersect so it's a complete blackout ...
Two solutions :
a heavy solution would be generate a 50% transparent shadow under the tree.
an easier one would be to make shadows all at the same place on the source files and in the code force the trees to place only on certain pixels so shadows can't intersect.
Title: Re: graphical glitches of the latest releases
Post by: VS on May 03, 2010, 05:35:53 PM
Anyone wishing to take a shot at trees, it's probably void baum_t::calc_off() And I don't understand it, but that's okay, because I can try it á la Monte Carlo... And it seems its results are good. (Charts are anisotropic so look at axes)

Perhaps there is an hidden assumption about tree alignment that is violated by graphics? Such as that the tree "starts" in the center of tile? It feels that way. Most of pak128 trees aren't centered, but made to fit on tile, so...

I'll look if there isn't even a problem with tile size - the code gives randomization in fixed range, while it should perhaps vary that...

edit: Spot on with graphics requirements - everything old in 64 (ls_*.png) is centered.
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on May 03, 2010, 06:52:15 PM
Imho it looks like trees should be centered at a tile.

The offset-calculation looks right for flat tiles (case 0:). There should be a calculation of the offsets for all different slopes differently, these three different cases cannot cover all possible slopes right. After rotation the offset is wrong anyway (the tree magically changes its position in 3d space, here a z-offset is needed or some sophisticated rotation calculation). After rotation the sorting of trees on a tile has to be corrected too.

Long list of possible bugs (all what I remembered now).
Title: Re: graphical glitches of the latest releases
Post by: VS on May 03, 2010, 07:12:04 PM
Rotations aside, perhaps the resulting areas are clipped so that they are always inside resulting visible tile? Also, it seems there is this TILE_STEPS thing so tile size does not matter. False alarm :)

Tree images should be easy to fix on pakset side with offsets (I hope!). The hard part is of course finding the offsets :P

edit: this is a very productive thread...

edit2: Perhaps recalculating position after every rotation would be enough? So that after rotation, placement is correct, but not a rotation of old placement. Yes, this is "lossy", but does it really matter much? When there is a bunch of trees on a tile, it does not matter to me much how are they arranged... If it is still absolutely critical to maintain the spatial pattern after full 360°, these randoms could be replaced by something deterministic inferred from coordinates. As a bonus, if you used rotation as part of that calculation, you could possibly make it work 100% if it was some table lookup (that's lossless again with some work to get the tables to match).
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 03, 2010, 09:56:47 PM
I definitly can't understand anything what you're talking about XD

The solutions I purposed seem to be wrong ... why ?
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on May 04, 2010, 05:01:23 AM
:D

We are talking about your problem number 1. It seems like the code already assumes a certain position of the tree graphic: namely the root of the tree should be in the center of the tile (in the png files). Then the wrong positioning of trees comes from the wrong positioning of the trees in the paks.
Title: Re: graphical glitches of the latest releases
Post by: VS on May 04, 2010, 11:43:47 AM
#1 in first post was real. I just noticed... for some reason here the building worked well even without needs_ground.

Hmmm. Perhaps instead of restarting bug numbers for each post, they should keep increasing.

A quick recap so far:
* needs_ground - pakset, fixed
* tunnels - pakset, fixed; code?
* terraforming & bridge - ?
* signals - ?
* supermarket - probably pakset, todo
* platforms - pakset, fixed
* tree placement - pakset, todo
* tree shadows - ?
Title: Re: graphical glitches of the latest releases
Post by: prissi on May 04, 2010, 12:58:37 PM
Since most of the remaining bugs are pak128 dependent, moved this topic there.
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on May 04, 2010, 02:32:13 PM
Quote from: VS on May 04, 2010, 11:43:47 AM
A quick recap so far:
* needs_ground - pakset, fixed
* tunnels - pakset, fixed; code  should be fixed - needs confirmation of bug reporter
* terraforming & bridge - code  should be fixed - needs confirmation of bug reporter
* signals - ?
* supermarket - probably pakset, todo
* platforms - pakset, fixed
* tree placement - pakset, todo
* tree shadows - ?

As to the signal bug:  maybe remove the overheadwire-pole? I mean, it is not clear whether the ne and sw poles should be drawn before or after vehicles. In fact, the ne-pole should be drawn after vehicles driving n-s but after vehicles driving e-w! Such glitches can be observed in the game. Conclusion: remove these poles.

Tree shadows: there is nothing that can be done in the program. Imho this is not so important ...
Title: Re: graphical glitches of the latest releases
Post by: VS on May 04, 2010, 03:43:40 PM
You're right that the side poles are ambiguous, and that alone is reason to remove them and thus resolve this.

But the signal / pole clash has a different reason. Graphics, but these are again forced by other circumstances. Let me explain. The poles are on the crossing tile, 4 around the center. Nothing wrong there, I think. What is causing problems is the signal, which is moved forward from its "home tile". And that, I guess, is because of where trains stop - far in front of tile. So one could conclude the vehicle movement algorithm is behind this...

Tree shadows can die :P

Thanks for all the reports (gauthier) and fixes (Dwachs)!
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 04, 2010, 04:49:29 PM
normally a thing on a tile should be drawn after things on the tile behind, write ?
The signal must be drawn after the electrification ...
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on May 04, 2010, 07:05:01 PM
Quote from: gauthier on May 04, 2010, 04:49:29 PM
normally a thing on a tile should be drawn after things on the tile behind, write ?
The signal must be drawn after the electrification ...
This is how its used to be. Now this is more complicated to fix the glitches with vehicles and stations:

The drawing sequence per tile is:
a) background images
b) background image of tiles in front (if ways are connected, only the part that goes into the tile behind is drawn)
c) vehicles on tile
d) vehicles on tile in front
e) front images
f) front images of tiles in front

Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 04, 2010, 08:25:28 PM
I see ...

This is a problematic trouble ... I will think about it some days, if I find a solution I say it ;)
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 13, 2010, 03:00:49 PM
happens with all stations.
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on May 13, 2010, 03:36:36 PM
??? what are we suppose to see? what is the bug here? the tree?
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 13, 2010, 03:39:49 PM
another one (sorry for tiple post)

But I had an idea to make all tunnels'entries glitches disappear easily.
Why not add a special color which would be put around the tunnel entry (in the source pictures) at the place of the slope, and in game this color would be drawn other every thing (catenaries, signals, vehicles, ...) and replaced by the normal slope picture ?

I hope you understand my idea, if it's not clear I can draw some schemas ;)

(yes the bug is the tree between the two platforms of the station)

EDIT : one more : the red station must be like the green one, this layout glitch seems to be caused by some underground constructions.
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on May 13, 2010, 03:53:41 PM
Quote from: gauthier on May 13, 2010, 03:39:49 PM
But I had an idea to make all tunnels'entries glitches disappear easily.
Why not add a special color which would be put around the tunnel entry (in the source pictures) at the place of the slope, and in game this color would be drawn other every thing (catenaries, signals, vehicles, ...) and replaced by the normal slope picture ?

I hope you understand my idea, if it's not clear I can draw some schemas ;)
I understand, had the same idea some time ago. But no idea how to implement this.

Quote
(yes the bug is the tree between the two platforms of the station)
on which tile is the tree actually? behind the station / on the station tile / under the station ?


Edit: what station-pak is that on the screenshot? could you upload a savegame somewhere (with addons that do not belong to plain pak128)?
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 13, 2010, 04:06:11 PM
It happens with every station, the tree is of course behind the station. But I realised that in fact it's the tree placement problem, so it's not a independant glitch ;)
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on May 13, 2010, 05:31:02 PM
Quote from: Dwachs on May 13, 2010, 03:53:41 PM
Edit: what station-pak is that on the screenshot? could you upload a savegame somewhere (with addons that do not belong to plain pak128)?
I meant the ituation on bug2012-endofworld.
Title: Re: graphical glitches of the latest releases
Post by: VS on May 13, 2010, 06:50:20 PM
I don't even understand what is 2012 showing. Are the wires connected across wrong tiles?
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 13, 2010, 08:46:46 PM
you see two stations, each one is pointed by an arrow. They're SNFOS stations, with 8 pictures. Normally the extremity of the station is the same as the one pointed by the green arrow. But there's a glitch pointed by the red arrow which occurs when something is built under the station. I often see this glitch.
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on May 14, 2010, 05:27:49 AM
@gauthier: please upload a savegame together with the needed snfos pak's. I could not reproduce this with a pak.german station.
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 14, 2010, 09:07:11 AM
This glitch seems to be already fixed, deleting and rebuilding the station made it disappear :/

EDIT : it dissapeared since I removed stations underground ...

How to reproduce it :
1) build station underground
2) build station above it on the ground (if you have a 8/16 layouts station you will see it).

A schema :

____SSS____ (stations)
==SSSSSS== (underground)

The underground station must be longer than the overground one and the overground one must be built after the underground one. But this glitch also happen underground if you build the underground station shorter and after the overground one.
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on May 14, 2010, 09:32:00 AM
I see. However, this works as intended. Stations should show end-of-platform-picture if there is a halt on the next coordinate (on which height does not matter actually).
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 14, 2010, 12:52:43 PM
Yes so the height should matter ;)
Title: Re: graphical glitches of the latest releases
Post by: VS on May 14, 2010, 02:08:03 PM
I also think it should detect stations on same level, not on any... but I don't care much right now, anyway :)
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 14, 2010, 09:13:50 PM
QuoteI also think it should detect stations on same level

That's what I said, isn't it ? ;)

There's still a tunnel problem in pak128, do you plan to fix it ?
Title: Re: graphical glitches of the latest releases
Post by: VS on May 17, 2010, 08:36:42 AM
Which problem? I fixed the tunnel mouths earlier, unless there is some trick with texture Dwachs has planned, I can't do much...
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 17, 2010, 03:52:02 PM
I will try with the latest pak128.
Title: Re: graphical glitches of the latest releases
Post by: VS on May 20, 2010, 08:44:29 PM
Trees have been fixed. All of them. Ugh.

I had to make a program for that ;D
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 20, 2010, 09:08:26 PM
wow nice, congrats ;)
Title: Re: graphical glitches of the latest releases
Post by: VS on May 22, 2010, 11:26:33 AM
Ok, ambiguous poles for wires also fixed...
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 22, 2010, 02:30:03 PM
simply awesome, you're a genius :D
So I don't see any glitch currently, I'm going to investigate more and more ;)
Title: Re: graphical glitches of the latest releases
Post by: VS on May 22, 2010, 05:59:16 PM
Thanks a lot, you're the bug reporter #1 ;D
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 30, 2010, 12:45:05 PM
Some little things here.
From the first screenshot to the last :
_ Many glitches with trams.
_ The SBB IC2K is a bit hard to unlock ... (see intro date)
_ A harder problem : coasts. A possible solution : make the place where is the the water transparent on source picture, and display a normal water tile under the coast in the game.
_ When ctrl+click on multiple orientations station extension ...

offtopic : main pak128 is not more avaible on nightly simutrans site ... it disappeared ?
Title: Re: graphical glitches of the latest releases
Post by: VS on May 30, 2010, 02:45:35 PM
#36 and #39 should be engine problems.

#37 is intended. You should not buy te vehicle, it is present for compatibility. There is no better way to make the it disappear :(

#38 can be hopefully fixed in pakset :)

Main pak128 is not in nightlies any more. (repeated maybe for 15th time)
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on May 30, 2010, 03:20:23 PM
Bug 36: after rotation such things can happen, should be correct, if the vehicles drive to the next tile.

As to the trams: does this happen with every type of tram/road vehicle? Or only for specific ones?

Could you please upload a small test savegame, where this happens? I do not have time to test myself.
Title: Re: graphical glitches of the latest releases
Post by: gauthier on May 30, 2010, 03:33:52 PM
#36 seems to happen only with a few trams.
Title: Re: graphical glitches of the latest releases
Post by: VS on June 05, 2010, 06:45:53 PM
Here's another one... from me :o
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on June 06, 2010, 07:24:57 AM
#40: Hard to fix. At least the parts of the wire on the tunnel tile can hardly be surpressed :/

#36: Need a savegame.
Title: Re: graphical glitches of the latest releases
Post by: gauthier on June 06, 2010, 08:44:12 AM
ultra-light savegame for #36 ;)

for #40
QuoteBut I had an idea to make all tunnels'entries glitches disappear easily.
Why not add a special color which would be put around the tunnel entry (in the source pictures) at the place of the slope, and in game this color would be drawn other every thing (catenaries, signals, vehicles, ...) and replaced by the normal slope picture ?
And the tile before should be drawn after the tunnel entry.
Title: Re: graphical glitches of the latest releases
Post by: gauthier on June 09, 2010, 08:37:28 PM
New one ! The back bus is shown behind the back barrier of the level crossing and the front bus is shown before the front barrier of the level crossing.
Title: Re: graphical glitches of the latest releases
Post by: gauthier on June 11, 2010, 08:54:09 PM
new one with a citycar of pak128 ...
Title: Re: graphical glitches of the latest releases
Post by: Václav on June 14, 2010, 06:01:48 PM
And one glitch by me:
(http:///filestore/71/vGWrshtyxl.Podzemi_Chyba_VMaX.png._)

Strange cutting of border side of stations in underground - when station is close to slope.
Title: Re: graphical glitches of the latest releases
Post by: Dwachs on June 14, 2010, 07:08:57 PM
Yes, also trains will be clipped at such a location.

On your screenshot, the sloped tile is in charge to draw the missing parts, but since this tile is not visible nothing is drawn. Hence, something is missing.
Title: Re: graphical glitches of the latest releases
Post by: Václav on June 14, 2010, 07:27:18 PM
... oh ...

I forgot to write it is when sliced underground mode is used - but it seems you guessed it right.

Upper part is showing that glitch, lower part is showing full state (when underground is showed all).