The International Simutrans Forum

Development => Extension Requests => Topic started by: Fabio on January 14, 2009, 12:00:55 PM

Title: Special color to be painted as grass
Post by: Fabio on January 14, 2009, 12:00:55 PM
Hi, what about creating a new special colour for the ground of the climate?

I would like to use it for a grass roof of a tunnel, but it could have much more uses.
Title: Re: New special colours
Post by: emaxectranspoorte on January 14, 2009, 12:05:01 PM
 ??? grass roof of a tunnel ???
Title: Re: New special colours
Post by: TommPa9 on January 14, 2009, 12:10:27 PM
and what about orange light?
Title: Re: New special colours
Post by: Fabio on January 14, 2009, 12:54:43 PM
Quote from: emaxectranspoorte on January 14, 2009, 12:05:01 PM
??? grass roof of a tunnel ???

something like this:
(http://www.brian-lambert.co.uk/Tunnel.jpg)

Title: Re: New special colours
Post by: emaxectranspoorte on January 14, 2009, 01:39:20 PM
I support. :)
Title: Re: New special colours
Post by: prissi on January 14, 2009, 02:02:10 PM
Why not making the tunnel transparent at those places? The entry did not need to cover the entire tile. See pak64 sources.
Title: Re: New special colours
Post by: Dwachs on January 14, 2009, 02:47:52 PM
but then you will get graphic errors (see the pak64 street tunnel). This happens, since currently the ground tile cannot be drawn in foreground (that is be displayed over vehicles that are already in the tunnel).

A special color is needed to indicate 'draw pixels of ground here after everything else'.
Title: Re: New special colours
Post by: Roads on January 14, 2009, 04:03:36 PM
If it can be done, grass would improve the look of areas without trees.  If not, maybe some noise?
Title: Re: New special colours
Post by: VS on January 14, 2009, 04:46:38 PM
Typically this is achieved by leaving a transparent hole in the object. Not sure what happens with vehicles entering the tunnel... it is quite possible that they could be seen through. It could depend on placement.

Anyway, tunnel entrances are usually dug in, not stuck out. Yes, the entrance itself does go forward, but it is in a ditch - there is needed something solid above tunnel. So in the end the entrance should look like this:

[attachment deleted by admin]
Title: Re: New special colours
Post by: Fabio on January 14, 2009, 05:15:34 PM
VS, in order for it to look like this (my original idea) the vehicle would need NOT TO disappear on the tunnel entrance, specially now that there will be a new underground view...
Title: Re: New special colours
Post by: Dwachs on January 14, 2009, 07:45:09 PM
Quote from: VS on January 14, 2009, 04:46:38 PM
Typically this is achieved by leaving a transparent hole in the object. Not sure what happens with vehicles entering the tunnel... it is quite possible that they could be seen through. It could depend on placement.

this is what happens here. It happens to short vehicles too, so length is not the issue. Since the error is so massive, it cannot be an alignement error imho.

Here a special color is needed that indicates 'ground to be displayed over / on top of vehicles etc'.

[attachment deleted by admin]
Title: Re: New special colours
Post by: VS on January 14, 2009, 08:12:09 PM
Oh, that's bad, alright...
Title: Re: New special colours
Post by: prissi on January 14, 2009, 08:18:47 PM
Well, but those vehicle have a pricipal problem. They are not defined with the correct length. The should be length 12 and length 6. Then those errors would be less severe.

Same thing by the way may heppen below bridges with ships.
Title: Re: New special colours
Post by: Dwachs on January 15, 2009, 09:15:51 AM
@prissi: This can be seen also mit shorter vehicles. Dont know which, can't test at the moment.

What is your opinion about the new special color I proposed? That should solve this problem without extra work on the vehicle graphics side.
Title: Re: New special colours
Post by: prissi on January 15, 2009, 09:26:03 AM
Special colors are static. Thus it cannot replace grass, because it would a different one for each climate. Solving this properly would reuire clipping. (By the way, OpenTTD has the same problem, just hides it better using lower vehicles and only on kind of tunnel.
Title: Re: New special colours
Post by: Dwachs on January 15, 2009, 09:45:37 AM
Then for each climate a copy of the graphic needs to be cached in memory? Or more, if transition tiles are respected. A saw a similar strategy somewhere in the code.