Asphalt Roads

by Arcitos

Asphalt pavement for increased vehicle speed. Also includes tiles for lane marking (single and double lines) and various hazard areas.

Tweaks
4 years ago
0.14 - 0.18
316

b A few blending/connecting questions/confusions

7 years ago

As there is very little information available that I can find with regard to these, I'd like to inquire as to whether all of these weird corners and blacktop blending on top of lines is correct behavior -- https://puu.sh/uY1mh/bd028138e4.jpg
Also of note is the especially errant non-blending 45-degree corner in the top right.

I'm guessing all of this is limited by game mechanics, but asking for posterity anyway.

7 years ago

Hi Blooskies,

unfortunately, there is little i can do to prevent this problems from occuring, so please let me clarify the reasons for this.

As you assumed, the depicted blending behaviour is caused by the limits of Factorios way to treat tile graphics. Factorio checks the level of every tile (this parameter is defined in the tile.lua) to determine which tile is rendered on top. Subsequently the edges are determinded by scanning how neighboring tiles of the same kind are positioned if there are no other tiles of the same level.

This behaviour is exploited by diagonal line tiles to create the illusion of an uninterrupted line: They are one level above every other asphalt tile, which leads to the depicted "fading out" of neigboring tiles, as diagonal tiles and their edge tiles are rendered with higher priority. The edge tiles are neccessary to fill the "gaps" between the diagonal line tiles. If diagonal line tiles would have the same level as normal asphalt tiles then this edge tiles would not been rendered.
The limits of this method are visible on the corner tiles, that need to be on the normal level and therefore have gaps on their diagonal side.

The colored concrete you placed close to the road seems to have an even higher level, therefore they are rendered on top of the asphalt tiles. If you now place a tile of this kind close to a diagonal line the edge tile is not rendered anymore. This creates the errant transition you observed.

A way to counter this behaviour is avoid placing this tiles to close to eachother. Changing the levels of tiles would be another option (i.e. increase the level of asphalt, so that its diagonal tiles and their edges are rendered above the concrete tiles).

The blending behaviour is clearly not perfect, but of course it was never intended to support this kind of tiles. However, if you overlook some of the imperfections it works still nicely (at least most of the time).

Now i hope that this wall of text answers some of your questions.

New response