New Terrain Generator
Moderator: TTDPatch Moderators
- Raichase
- Moderizzle
- Posts: 11509
- Joined: 15 Dec 2002 00:58
- Location: Sydney, Australia. Usually at work in the underground railway station...
- Contact:
New Terrain Generator
Problem Solved, I'll leave this here for general discussion, as it's already been adopted for that purpose anyway
I think The Darkness sang it best when they sang "Is it just me?".
Everyone else is testing this funky new terrain generator, and reporting the bugs. I'd like to be getting bugs, because then I could help improve it, and make it stable.
But, it just plain doesn't work.
I've got r1014, I've got experimentalfeatures.newterraingen on in my config, and whenever I generate a map, it's old-ttd style.
When I generate a fresh cfg, and substitue that line for the normal "experimentalfeatures off" line in the fresh config, it lets me generate new maps fine. So, here I post my cfg, in the hopes that it helps solve this problem.
No hurry, I'm only at 1950something in my current game, with no urges to start a new game with the new terrain generator. So, I'm ny no means dying to try it, but I'd like to put this problem to rest, so nobody else has it .
I think The Darkness sang it best when they sang "Is it just me?".
Everyone else is testing this funky new terrain generator, and reporting the bugs. I'd like to be getting bugs, because then I could help improve it, and make it stable.
But, it just plain doesn't work.
I've got r1014, I've got experimentalfeatures.newterraingen on in my config, and whenever I generate a map, it's old-ttd style.
When I generate a fresh cfg, and substitue that line for the normal "experimentalfeatures off" line in the fresh config, it lets me generate new maps fine. So, here I post my cfg, in the hopes that it helps solve this problem.
No hurry, I'm only at 1950something in my current game, with no urges to start a new game with the new terrain generator. So, I'm ny no means dying to try it, but I'd like to put this problem to rest, so nobody else has it .
- Attachments
-
- ttdpatch.cfg
- (2.02 KiB) Downloaded 374 times
Last edited by Raichase on 23 Sep 2006 22:41, edited 1 time in total.
Posted by Raichase. Visit my Flickr! Gallery, Blog (get a feed of everyone at once at Planet TT-Forums).
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
You have experimentalfeatures twice in your ttdpatch.cfg file, the second time with setting "experimentalfeatures 84".
This probably contradicts the earlier settings.
This probably contradicts the earlier settings.
Wie zich gelukkig voelt met het geluk van anderen, bezit een rijkdom zonder grenzen. (F.Daels)
Still the best OS around
Still the best OS around
- Raichase
- Moderizzle
- Posts: 11509
- Joined: 15 Dec 2002 00:58
- Location: Sydney, Australia. Usually at work in the underground railway station...
- Contact:
Oh, thanks Rob, I never noticed that line when I went through it the first time.
Thanks very much .
Thanks very much .
Posted by Raichase. Visit my Flickr! Gallery, Blog (get a feed of everyone at once at Planet TT-Forums).
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
> Everyone else is testing this funky new terrain generator, [...]
From what I´ve seen so far, this seems to be a weird implementation. It´s just more or less "random noise" but nothing spectacular, or "realistically" structured landscapes.
See screenshots, one is "mountainous", one is "flat". Guess what "medium" would have come out?
I really don´t know where this algorithm comes from, but if an alternative landscape generation in TTDPatch is generally possible now, why don´t we choose one of the better algorithms available?
regards
Michael
From what I´ve seen so far, this seems to be a weird implementation. It´s just more or less "random noise" but nothing spectacular, or "realistically" structured landscapes.
See screenshots, one is "mountainous", one is "flat". Guess what "medium" would have come out?
I really don´t know where this algorithm comes from, but if an alternative landscape generation in TTDPatch is generally possible now, why don´t we choose one of the better algorithms available?
regards
Michael
- Attachments
-
- mountainous.png (18.8 KiB) Viewed 10757 times
-
- flat.png (5.89 KiB) Viewed 10759 times
While I like some of the landscapes generated, in general I think the feature needs a good wack more work. Still, patience is a virtue and all that. But, I have a real issue to bring to the table, not sure if it's directly related to the new landscape generator, but it's only cropped up in this nightly and not older versions.
Brand new, freshly generated map, note the date in the bottom left corner. Something a bit funky methinks.
Edit: Just a heads up, this bug is very hard to reproduce by just generating new games over and over, if you're persistent enough you should be able to reproduce it. I've seen the error atleast four or five times today, and Singaporekid managed to run into it aswell.
Brand new, freshly generated map, note the date in the bottom left corner. Something a bit funky methinks.
Edit: Just a heads up, this bug is very hard to reproduce by just generating new games over and over, if you're persistent enough you should be able to reproduce it. I've seen the error atleast four or five times today, and Singaporekid managed to run into it aswell.
- Attachments
-
- hmm.png (79.76 KiB) Viewed 1429 times
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.
14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.
14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
Well it's C code, so start working on it!
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
eis_os, I know more ASM and understand ASM better than I do C .
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.
14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.
14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
> Well it's C code, so start working on it!
Are you talking to me or to Aegir?
Well, pointing out a terrain algorithm should be quite easy, however its requirements are still unclear to me.
First of all, TTD´s original algorithm (generating height maps from grey-level images by random geometrical operations) isn´t bad at all. It´s still a modern approach, although it seems people are "sick" of the terrain it generates (in TTD).
O/c, this could easily be overcome by setting up a .grf with a couple of different height maps, as Marcin has already shown years ago.
OTOH, there are those iterative algorithms (midpoint displacement, recursive square algorithms, fault line algorithms, Perlin noise, ...) which usually result in very "realistic" terrain.
Especially Perlin noise and/or midpoint displacement methods come to mind because these are very simple approaches and don´t need much overhead to generate a terrain map.
These algorithms would all need some form of a GUI to set their variuos parameters which may be presented to the user as "type of terrain" (flat -> mountainous), "proportion of water" (low -> high), "terrain surface" (smooth -> rough), etc.
Some of these could be re-used from TTDs GUI (the former two, AFAIR), for additional parameters something differetn would have to be worked out (there´s still room in that particular menu/window, AFAIR).
Well now, these are simple terrain maps generated by using Perlin noise showing different amounts of water and altitudes. They´re already filtered and "normalized" to TTD´s needs and "land" is clipped at the edges in the usual way. This could easily be changed, giving a more "natural" coast line but it´d reduce the area of land of our small maps even more.
In addition, we´d have to talk about other requirements for TTD´s map (i.e. placing of objects) which I´m not familiar with. In any case, generating height maps shouldn´t be a problem.
BTW: Shouldn´t this discussion be moved away from the "problems" sector?
regards
Michael
Are you talking to me or to Aegir?
Well, pointing out a terrain algorithm should be quite easy, however its requirements are still unclear to me.
First of all, TTD´s original algorithm (generating height maps from grey-level images by random geometrical operations) isn´t bad at all. It´s still a modern approach, although it seems people are "sick" of the terrain it generates (in TTD).
O/c, this could easily be overcome by setting up a .grf with a couple of different height maps, as Marcin has already shown years ago.
OTOH, there are those iterative algorithms (midpoint displacement, recursive square algorithms, fault line algorithms, Perlin noise, ...) which usually result in very "realistic" terrain.
Especially Perlin noise and/or midpoint displacement methods come to mind because these are very simple approaches and don´t need much overhead to generate a terrain map.
These algorithms would all need some form of a GUI to set their variuos parameters which may be presented to the user as "type of terrain" (flat -> mountainous), "proportion of water" (low -> high), "terrain surface" (smooth -> rough), etc.
Some of these could be re-used from TTDs GUI (the former two, AFAIR), for additional parameters something differetn would have to be worked out (there´s still room in that particular menu/window, AFAIR).
Well now, these are simple terrain maps generated by using Perlin noise showing different amounts of water and altitudes. They´re already filtered and "normalized" to TTD´s needs and "land" is clipped at the edges in the usual way. This could easily be changed, giving a more "natural" coast line but it´d reduce the area of land of our small maps even more.
In addition, we´d have to talk about other requirements for TTD´s map (i.e. placing of objects) which I´m not familiar with. In any case, generating height maps shouldn´t be a problem.
BTW: Shouldn´t this discussion be moved away from the "problems" sector?
regards
Michael
- Attachments
-
- perl test.png (16.04 KiB) Viewed 10646 times
- uzurpator
- Transport Empire Moderator
- Posts: 2178
- Joined: 10 Jan 2003 12:21
- Location: Katowice, Poland
Michael - the algorithm does use perlin noise...
I just cannot really test it now in TTD (I dont have the game nor deleopment enviroment on this machine).
Also - I don't know which params Josef set to call in the function, some of them will produce weird results, like fully flat maps, or full water.
This feature is still in development, and will be stabilized and enhanced soon.
Edit: Also, there are 5 parameters for the generator, translating them to just 2 isn't easy.
Two of them are obvious (it is terrain height max and terrain subtract) one produces the delta of the heightmap, and the other subtracts certain value from the heights.
Difference between those parameters sets the maximum height of the terrain. Setting them to say, sub 8 and height 16 will create a medium-high water hilly terrain with max height of 8. sub 8 and height 24 will create medium mountainous terrain with medium water.
Also there is another parameter - source patch, which defines the starting size for the generation process. This one is more esoteric as it requires understanding of the algorithm. BUt low values will create somethin like your first screen, high values will do the opposite, like on your second screen. The best value imvho is 3 (64 tile source) which is a medium between how 'busy' is the map, and how differentiated the terrain comes up.
Anyhoo I plan to add a feature for creating predefined landscapes, like atol, valley, central lake, delta of a river or oter possible shapes.
I just cannot really test it now in TTD (I dont have the game nor deleopment enviroment on this machine).
Also - I don't know which params Josef set to call in the function, some of them will produce weird results, like fully flat maps, or full water.
This feature is still in development, and will be stabilized and enhanced soon.
Edit: Also, there are 5 parameters for the generator, translating them to just 2 isn't easy.
Two of them are obvious (it is terrain height max and terrain subtract) one produces the delta of the heightmap, and the other subtracts certain value from the heights.
Difference between those parameters sets the maximum height of the terrain. Setting them to say, sub 8 and height 16 will create a medium-high water hilly terrain with max height of 8. sub 8 and height 24 will create medium mountainous terrain with medium water.
Also there is another parameter - source patch, which defines the starting size for the generation process. This one is more esoteric as it requires understanding of the algorithm. BUt low values will create somethin like your first screen, high values will do the opposite, like on your second screen. The best value imvho is 3 (64 tile source) which is a medium between how 'busy' is the map, and how differentiated the terrain comes up.
Anyhoo I plan to add a feature for creating predefined landscapes, like atol, valley, central lake, delta of a river or oter possible shapes.
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
Well, good to see we are getting some clarification on the feature. Should be good to see where it ends up going!.
Crap, my CRT just went bright blue again...
*fiddles with the connector behind his laptop*
Crap, my CRT just went bright blue again...
*fiddles with the connector behind his laptop*
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.
14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.
14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
- uzurpator
- Transport Empire Moderator
- Posts: 2178
- Joined: 10 Jan 2003 12:21
- Location: Katowice, Poland
A preview what the algorithm will soon be able to build
- Attachments
-
- valley.png
- (1.01 MiB) Downloaded 688 times
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
Me like!!!
That looks awesome! (And Realistic)
So it this going to be available fromthe current "Mountains" and "Water" setting, or is a more OTTD-style GUI for landscape generation in the cards?
That looks awesome! (And Realistic)
So it this going to be available fromthe current "Mountains" and "Water" setting, or is a more OTTD-style GUI for landscape generation in the cards?
Regards,
Dan MacKellar
================
Projects in Progress
North American Renewal Train Set Topic,Canadian Train Set Website, Canadian Train Set Development Topic, Finnish Train Set Website,Visit my Train Gifs Site
CN Boxcar drawn by Dave Hersrud
Dan MacKellar
================
Projects in Progress
North American Renewal Train Set Topic,Canadian Train Set Website, Canadian Train Set Development Topic, Finnish Train Set Website,Visit my Train Gifs Site
CN Boxcar drawn by Dave Hersrud
- uzurpator
- Transport Empire Moderator
- Posts: 2178
- Joined: 10 Jan 2003 12:21
- Location: Katowice, Poland
Another example, this time a mountain range ona penisula (or a piece of it )
- Attachments
-
- mountain.range.png (36.57 KiB) Viewed 1275 times
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
this makes me want CLIFFS!
but, the TTD's origional land generator is SO good because the randomnes, its not smooth changes, thats why I love it but if you can get a RANDOM elemet into it. if you know what I mean.
contiue with thy great work.
but, the TTD's origional land generator is SO good because the randomnes, its not smooth changes, thats why I love it but if you can get a RANDOM elemet into it. if you know what I mean.
contiue with thy great work.
The occasional look back at your past can teach you a great many things...
newterraingen Cht: LandGen
Search terms to find this post: newterraingen LandGen terrain land
Why this post?
1. This information was a b**** to search for.
2. This thread seemed the logical place to assemble this information.
3. In the wiki ExperimentalFeatures :Alpha says that you must set experimentalfeatures.newterraingen on. Other than that there is no information as to how to make use of it.
4. The way to use this feature pending further development is to use Cht: LandGen with parameters. At the time of this writing, the Patch Manual had no reference to this feature in the section on cheats. EDIT: Per his post below, the Landgen sign cheat is now in the Wiki. Thank you DaleStan.
There is some discussion in http://www.tt-forums.net/viewtopic.php? ... tor#513858
which is quite a long thread to browse through and it is getting longer.
I have quoted the appropriate posts below as they provide the information required to use this feature effectively.
Why this post?
1. This information was a b**** to search for.
2. This thread seemed the logical place to assemble this information.
3. In the wiki ExperimentalFeatures :Alpha says that you must set experimentalfeatures.newterraingen on. Other than that there is no information as to how to make use of it.
4. The way to use this feature pending further development is to use Cht: LandGen with parameters. At the time of this writing, the Patch Manual had no reference to this feature in the section on cheats. EDIT: Per his post below, the Landgen sign cheat is now in the Wiki. Thank you DaleStan.
There is some discussion in http://www.tt-forums.net/viewtopic.php? ... tor#513858
which is quite a long thread to browse through and it is getting longer.
I have quoted the appropriate posts below as they provide the information required to use this feature effectively.
patchman - The latest nightly has a new sign cheat which allows control of the parameters used in the land generator. Place a sign with "Cht: LandGen" followed by three numbers to set the three parameters. Leave off the numbers to go back to the usual parameters controlled by the difficulty settings.
The first number is the "delta height", which indicates how mountainous the map will be. Bigger means more mountains, with useful values for example 5, 10, 15 or 20.
The second number is the "trunc height" which determines the amount of water. Larger means more water, and it should increase with a larger delta height, with useful values being for example 20, 30 or 40.
The third one is the source patch size which controls the roughness. The larger it is, the rougher the map will be, with 18 being the maximum.
As long as the first number is not too large, and the second one is larger than the first, you get decent landscapes.
m3henry - 10 55-65 10 seems quite a nice island generator, with land tapering off to a few small rocks in the sea
Dave Worley - 10 20 10 is nice.
Last edited by wallyweb on 05 Feb 2007 06:49, edited 2 times in total.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
- Raichase
- Moderizzle
- Posts: 11509
- Joined: 15 Dec 2002 00:58
- Location: Sydney, Australia. Usually at work in the underground railway station...
- Contact:
Wallyweb - I was trying to remember the sign cheat since it came out to no avail. Thankyou for taking the time to do this, I've saved all the information from that quote into a notepad file for quick reference.
Thanks for that mate, little things that make a big help
Thanks for that mate, little things that make a big help
Posted by Raichase. Visit my Flickr! Gallery, Blog (get a feed of everyone at once at Planet TT-Forums).
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
You are most welcome good sir and should you lose your file or your mind. a quick search for newterraingen LandGen terrain and/or land should bring it back into focus.Raichase wrote:Wallyweb - I was trying to remember the sign cheat since it came out to no avail. Thankyou for taking the time to do this, I've saved all the information from that quote into a notepad file for quick reference.
Thanks for that mate, little things that make a big help
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Wikified.
Please feel free to update it, especially the Examples section.
Please feel free to update it, especially the Examples section.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Who is online
Users browsing this forum: No registered users and 2 guests