NRT: technical purpose of road/tram underlays and overlays in NML
Moderator: Graphics Moderators
NRT: technical purpose of road/tram underlays and overlays in NML
Hello
What is the "default" purpose of underlay and overlay sprites for road and tram types? In my set I use the underlay for the road sprites (without pavements) and the overlay in example for road markings. I used the freely available code of other NRT sets as a guide but I think, I oversimplified it.
After inspecting the example in the NML-repository I am absolutely confused because the example with yellow, green, red and blue road types does not clarify anything for me. All road type sprites (underlay and overlays) looks (beside the different colours) the same, all sprites covers the same areas.
What is the purpose of the underlay if it is completely covered by the overlay?
I would like to be able to provide sprite replacements for the roads with pavements. This for roads, that should get pavements in the inner city areas but also for roads, that shouldn't get pavements at all. On the other side I would like to prevent the need to draw own grass sprites as pavement replacements because this would make the set stylistic depending on a base set. Is there a simple solution with the underlay-overlay-system? As far as I know it is (at least in NML) not possible to replace one base set sprite with another base set sprite (i.e. road with pavement sprite with a grass sprite).
Thanks in advance and tschö, Auge
What is the "default" purpose of underlay and overlay sprites for road and tram types? In my set I use the underlay for the road sprites (without pavements) and the overlay in example for road markings. I used the freely available code of other NRT sets as a guide but I think, I oversimplified it.
After inspecting the example in the NML-repository I am absolutely confused because the example with yellow, green, red and blue road types does not clarify anything for me. All road type sprites (underlay and overlays) looks (beside the different colours) the same, all sprites covers the same areas.
What is the purpose of the underlay if it is completely covered by the overlay?
I would like to be able to provide sprite replacements for the roads with pavements. This for roads, that should get pavements in the inner city areas but also for roads, that shouldn't get pavements at all. On the other side I would like to prevent the need to draw own grass sprites as pavement replacements because this would make the set stylistic depending on a base set. Is there a simple solution with the underlay-overlay-system? As far as I know it is (at least in NML) not possible to replace one base set sprite with another base set sprite (i.e. road with pavement sprite with a grass sprite).
Thanks in advance and tschö, Auge
Re: NRT: technical purpose of road/tram underlays and overlays in NML
The example in the NML repo is not meant to be very sensible graphics-wise, it is just showing a (very) basic implementation code-wise.
The difference in purpose for underlay and overlay sprites is very obvious for tramtypes where the underlay is used for the ballast, which is drawn only for grade-separated tramways, while the overlay sprites are the rails which get drawn everywhere.
For roadtypes this distinction is less clear since both underlay and overlay sprites are always drawn (if provided), so it basically just comes down to your own preference in how you want to structure your set. Some people (like myself) don't use overlay sprites at all for roadtypes and instead just bake all the details into the underlay sprite. This works well enough if all of your different roadtypes are visually unique. For other cases however where you want to have one road texture, but several variations of lane markings or sidewalks or other details, then it may make more sense to use overlays for those things to reduce duplication of sprites. But it is really up to you, both ways will work (mostly) fine in any case
As for changing the base sprite for city roads, I don't think there is a better way to do it than replacing them with your own terrain sprites, as annoying as that is. It used to be that all roads kept the base road sprite underneath them like that, then at some point it was changed for the rural roads to draw grass underneath instead, but for some reason that change was not applied to the city roads as well. Not sure if there was a good reason for that or not, but perhaps that's something to look into to ask about changing
The difference in purpose for underlay and overlay sprites is very obvious for tramtypes where the underlay is used for the ballast, which is drawn only for grade-separated tramways, while the overlay sprites are the rails which get drawn everywhere.
For roadtypes this distinction is less clear since both underlay and overlay sprites are always drawn (if provided), so it basically just comes down to your own preference in how you want to structure your set. Some people (like myself) don't use overlay sprites at all for roadtypes and instead just bake all the details into the underlay sprite. This works well enough if all of your different roadtypes are visually unique. For other cases however where you want to have one road texture, but several variations of lane markings or sidewalks or other details, then it may make more sense to use overlays for those things to reduce duplication of sprites. But it is really up to you, both ways will work (mostly) fine in any case
As for changing the base sprite for city roads, I don't think there is a better way to do it than replacing them with your own terrain sprites, as annoying as that is. It used to be that all roads kept the base road sprite underneath them like that, then at some point it was changed for the rural roads to draw grass underneath instead, but for some reason that change was not applied to the city roads as well. Not sure if there was a good reason for that or not, but perhaps that's something to look into to ask about changing
Re: NRT: technical purpose of road/tram underlays and overlays in NML
Hello
Thank you very much for your advice.
Tschö, Auge
This is also, how I interpreted it. Haven't implemented the tram track types into my set until now but that makes me moving straight forward instead trying it out again and again. Thanks for your clarification.
I implemented the lane markings as overlays. So it is o.k. to do it that way.Andrew350 wrote: ↑20 Jul 2023 02:35 For roadtypes this distinction is less clear since both underlay and overlay sprites are always drawn (if provided), so it basically just comes down to your own preference in how you want to structure your set. […] For other cases however where you want to have one road texture, but several variations of lane markings or sidewalks or other details, then it may make more sense to use overlays for those things to reduce duplication of sprites. But it is really up to you, both ways will work (mostly) fine in any case
What a pity. To make this looking proper one needs to provide the OpenGFX grass tiles and to adapt self drawn nearly original looking grass sprites at least. Not to even think about further base sets. O.k., it's currently as it is.
At least with a loaded NRT-set it would be nice to not loading the default road-with-pavement underlays and to leave it to the set author to provide proper sprites and code (maybe with switching to the default sprites).Andrew350 wrote: ↑20 Jul 2023 02:35 It used to be that all roads kept the base road sprite underneath them like that, then at some point it was changed for the rural roads to draw grass underneath instead, but for some reason that change was not applied to the city roads as well. Not sure if there was a good reason for that or not, but perhaps that's something to look into to ask about changing
Thank you very much for your advice.
Tschö, Auge
Re: NRT: technical purpose of road/tram underlays and overlays in NML
I was seriously considering opening a bug report to change this behavior (since it is wrong, as far as I'm concerned), unfortunately pretty much every roadtype set in existence relies on replacing the base city road sprites (1313-1331) with their own sprites in order to work, which means changing it now to the correct behavior (using terrain sprites instead) would almost certainly break just about every roadtype NewGRF, so it is unlikely to ever be an accepted change*
*Unless somehow every NRT author could be convinced to adapt to it...
Re: NRT: technical purpose of road/tram underlays and overlays in NML
If this is truly the proper way to do it, then it should be done. Any author who doesn't update either isn't developing for OpenTTD anymore or doesn't care and their stuff should be left behind and considered obsolete. And if their project is open source, then it can be forked by somebody who cares enough to change. it.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: NRT: technical purpose of road/tram underlays and overlays in NML
Would this open a door to custom tunnels per roadtype?
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Re: NRT: technical purpose of road/tram underlays and overlays in NML
Well, that's just my opinion on it, that doesn't necessarily mean anyone else agrees with me It is a bit of a double-edged sword in that it does make sense to be consistent with rural roads and force roadsets to also provide the sidewalk as part of the roadtypes themselves (rather than relying on the base sprites underneath), but the current way of simply replacing the base road sprites is much easier and simpler, as it effectively means only having to use a single "replace" block to change sidewalks for all roadtypes at once. And to be clear, I take advantage of this shortcut myself, so I would be just as affected as everyone else by such a change
Either way it probably needs some discussion with other roadset authors before just going for it and breaking everyone's stuff unexpectedly
No, that would be a separate feature, ButGroundTypes
- Emperor Jake
- Tycoon
- Posts: 3431
- Joined: 24 Apr 2007 09:37
- Skype: Discord: Emperor Jake #4106
- Location: Not Actually Japan
- Contact:
Re: NRT: technical purpose of road/tram underlays and overlays in NML
I think ButGroundTypes is overly complex and unlikely to ever be implemented. The reason for roadtypes not having their own tunnel portals is because they would clash when it can't be decided when the road or tram tunnel graphic should be used, since both can share the same space.
Fortunately, there are other possible solutions, like the implementation of tunnel types akin to bridge types, which is being worked on here: https://github.com/Brickblock1/OpenTTD
I would support this change as well, I've started coding a roadtype set myself and for now I replaced the default road sprites with ISR-style ground in order to give the player better control of where sidewalks should and shouldn't be. It would be great if there was a better solution to this.Andrew350 wrote: ↑22 Jul 2023 03:57 I was seriously considering opening a bug report to change this behavior (since it is wrong, as far as I'm concerned), unfortunately pretty much every roadtype set in existence relies on replacing the base city road sprites (1313-1331) with their own sprites in order to work, which means changing it now to the correct behavior (using terrain sprites instead) would almost certainly break just about every roadtype NewGRF, so it is unlikely to ever be an accepted change*
Re: NRT: technical purpose of road/tram underlays and overlays in NML
That would be awesome!Emperor Jake wrote: ↑23 Jul 2023 06:25 Fortunately, there are other possible solutions, like the implementation of tunnel types akin to bridge types, which is being worked on here: https://github.com/Brickblock1/OpenTTD
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Re: NRT: technical purpose of road/tram underlays and overlays in NML
Hey, so just to update you I've gone ahead and posted an issue to GitHub requesting the change. Hopefully I made the point clearly Assuming the devs agree and make the change I'll try to contact as many NRT authors as I can to inform them of it in order to make preparations and/or air their grievances about it. If anyone has anything to add whether you agree/disagree make sure to mention it on the ticket
https://github.com/OpenTTD/OpenTTD/issues/11154
Re: NRT: technical purpose of road/tram underlays and overlays in NML
Hello
Tschö, Auge
Thank you for your effort. I wrote a comment in the meantime and explained my intention.Andrew350 wrote: ↑27 Jul 2023 04:19 Hey, so just to update you I've gone ahead and posted an issue to GitHub requesting the change.
https://github.com/OpenTTD/OpenTTD/issues/11154
Tschö, Auge
Who is online
Users browsing this forum: No registered users and 5 guests