Author Topic: Automatic terrain generation from geographical data (a tool I created)  (Read 23151 times)

Offline ghostdancer

  • Aces High CM Staff
  • Platinum Member
  • ******
  • Posts: 7562
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #45 on: October 24, 2013, 06:52:10 AM »
I'll download and do some more testing today and tomorrow. However, so far so good, I am able to build far east locations with no crashes.
« Last Edit: October 24, 2013, 07:06:49 AM by ghostdancer »
X.O. 29th TFT, "We Move Mountains"
CM Terrain Team

Offline artik

  • Silver Member
  • ****
  • Posts: 1907
      • Blog
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #46 on: October 24, 2013, 07:39:41 AM »
I would love to hear your opinion about the following options:

river_level how major river should be to be rendered... Or disable rivers at all
river_correction_limit eliminate river that require too deep canyons. i.e. if during the elevation slope correction the river needs an altitude drop above X feet, it wouldn't be rendered - allowing user to prefer having more rivers or having deeper canyons.
fix_river_slopes - would user want to turn it off all at all?


Also take a look on following files:

water_altitude_correction.bmp - a file that represent elevation changes required to fit all slopes TE requirements (<=120 feet per mile)
removed_rivers.bmp that lists all of the rivers that had been removed due to high altitude changes, it is created when you use the 2nd option reiver_correction_limit

Thank You!
Artik, 101 "Red" Squadron, Israel

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10880
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #47 on: October 24, 2013, 12:38:10 PM »
In the config file, a nice touch is to include a path name to the default AH terrain folder OR it can also be altered if the user uses a different location.
This is the default path right now, however the spaces in the path name are not readable by the program.
C:\Hitech Creations\Aces High Editors\ahiiterr

I particularly like what you've done with the ground types. Yes, the ground clutter showing along the shore in the TE is distracting but it won't show in the final terrain in-game. If you don't want to see it in the TE, uncheck the box Cell Overlay On (it shows the clutter). I always do this when working on a terrain in the TE.

Paint the shorelines with the ground type or beach instead of deep water; I've said this before. Open your output files in the TE to see the whitish deep water along your current shorelines and rivers. This change will allow finished looking output right away and the user can still go back into the TE and paint beach or whatever they choose. To me, seeing deep ocean anywhere on land is the sign of an unfinished terrain. This is particularly important along the rivers. You'll see what I mean after you've made this change when you open two version of the same output in the TE.

 :aok
« Last Edit: October 24, 2013, 12:42:24 PM by Easyscor »
Easy in-game again.
Since Tour 19 - 2001

Offline artik

  • Silver Member
  • ****
  • Posts: 1907
      • Blog
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #48 on: October 24, 2013, 02:25:20 PM »
Quote
This is the default path right now, however the spaces in the path name are not readable by the program.

I didn't want to create the output in the ahiiterr by purpose - because you need to run import of the water in any case
and you need to close the TE before the gndtype.bmp and mapname.elv is written to make sure it does not interfere.

Also the case of spaces it is just something stupid, it is trivial to fix it... just need to rewrite the config.ini parsing code a little bit

Quote
I particularly like what you've done with the ground types.

Besides the beaches and deep water, you can alter the ground covering mapping using groundmapping.csv (see config.ini for details)

Quote
Yes, the ground clutter showing along the shore in the TE is distracting but it won't show in the final terrain in-game.

Ok than I'll recheck it to see what effect it has in real game to make sure.

Quote
To me, seeing deep ocean anywhere on land is the sign of an unfinished terrain. This is particularly important along the rivers.

Note, you can change a color of lakes and rivers - so your rivers would look more natural. In any case I wanted to add
some water depth reduction but hadn't time to implement it yet.

Thanks for inputs!
Artik, 101 "Red" Squadron, Israel

Offline ImADot

  • Platinum Member
  • ******
  • Posts: 6215
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #49 on: October 24, 2013, 02:37:32 PM »
Quote
To me, seeing deep ocean anywhere on land is the sign of an unfinished terrain. This is particularly important along the rivers.

Note, you can change a color of lakes and rivers - so your rivers would look more natural. In any case I wanted to add
some water depth reduction but hadn't time to implement it yet.

I think he's referring to the land showing the "deep ocean" texture - which basically shows as white "untextured" terrain.
 You would either see a whole section with no ground texture, or you would see the corners/edges of the parts that "stick out of the water's edge".

I haven't tried your app yet, but it sounds fantastic. The whole community should be very pleased with the relative ease with which new maps can be created. Although, for main arena purposes, real-world maps rarely make for easy 3-sided and balanced maps.
My Current Rig:
GigaByte GA-X99-UD4 Mobo w/ 16Gb RAM
Intel i7 5820k, Win7 64-bit
NVidia GTX 970 4Gb ACX 2.0
Track IR, CH Fighterstick, CH Pro Throttle, CH Pro Pedals

Offline ghostdancer

  • Aces High CM Staff
  • Platinum Member
  • ******
  • Posts: 7562
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #50 on: October 24, 2013, 02:41:12 PM »
Will check out all the options in more detail over this weekend. However, I am particular interested in:

Quote
river_correction_limit eliminate river that require too deep canyons. i.e. if during the elevation slope correction the river needs an altitude drop above X feet, it wouldn't be rendered - allowing user to prefer having more rivers or having deeper canyons.

Sometimes a canyon makes sense and other times, well it doesn't at all. This seems like it will be a nice feature where you can control things preventing to deep a canyon being made and instead just getting rid of the river. In many terrains rivers are more eye candy since most of the player action on the terrain is in the air and not GV battles. Not to mention for GVs a designer still needs to put in place bridges so they can cross. Resulting in rivers being more "eye candy" for want of a better term. Where many decide that no river is better than a canyon with almost sheer vertical cliffs.

So I look forward to testing this functionality out since then I wouldn't have to go in and erase water and reset elevation for areas like that. Will get back to you on how it goes when I do the testing of that part.
X.O. 29th TFT, "We Move Mountains"
CM Terrain Team

Offline ghostdancer

  • Aces High CM Staff
  • Platinum Member
  • ******
  • Posts: 7562
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #51 on: October 24, 2013, 02:48:02 PM »
Quick question on the river_correction_limit does it eliminate the whole river or does it eliminate the just the sections of the river that don't fit the correction limit you picked?

If it removes the whole river then I definitely like that you supply a removed_rivers.bmp that lists all of the rivers that had been removed. That way as a designer can go back and restore parts of the river on more flat terrain if I like (do a partial restore).
X.O. 29th TFT, "We Move Mountains"
CM Terrain Team

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10880
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #52 on: October 24, 2013, 03:13:06 PM »
Yes ImADot, that is exactly what I was saying.

Artik, Deep Ocean is both a color in the gndtype.bmp, and the final determination for the texture drawn in the terrain. You don't want Deep Ocean drawn anywhere on land.

I suspect that you initiate the gndtype.bmp to 00 00 00 everywhere. Instead, initiate it to 11 11 11 grass and continue unchanged.

When you set the gndtype.bmp color for land along a water edge to 00 00 00, that is an error. Use the globcover value if you can. HTC solves this problem by setting the underlying ground type at all water = grass. It's not perfect but it's not as annoying as making it deep ocean and it also works at rivers reasonably well. So if you set the gndtype to grass initially, when the globcover calls for water, use grass instead.

I hope that helps.
« Last Edit: October 24, 2013, 03:16:08 PM by Easyscor »
Easy in-game again.
Since Tour 19 - 2001

Offline artik

  • Silver Member
  • ****
  • Posts: 1907
      • Blog
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #53 on: October 24, 2013, 03:29:24 PM »
Quick question on the river_correction_limit does it eliminate the whole river or does it eliminate the just the sections of the river that don't fit the correction limit you picked?

If it removes the whole river then I definitely like that you supply a removed_rivers.bmp that lists all of the rivers that had been removed. That way as a designer can go back and restore parts of the river on more flat terrain if I like (do a partial restore).

Yes it does remove an entire river (as it appears in GSHHS).

But from what I had seen, most of rivers consist of several section (in the DB) so you generally loos some parts, it is unlikely that you loose some major rivers.

Quote
I suspect that you initiate the gndtype.bmp to 00 00 00 everywhere. Instead, initiate it to 11 11 11 grass and continue unchanged.

Actually it is very bad... The problem that if user turns off detailed water option he gets greed water - and it is annoying... I have seen this happening
at several MA and once happened to me as well.

I usually fly with lowest graphics settings to have highest FPS, and this particular stuff makes the water look very bad.

So no setting entire gndtype to grass is bad. The only question is what to do along the boundaries. If in game there is no clutter (like in TE) than I would set it to grass or beach, but only on boundary not in general.
Artik, 101 "Red" Squadron, Israel

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10880
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #54 on: October 24, 2013, 03:42:32 PM »

... than I would set it to grass or beach, but only on boundary not in general.


That is the preferred answer anyway.

And yes to your other question. We often will set a single water pixel in a cell to turn off all the clutter for the entire cell. A cell is a square that is 1 mile by 1 mile. A cell is the square you see in the TE outlined by red lines with a number in the middle.
Easy in-game again.
Since Tour 19 - 2001

Offline mrmidi

  • Aces High CM Staff
  • Silver Member
  • ****
  • Posts: 1879
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #55 on: October 24, 2013, 06:12:35 PM »

When you set the gndtype.bmp color for land along a water edge to 00 00 00, that is an error. Use the globcover value if you can. HTC solves this problem by setting the underlying ground type at all water = grass. It's not perfect but it's not as annoying as making it deep ocean and it also works at rivers reasonably well.

This is in fact a false statement. The default for all water is RGB value 0,0,0  which is deep ocean. Suds and I discussed this about 2 years ago. The ONLY time it is changed to grass by default is when you erase water. The default texture applied to the area you just erased is grass.

midi
In charge of nothing.
C.O. 29th TFT, "We Move Mountains"
It is what it is!

Offline USRanger

  • AvA Staff Member
  • Plutonium Member
  • *******
  • Posts: 10325
      • BoP Home
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #56 on: October 24, 2013, 07:25:49 PM »
Break time!



Axis vs Allies Staff Member
☩ JG11 Sonderstaffel ☩
Flying 'Black[Death] 10' ☩JG11☩

Only the Proud, Only the Strong Ne Desit Virtus

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #57 on: October 25, 2013, 06:33:57 PM »
For river pixels that have too steep a slope to be legal why not just change that pixel to ground and set the corresponding ground type to rock to make it look like non-navigable rapids or cascades or a dam, while allowing the upstream river pixels to stay if they don't violate the slope limit?  In other words, after rasterizing the vector water data post process the pixel data to fix the too steep water.  Of course that would mean PT boats would be limited to traveling upstream only to the first such obstacle, but I doubt that would be an important limit, and the real river might not be navigable at that point anyway.

Personally I think carving a narrow deep canyon for the river would look really odd.

Also, do you have an answer yet about the registration problems with shorelines.  If you read the info file about how the water vectors were generated they were purposely correlated with the SRTM elevation data to insure shorelines had at least a 1 m elevation change to "contain" the water and this analysis is what lead to the water vector data.  (It would have made it so much easier for us if they had just saved the water as pixel data of the same resolution as the SRTM elevation at that point, but they didn't.)

Offline artik

  • Silver Member
  • ****
  • Posts: 1907
      • Blog
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #58 on: October 26, 2013, 03:53:51 AM »
For river pixels that have too steep a slope to be legal why not just change that pixel to ground and set the corresponding ground type to rock to make it look like non-navigable rapids or cascades or a dam, while allowing the upstream river pixels to stay if they don't violate the slope limit?  In other words, after rasterizing the vector water data post process the pixel data to fix the too steep water.  Of course that would mean PT boats would be limited to traveling upstream only to the first such obstacle, but I doubt that would be an important limit, and the real river might not be navigable at that point anyway.

Personally I think carving a narrow deep canyon for the river would look really odd.

Interesting point. I need to think about it - how to do it. In many cases it actually makes scene to steep the water.

Also, do you have an answer yet about the registration problems with shorelines.  If you read the info file about how the water vectors were generated they were purposely correlated with the SRTM elevation data to insure shorelines had at least a 1 m elevation change to "contain" the water and this analysis is what lead to the water vector data.  (It would have made it so much easier for us if they had just saved the water as pixel data of the same resolution as the SRTM elevation at that point, but they didn't.)

Can you please give me the reference so I can read about it as well?

Also note - there is no correlation problems with shorelines (i.e. sea, lakes, isles)  the problem with the rivers that is a separate dataset in the same collection (GSHHS)
Artik, 101 "Red" Squadron, Israel

Offline ghostdancer

  • Aces High CM Staff
  • Platinum Member
  • ******
  • Posts: 7562
Re: Automatic terrain generation from geographical data (a tool I created)
« Reply #59 on: October 26, 2013, 07:47:47 AM »
You would also need to use another terrain type than rock since you would want to create a custom texture that looks like water / rapids when painted on land. Rock is used a lot of places in terrains and default texture looks nothing like rapids or water. You would probably want to ntt0011 river bed and create a custom texture tile for this. This might work for rapids, cascades but wouldn't work for a dam.

Interesting idea but probably an aesthetic choice, not sure how it would look but can easily try it out now on test terrain without the programming (just go into TE and erase water and then paint on something else for sections with two steep slope issues and see how it looks). Will try it out on my test terrain later and post up a screen shot.

« Last Edit: October 26, 2013, 08:28:16 AM by ghostdancer »
X.O. 29th TFT, "We Move Mountains"
CM Terrain Team