The International Simutrans Forum

 

Author Topic: Special color to be painted as grass  (Read 4969 times)

0 Members and 1 Guest are viewing this topic.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Special color to be painted as grass
« 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.
« Last Edit: April 05, 2012, 02:43:25 PM by Fabio »

Offline emaxectranspoorte

  • *
  • Posts: 241
  • GOD BLESS AUSTRALIA
Re: New special colours
« Reply #1 on: January 14, 2009, 12:05:01 PM »
 ??? grass roof of a tunnel ???

Offline TommPa9

  • Devotee
  • *
  • Posts: 2003
  • PAK128-CZ Grafik
  • Languages: CZ, DE, EN
Re: New special colours
« Reply #2 on: January 14, 2009, 12:10:27 PM »
and what about orange light?

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: New special colours
« Reply #3 on: January 14, 2009, 12:54:43 PM »
??? grass roof of a tunnel ???

something like this:



Offline emaxectranspoorte

  • *
  • Posts: 241
  • GOD BLESS AUSTRALIA
Re: New special colours
« Reply #4 on: January 14, 2009, 01:39:20 PM »
I support. :)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9411
  • Languages: De,EN,JP
Re: New special colours
« Reply #5 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4555
  • Languages: EN, DE, AT
Re: New special colours
« Reply #6 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'.

Offline Roads

  • Devotees (Inactive)
  • *
  • Posts: 645
Re: New special colours
« Reply #7 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?

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: New special colours
« Reply #8 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]

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: New special colours
« Reply #9 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...

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4555
  • Languages: EN, DE, AT
Re: New special colours
« Reply #10 on: January 14, 2009, 07:45:09 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]

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: New special colours
« Reply #11 on: January 14, 2009, 08:12:09 PM »
Oh, that's bad, alright...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9411
  • Languages: De,EN,JP
Re: New special colours
« Reply #12 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4555
  • Languages: EN, DE, AT
Re: New special colours
« Reply #13 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9411
  • Languages: De,EN,JP
Re: New special colours
« Reply #14 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4555
  • Languages: EN, DE, AT
Re: New special colours
« Reply #15 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.