There are import options unless you obtain the file formats for the htx (I believe it is) format.
1. terrain elevations (.elv file)
This is now a .raw file. It can be either 16 bit signed (zero is zero elev.) or unsigned. I doubt you'll want the unsigned version but it's documented in this forum. This is a 4096x4096 raster as they all are. Search on .raw files in this forum.
2. high resolution shorelines and rivers (waterd.bmp/waterc.bmp)
You're going to need to do some of that coad stuff here. No water above zero elevation except the new river paths.
You can build custom objects containing lakes if you like but that's not in your program description.
Water is automatic if the elevation drops below zero. I'd suggest contacting htc to see if you can obtain the format for the shoreline htx files but the raw elevation files may be all you need. If you do retrieve the htx file format, please document it in here.
3. ground cover (tiles) according to the geographical data set, i.e. farm, forest, dessert areas, etc. (gndtype.bmp)
This is another 4096x4096 file but it's an RGB bitmap. Search on 'Splat' files in this forum.
4. Nice looking clipboard map.
Now I'd like to know what changes should I do to make the stuff work:
3. And of course AFAIR the resolution of elevations had changed how the alignment between all these types changed
Everything is shifted. iirc, 1/2 mile north and 1/2 mile east. waterd won't quite line up but you should play with the TE to see the changes.
Thanks few quick questions:
@hitech - river objects (I assume like roads as well) how can I create ones? I need file format specifications. The geographical data contains rivers in already in piecewise linear format so all I need is to convert relevant part to internal TE river object. Am I right? If so can you please provide a format there?
Regarding the water below 0. It is problematic. It basically means that all lakes should be at 0 level.
I can think of following ways to resolve it:
1. I can either modify elevations and move lakes to 0.
1.a if I add rivers they would... Flow backward at some parts (assuming I'll know how to do it)
1.b Or I can "create canyons" where rivers/lakes exists this would cover in such a case both rivers and lakes - I can specify some slope threshold regarding canyon depths.
2. Remove lakes entirely, keep rivers as objects
3. Make lakes special kind of ground type with special tiles so they'll look like a water but behave like... grass. keep rivers as objects
4. Remove both rivers and lakes (but it can really badly hurt the impression of the map).
To be honest I think of either (1b) or 4. Maybe 1a.
What do you think?
You can make decent lakes with rivers, file format is not finalized, but it consist of spline points along with widths.
HiTch
fprintf(Fp,"%d\n",TrackList->TrackCnt);
for(TrackIndex= 0 ;TrackIndex < TrackList->TrackCnt;++TrackIndex)
{
Track = TrackList->Tracks[TrackIndex];
if(Track == NULL)
{
fclose(Fp);
return -1;
}
fprintf(Fp,"%d,Type\n",Track->Type);
fprintf(Fp,"%d,Flags\n",Track->Flags);
fprintf(Fp,"%d,ResourceType\n",Track->ResourceType);
fprintf(Fp,"%d,DestFieldIndex\n",Track->DestFieldIndex);
fprintf(Fp,"%d,SourceFieldOrObjectIndex\n",Track->SourceFieldOrObjectIndex);
fprintf(Fp,"%f,SrcRadius\n",Track->SrcRadius);
fprintf(Fp,"%f,DestRadius\n",Track->DestRadius);
fprintf(Fp,"%s\n",Track->TrackName);
fprintf(Fp,"%d,PntCnt\n",Track->SplinePath.NodeCnt);
PntCnt = Track->SplinePath.NodeCnt;
for(PntIndex= 0 ;PntIndex < PntCnt;++PntIndex)
{
fprintf(Fp,"%lf,%lf,%lf\n",Track->SplinePath.Pnts[PntIndex].x,
Track->SplinePath.Pnts[PntIndex].y,
Track->SplinePath.Pnts[PntIndex].z);
}
}
BTW the hold up on the rivers & roads is how do do an efficient collision and culling system. Nothing has jumped into my head yet.
HiTech
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
...The numbers I quoted are for the WBDII portion of the fine resolution GSHHG GIS dataset...
Are we working on same stuff?
makeahmap uses GSHHG data to create rivers on the map for AH2 terrains. But in AH2 it uses waterd to mark them. So in AH3 it probably should be path - something I want to do.
Some sections of rivers, like those behind dams, are defined as lakes, i.e. closed polygons, and I'm at a loss on how to convert them to AH3 spline path + width. I'd be interested in any ideas you have on that.
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
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
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.
I think that what I'll start with.. Especially when any river I add in TE crashes my Laptop to BSOD :mad:
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:
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.
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. ;)
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
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.
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
*.htz (splat and height) oba and your rivers ( i forgot the name)
HiTech