I am playing simutrans-extended now, but I found some drawing bug(?) related to tunnel images.1. Tram track on the portal of tunnel is not drawn --- probably behind the backimage of tunnel2. Track catenary behind terrain is drawnThese images (ways, tunnels, way-objects, vehicles, ...) should be drawn behind the front terrain.So I propose the drawing order like this:(back terrain) -> image (way) -> backimage (tunnel) -> backimage(tram) ->backimage (wayobj) -> vehicles -> frontimage(wayobjs) ->frontimage(way) -> frontimage (tunnel) -> (front terrain)However the importance is low... I will try it.[note] This issue can also be seen in standard version.

1. Tram track on the portal of tunnel is not drawn --- probably behind the backimage of tunnel

This seems to be common issue both Standard and Extended.I checked this issue in pak.nippon with both Standard and Extended.

Quote

2. Track catenary behind terrain is drawn

I think No.2 is pakset issue.Generally, the catenary pole and overhead wire on the tunnel entrance tile are hidden by the tunnel image. And the part which does not hide is displayed as it is.

The near side pole is not necessary(except for the terminal end:Image[N],Image[E],Image[W],Image{S]), and it should be supported from the near side tile.For example, North to South catenary image(Image[NS]) need the north side of pole, but the south side pole not needed.

Sorry for my poor Engrish thing. "far side" and "near side" means:Red position is the "far side". Blue position is the "near side".

pak.nippon : Catenary pole is on the far side.pak128.Britain : Catenary pole is on the near side...So in the pak128.Britain, the near side of tram wire pole cannot hide in the opposite side tunnel image.

@Phystam: I cannot reproduce the issue with catenary behind terrain and with catenary painted on tunnel walls in standard. There are some issues with catenary poles visible on tiles to the side of tunnel portals.

Changing the drawing order to show tram tracks inside tunnel portals is possible but it would be quite hackish.

Edit: with commit r8427 some glitches should be fixed: catenary images that were drawn onto adjacent tiles is now hidden behind the terrain.

@Phystam: I cannot reproduce the issue with catenary behind terrain and with catenary painted on tunnel walls in standard. There are some issues with catenary poles visible on tiles to the side of tunnel portals.

Having just checked Standard (and seen results as you describe), that seems to be exactly the same underlying issue; any difference in presentation appears to be due to the differences in the pakset (pak128.Britain has more elaborate catenaries with more widely spaced poles than pak64 does).

The issue in pak128.Britain Extended appears to be because the catenary is rendered after the rendering of the ground of the tile to the south or east. There is some clipping applied to objects, but as far as I can tell this is only for the purpose of rendering vehicles that are straddling multiple tiles. In this case it is evident that we also need to either render the ground after the catenary, or apply more clipping to cover this scenario.In pak64 Standard, the issue is in fact more difficult, because the depicted catenary occupies (3D) space that is not within the tunnel. This suggests that a full solution of this problem requires separate catenary images for use in tunnels, and use in tunnel mouths.

Sorry, pak.nippon was a special case...It is almost not covered with a cover, and the entrance is on the back side.So it seems there is no tram track on the tunnel entrance tile, but it is just one image with road and concrete cover (not separated).If you try to display tram track here, it is certainly hackish... Dwachs and ACarlotti are right.

I cannot reproduce the issue in post #3 in simutrans standard with pak64 or pak128.Britain.

Oops, retested using the latest version and it is indeed fixed there (wasn't fixed in Standard 120.2.2). Once that fix is included in Extended, then I think the only catenary issue remaining that I know of will be that pak64's catenary doesn't fit inside the tunnel. (It still seems reasonable to aspire to separate graphic - in reality you wouldn't generaly put up ordinary poles inside a tunnel; you'd mount the catenary to the tunnel roof/walls).

I think, fundamentally, the problem in Extended is that we're not consistently picking up changes made in Standard (1354 revisions in Standard since the last merge, and I'm not sure wha tthe policy has been since then). I'm going to post about this in the Extended forums.