Author Topic: MakeAHMap and AH3  (Read 3238 times)

Offline hitech

  • Administrator
  • Administrator
  • *****
  • Posts: 12398
      • http://www.hitechcreations.com
Re: MakeAHMap and AH3
« Reply #15 on: January 07, 2016, 11:02:51 AM »
I am almost certain that source and destination radius parameters are not what you think.  I've played with that in the terrain editor and it had no effect on the river appearance.  I suspect they have something to do with supply.  Also, using multiple overlapping river paths to construct a water feature creates artifacts as currently implemented because the river banks overlap.  However, I think the river rendering is maybe only preliminary.

So, Hitech, how big a bribe would a closed polygon lake object cost us?  :)

Actually I am pondering lake creation via splines. I.E. Create the lake shape similar to roads, Then I create the polygon mesh from the splines at load time.

HiTech


Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: MakeAHMap and AH3
« Reply #16 on: January 07, 2016, 11:07:14 AM »
Actually I am pondering lake creation via splines. I.E. Create the lake shape similar to roads, Then I create the polygon mesh from the splines at load time.

HiTech

Woohoo!!!  That would be a BIG help!

Offline artik

  • Silver Member
  • ****
  • Posts: 1908
      • Blog
Re: MakeAHMap and AH3
« Reply #17 on: January 07, 2016, 12:26:39 PM »
Actually I am pondering lake creation via splines. I.E. Create the lake shape similar to roads, Then I create the polygon mesh from the splines at load time.

HiTech

That is exactly what is needed :x

Few (not so) corner cases from real world maps:

1. Lakes can contain ilands - it can be nice to have an option for that
2. Confluence of multiple rivers and rivers and lakes

Artik, 101 "Red" Squadron, Israel

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: MakeAHMap and AH3
« Reply #18 on: January 07, 2016, 01:48:48 PM »
Artik: although it is moot if HiTech does the polygon spline lake, your clever idea of concentric rivers to make a lake works (except for the artifact of the overlapping river banks).  The attached image is an imaginary test terrain, but a real (random) Russian lake.  I only needed two concentric rivers (plus a small third one that is highlighted) to recover the shape of the lake.

The spline filled polygon is a MUCH better way to go if you can do it HiTech. 

Offline artik

  • Silver Member
  • ****
  • Posts: 1908
      • Blog
Re: MakeAHMap and AH3
« Reply #19 on: January 07, 2016, 02:13:06 PM »
Artik: although it is moot if HiTech does the polygon spline lake, your clever idea of concentric rivers to make a lake works (except for the artifact of the overlapping river banks).  The attached image is an imaginary test terrain, but a real (random) Russian lake.  I only needed two concentric rivers (plus a small third one that is highlighted) to recover the shape of the lake.

The spline filled polygon is a MUCH better way to go if you can do it HiTech. 


Nice   :aok

It only remains to automate this process algorithmically  :confused:

My thought that big lakes would be brought down to 0 altitude and smaller would be created as shapes.

For example biggest and most relevant lakes for WW2 have relatively low altitude above sea level:

Ladoga 5m
Onega 33m
Vänern 44m
Saimaa 76m

So they can be safely brought down to 0 without hurting "geographical accuracy" too much.

I think that what I'll start with.. Especially when any river I add in TE crashes my Laptop to BSOD  :mad:
Artik, 101 "Red" Squadron, Israel

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: MakeAHMap and AH3
« Reply #20 on: January 07, 2016, 04:23:37 PM »
I think that what I'll start with.. Especially when any river I add in TE crashes my Laptop to BSOD  :mad:

I wonder if it's because the file doesn't exist yet.
Try this, create a NotePad file in your terrain folder and name it [myterrain].tra
Copy this text into the file and save.
See if you laptop will let the TE run with it. I'm pretty sure that it will.

~~~ 1st line starts with 1 below ~~~
1
2,Type
4,Flags
-1,ResourceType
-1,DestFieldIndex
-1,SourceFieldOrObjectIndex
5280.000000,SrcRadius
5280.000000,DestRadius
Track 0
4,PntCnt
132.386656,1.000000,-16848.007071
1023.029543,37.000000,-16844.570720
4276.734436,53.800000,-13824.979635
7575.369753,65.800000,-3347.292916

~~~~~~
A final CR(LF?) after the 6 brings the carrot to start the next blank line in NotePad but not in Word

It's a short river near the center of any terrain.

Good Luck
Easy in-game again.
Since Tour 19 - 2001

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: MakeAHMap and AH3
« Reply #21 on: January 07, 2016, 06:54:19 PM »
Nice   :aok

It only remains to automate this process algorithmically  :confused:

My thought that big lakes would be brought down to 0 altitude and smaller would be created as shapes.

For example biggest and most relevant lakes for WW2 have relatively low altitude above sea level:

Ladoga 5m
Onega 33m
Vänern 44m
Saimaa 76m

So they can be safely brought down to 0 without hurting "geographical accuracy" too much.

I think that what I'll start with.. Especially when any river I add in TE crashes my Laptop to BSOD  :mad:

Yeah, the algorithm looks like it could be difficult.  I think I'm just going to wait to see if HiTech adds a spline closed polygon lake object.

Pushing below 0 sounds viable for a lot of lakes.  (Remember you have to go a little distance below 0, not just to 0, or you will see the ground through the shallow water.)  Of course there is Lake Lausanne at nearly 400 m.  That might end up looking a bit weird if sunk to 0m.  ;)

Offline artik

  • Silver Member
  • ****
  • Posts: 1908
      • Blog
Re: MakeAHMap and AH3
« Reply #22 on: January 08, 2016, 12:59:24 AM »
I wonder if it's because the file doesn't exist yet.
Try this, create a NotePad file in your terrain folder and name it [myterrain].tra
Copy this text into the file and save.
See if you laptop will let the TE run with it. I'm pretty sure that it will.

Great it worked, probably the issue with track editing itself - also note it is Graphics error as my Intel HD card becomes unresponsive and after 1 or 2 "recoveries" PC crashes into BSOD.

Now I can go with it.

Pushing below 0 sounds viable for a lot of lakes.  (Remember you have to go a little distance below 0, not just to 0, or you will see the ground through the shallow water.)  Of course there is Lake Lausanne at nearly 400 m.  That might end up looking a bit weird if sunk to 0m.  ;)

The biggest issue with pushing lakes to 0 is actually that rivers connecting lake and sea would flow at some points from low altitude to high one  :confused:
Artik, 101 "Red" Squadron, Israel

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: MakeAHMap and AH3
« Reply #23 on: January 08, 2016, 01:37:02 AM »
I'm glad it worked.
Easy in-game again.
Since Tour 19 - 2001

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: MakeAHMap and AH3
« Reply #24 on: January 11, 2016, 03:38:54 AM »
715:

They are not necessary, I simply put them there to make the file easier to read.


Also what is the spacing you are using between points? That's sounds like a very large number since we already smooth with splines?

If so I may wish to write an optimizer to remove points X distance from the spline curve.

HiTech

HiTech:  I imported all the rivers (and lakes, as outlines) from the fine resolution GSHGG dataset for a 512 mile terrain in the Kursk area of Russia/Ukraine.  There were 211 tracks and a total of 21,212 points.  The TE did not choke.  A cursory check showed the rivers appear to render properly in the TE.  I'll try Europe next (which has more rivers), but so far so good.  (I didn't try building the terrain as it doesn't do rivers in the game yet.)

715

Offline hitech

  • Administrator
  • Administrator
  • *****
  • Posts: 12398
      • http://www.hitechcreations.com
Re: MakeAHMap and AH3
« Reply #25 on: January 11, 2016, 08:52:55 AM »
HiTech:  I imported all the rivers (and lakes, as outlines) from the fine resolution GSHGG dataset for a 512 mile terrain in the Kursk area of Russia/Ukraine.  There were 211 tracks and a total of 21,212 points.  The TE did not choke.  A cursory check showed the rivers appear to render properly in the TE.  I'll try Europe next (which has more rivers), but so far so good.  (I didn't try building the terrain as it doesn't do rivers in the game yet.)

715

I'm curious do they look reasonable? Also post a zip of the files at some point, it will make a good base test terrain for when I get back to it.

HiTech

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: MakeAHMap and AH3
« Reply #26 on: January 11, 2016, 01:50:51 PM »
I'm curious do they look reasonable? Also post a zip of the files at some point, it will make a good base test terrain for when I get back to it.

HiTech

They looked reasonable except where my program messed up: I split rivers into 256 point sections (Easyscor told me that was a limit), but I forgot to duplicate the endpoints so the rivers have occasional gaps.  I'll post a zip once I fix that error.

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: MakeAHMap and AH3
« Reply #27 on: January 11, 2016, 04:03:58 PM »
They looked reasonable except where my program messed up: I split rivers into 256 point sections (Easyscor told me that was a limit), but I forgot to duplicate the endpoints so the rivers have occasional gaps.  I'll post a zip once I fix that error.

Yep, but I always want more. I'm a greedy bastage.
Easy in-game again.
Since Tour 19 - 2001

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: MakeAHMap and AH3
« Reply #28 on: January 12, 2016, 01:32:04 AM »
I'm curious do they look reasonable? Also post a zip of the files at some point, it will make a good base test terrain for when I get back to it.

HiTech

I zipped the terrain directory but it's still 140MB (way above the 20MB limit).  What are the minimum files you would need?

The only problem I saw in the TE was some of the rivers don't show the square box spline control points (but you can select them).

In many parts of the rivers the number of control points appears to be more than necessary.  In the future I will try the lower resolution database.

Offline hitech

  • Administrator
  • Administrator
  • *****
  • Posts: 12398
      • http://www.hitechcreations.com
Re: MakeAHMap and AH3
« Reply #29 on: January 12, 2016, 09:18:55 AM »
*.htz (splat and height) oba and your rivers ( i forgot the name)

HiTech