[WIP] Trails
Moderator: OpenTTD Developers
[WIP] Trails
This topic is dedicated for my patch that adds a third road type, a kind of dirt road only to be used by heavy trucks and maybe horse carriages. The idea came from andythenorth in this thread: http://www.tt-forums.net/viewtopic.php?f=32&t=37964
FYI, I've talked to Rubidium about the topic of new road types, and new road types won't be added in trunk until a rewrite of the system is done. So this will stay a patch of its own for now, with (sadly) only eyecandy-purposes.
The patch is currently WIP.
I will update this thread if there are news.
FYI, I've talked to Rubidium about the topic of new road types, and new road types won't be added in trunk until a rewrite of the system is done. So this will stay a patch of its own for now, with (sadly) only eyecandy-purposes.
The patch is currently WIP.
I will update this thread if there are news.
Re: [WIP] Trails
[reserved for future use]
Re: [WIP] Trails
andythenorth, the .pcx file you uploaded in the other thread seems to have a wrong pallete. I'm applying the palette to it now and will reupload it here then.
You can find the palette here in two formats:
svn://svn.openttd.org/extra/ottd_grf/palettes/openttd.gpl
svn://svn.openttd.org/extra/ottd_grf/palettes/palette.act
You can find the palette here in two formats:
svn://svn.openttd.org/extra/ottd_grf/palettes/openttd.gpl
svn://svn.openttd.org/extra/ottd_grf/palettes/palette.act
- andythenorth
- Tycoon
- Posts: 5658
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: [WIP] Trails
Oops. That's a pain. Looks like I can use the .act file to load swatches in Photoshop. Out of interest, did it look like the colours were transposed (just not correct for OTTD) or were they correct OTTD colours, used in the wrong place?Roujin wrote:andythenorth, the .pcx file you uploaded in the other thread seems to have a wrong pallete.
Re: [WIP] Trails
I think it was transposed, since the grfcodec would not encode it, saying something like "Error: wrong palette". But maybe it was just in another order? I don't know.. but the palette has to be correct, else the grfcodec won't accept it and make it into a .grf.
Now here's something new: A screenshot to tease you a bit
The local farmer of Funborough Farm has made some trails with his tractor On a different note, after converting the thing to the proper palette, there were some action colors in it. Don't know if you've already learned about them since you're rather new to openttd grfs.. these are blinking colors of some sorts, and you normally don't want them in your sprite (except you're using them on purpose).
Here is a program that can be run over a sprite to replace action colors with similar looking ones: http://www.tt-forums.net/viewtopic.php?f=26&t=7519
I'll repost the sprites you gave me before, after I've done that..
edit: another thing: there is a certain limitation we have to get along with: the road sprites include the ground (grass, bare ground using some palette swap, or with pavement). Therefore for the combination of road and trails, we have to draw the road first, then the trails. Now if there is a x-crossing of road and trail, there can't be done much. The brown mud will be shown over the road. We can live with that I think, just imagine the heavy vehicles crossing the road there have made it muddy.
However, if we have a T-crossing of road and trail, we can make it better looking, if you adjust the half-tiles of the trails accordingly. Just imagine you lay a half tile of the trails over an orthoganal road piece. It should then look like the trail is nicely splitting off the road. Could you do that?
(I'm not sure if it's understandable what I wrote, so ask if it wasn't clear..)
Now here's something new: A screenshot to tease you a bit
The local farmer of Funborough Farm has made some trails with his tractor On a different note, after converting the thing to the proper palette, there were some action colors in it. Don't know if you've already learned about them since you're rather new to openttd grfs.. these are blinking colors of some sorts, and you normally don't want them in your sprite (except you're using them on purpose).
Here is a program that can be run over a sprite to replace action colors with similar looking ones: http://www.tt-forums.net/viewtopic.php?f=26&t=7519
I'll repost the sprites you gave me before, after I've done that..
edit: another thing: there is a certain limitation we have to get along with: the road sprites include the ground (grass, bare ground using some palette swap, or with pavement). Therefore for the combination of road and trails, we have to draw the road first, then the trails. Now if there is a x-crossing of road and trail, there can't be done much. The brown mud will be shown over the road. We can live with that I think, just imagine the heavy vehicles crossing the road there have made it muddy.
However, if we have a T-crossing of road and trail, we can make it better looking, if you adjust the half-tiles of the trails accordingly. Just imagine you lay a half tile of the trails over an orthoganal road piece. It should then look like the trail is nicely splitting off the road. Could you do that?
(I'm not sure if it's understandable what I wrote, so ask if it wasn't clear..)
- andythenorth
- Tycoon
- Posts: 5658
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: [WIP] Trails
Hey, that works surprisingly well! I wasn't sure how much the sprites would line up etc. I have ideas for ways to improve them, but I'm tied up drawing grfs at the moment. Looks good.Roujin wrote: Now here's something new: A screenshot to tease you a bit
The local farmer of Funborough Farm has made some trails with his tractor
There is a test .grf for Heavy Equipment here - can you get the mining truck to go down the trail? (truck is available in 1985, use 2nd CC to change it to the colour of your choice).
Apologies for that - I know about action colours (I am trying to figure out a way to use them to get blinking amber beacons on Heavy Equipment vehicles) - but I didn't intend to use them in trail spritesRoujin wrote:On a different note, after converting the thing to the proper palette, there were some action colors in it.[snip]
I'll repost the sprites you gave me before, after I've done that..
I've got the palette loaded into Photoshop swatches; when you post the sprites, I'll check they are matching up; possibly Photoshop colour management has transposed some, or, more likely, it's conversion to indexed colours on the PCX export that has caused the problem.
Re: [WIP] Trails
okay, here's the .pcx file.
It was only one pixel that had an action color, so no worries
Have you read my edit in the post above?
About the mining truck: sorry, some more coding is required first before vehicles can go on the trails, and I don't have time anymore right now.. will come back at that later/tomorrow...
It was only one pixel that had an action color, so no worries
Have you read my edit in the post above?
About the mining truck: sorry, some more coding is required first before vehicles can go on the trails, and I don't have time anymore right now.. will come back at that later/tomorrow...
- Attachments
-
- trails.pcx
- converted to openttd palette and ran over with palconvert
- (89.67 KiB) Downloaded 473 times
- andythenorth
- Tycoon
- Posts: 5658
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: [WIP] Trails
Nah, don't worry. I figured it might not be ready yet. Here's a fake teaser:Roujin wrote:About the mining truck: sorry, some more coding is required first before vehicles can go on the trails, and I don't have time anymore right now.. will come back at that later/tomorrow...
- andythenorth
- Tycoon
- Posts: 5658
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: [WIP] Trails
That's fine, desirable even - but means taking a certain amount of care with how I draw the edges of the trails - they currently have green in them. Similar issue to dealing with different climate tiles; I guess I need to pick the brains of someone who has drawn a roadset (such as US Roads).Roujin wrote:edit: another thing: there is a certain limitation we have to get along with: the road sprites include the ground (grass, bare ground using some palette swap, or with pavement). Therefore for the combination of road and trails, we have to draw the road first, then the trails. Now if there is a x-crossing of road and trail, there can't be done much. The brown mud will be shown over the road. We can live with that I think, just imagine the heavy vehicles crossing the road there have made it muddy.
I can probably figure it out. If not, I'll leave you a PM. Won't do anything on that today.Roujin wrote:However, if we have a T-crossing of road and trail, we can make it better looking, if you adjust the half-tiles of the trails accordingly. Just imagine you lay a half tile of the trails over an orthoganal road piece. It should then look like the trail is nicely splitting off the road. Could you do that?
(I'm not sure if it's understandable what I wrote, so ask if it wasn't clear..)
Last edited by andythenorth on 22 Jun 2008 18:26, edited 1 time in total.
Re: [WIP] Trails
Here's a little something to illustrate what I mean. The vehicles won't enter the halftiles anyway, but reverse on the last tile before the halftile.
Current situation: Proposal for the half tiles (right side illustrates how it would look like with a road): Of course, it would still need to look well if there's no road but plain grass where the trail ends...
Current situation: Proposal for the half tiles (right side illustrates how it would look like with a road): Of course, it would still need to look well if there's no road but plain grass where the trail ends...
- andythenorth
- Tycoon
- Posts: 5658
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: [WIP] Trails
Yep, I think I get it, so to confirm, the trail tile goes over the regular road? Therefore anything I draw for the trail, like muddy tyre tracks, will be overlaid on the tarmac road surface?Roujin wrote:...[snip]...Of course, it would still need to look well if there's no road but plain grass where the trail ends...
(I don't know how OTTD handles it, but in other co-ordinate systems, a sprite with have a higher z index would appear above one with a lower z index - so we could refer to the trail piece as having a higher z index)
- andythenorth
- Tycoon
- Posts: 5658
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: [WIP] Trails
OK, give this a go:Roujin wrote:Of course, it would still need to look well if there's no road but plain grass where the trail ends...
1. I've tried two different approaches, I don't know which will work best until I see it overlaid in the game
2. PCX should now 'just work' with the right palette. Let me know if there's any more issues...
Re: [WIP] Trails
Yes, this time it worked right away
Here is a screen showing the new tiles.
Two of the halftile ones seem brighter than the other two though...
Here is a screen showing the new tiles.
Two of the halftile ones seem brighter than the other two though...
- Attachments
-
- trails_new.png (87.91 KiB) Viewed 1233 times
- andythenorth
- Tycoon
- Posts: 5658
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: [WIP] Trails
That's as expected - I was experimenting. I don't really like either of those that much yet, I need to do more work on junctions I think. I'll get back on that sometime this week - will also do the GUI sprites.Roujin wrote:Two of the halftile ones seem brighter than the other two though...
Re: [WIP] Trails
Could the half tile transition be traffic dependent?
Re: [WIP] Trails
Not without major changes in code that I want to avoid.
Re: [WIP] Trails
News! I've enabled road vehicles (non-tram ones, that is) to drive on trails. So here's some screens (quick one with standard vehicles). Will grab your test .grf and make another one with it now...
edit: here we go.
Some Terex mining trucks work their way through difficult terrain in order to transport Iron Ore from the remotely located Gruntfingfield Mines
edit: here we go.
Some Terex mining trucks work their way through difficult terrain in order to transport Iron Ore from the remotely located Gruntfingfield Mines
- Attachments
-
- Daily Work at Sarnwell Farm
- trails_farm.png (121.85 KiB) Viewed 1128 times
-
- The little village of Fluntfingbridge in the woods.
- trails_village.png (186.35 KiB) Viewed 1132 times
Re: [WIP] Trails
Okay, back to some serious business now..
as you can see in the screenshot below, right now the three road types are freely combinable. Question is, should it stay like that, or should some combinations be forbidden?
e.g. forbid road and trail on the same roadbit (note: different roadbits on one tile can stay allowed). Or, keep it like it is - it doesn't really make sense, but it could be seen as "dirty road" for eyecandy.
Also an issue is trail + tram. In the middle of the image, there's some tram+trail track. It can hardly be seen, only some pixels difference from "tram-only" tracks. That is because tram is drawn above trail (only thing that makes sense in my opinion...).
Screenshot: Other than that, how are the graphics progressing, andy? I think we should also do trail stations (bus/truck), so that you can place nice stations on trail tracks, without having an ugly piece of road on them (like shown the farm picture I posted above...)
as you can see in the screenshot below, right now the three road types are freely combinable. Question is, should it stay like that, or should some combinations be forbidden?
e.g. forbid road and trail on the same roadbit (note: different roadbits on one tile can stay allowed). Or, keep it like it is - it doesn't really make sense, but it could be seen as "dirty road" for eyecandy.
Also an issue is trail + tram. In the middle of the image, there's some tram+trail track. It can hardly be seen, only some pixels difference from "tram-only" tracks. That is because tram is drawn above trail (only thing that makes sense in my opinion...).
Screenshot: Other than that, how are the graphics progressing, andy? I think we should also do trail stations (bus/truck), so that you can place nice stations on trail tracks, without having an ugly piece of road on them (like shown the farm picture I posted above...)
Re: [WIP] Trails
2way trails?
(shouldn't it be thinner then normal roads.)
One path in the middle and maybe some parts for bypssing other vehicels?
Greets
Ammler
(shouldn't it be thinner then normal roads.)
One path in the middle and maybe some parts for bypssing other vehicels?
Greets
Ammler
Town Names: Portuguese Belarusian French Swiss · Temperate Lumber Mill
Still work in progress: OpenGFX or/and OpenSFX - Please help!
Re: [WIP] Trails
Well, one could draw it like this, but the road vehicles would still drive on their sides, like they do on normal roads.
Who is online
Users browsing this forum: No registered users and 16 guests