Jump to content
PFunk

Hey, Stary...Could You Do Us a Favor?

Recommended Posts

Would it be a lot of trouble to write up a step-by-step procedure on how to do 250m-res terrains?  I know it's too late to convert my Aegean Sea Terrain, but I'm thinking of my next one.

Share this post


Link to post
Share on other sites

Stary is currently locked up in a sweatshop somewhere in Poland run by Julhelm but I am going to try and relay this message through my network of contacts.

  • Like 3

Share this post


Link to post
Share on other sites

I think his original post about it had instructions of how to do it.....If not in the download itself.

Share this post


Link to post
Share on other sites

PFunk, if you want I can help with 250m heightmaps, I "developed" a similar procedure to the one discovered by Stary.

Also, it's not too late for your Aegean terrain, I can convert it to 250m resolution. I already did it for my Iran/Iraq terrain, and for the Europe terrain FRPignon is working on. I am also planning a series of mods that will include 250m height maps compatible with SF's stock and custom terrains.

 

Now I'm not at home, but feel free to send me a PM if you're interested, and as soon as possible I will reply and fill you in with a step by step procedure.

  • Like 1

Share this post


Link to post
Share on other sites

yup PFunk it is in the readme for Kamchatka, wonder what Menrva's method is, mine is so-so heightmap trickery

 

but anyway I'll simply copypaste from readme here:

 

"Extended information, please read carefully!

 

The height mesh:

 

The stock Thirdwire .hfd terrain format uses publictly available DEM (digital elevation model) databases to produce 500 meters vertex
spaced terrain meshes with 2000 meters tiles covering them. This is proven, easy to use system but 500 meters is awfully 1999 technology
for 2016 systems. Thus given my efforts into NA LOD-based terrains creation stalled due to lack of knowledge and tools I decided to
reproduce one of more interesting yet obscure maps available, the Kamchatka Peninsula.
The mesh in this download currently uses 250 meters resolution which is twice the density and detail* compared to original terrain.
Please note that due to being based on low resolution hfd file output the actual height representation is somewhat off compared to real terrain!
Not much and not that it really matters much. "If it looks good it is good"

 

New heightmap was created in several steps which I now describe to help other more advanced terrain modders possibly use this method:

 

First steps -Gerwin's TFDTool and Photoshop:
-I used Gerwin's TDF tool to output the heightmap via F9 key
-Also created the textures bitmap as a helper file via F7 key
-The created file in grayscale is 3000x3000, which corresponds to 500m resolution on 1500000m map (3000/2=1500! Magic!)
-Thus I rescaled the file to 6000x6000 pixels, the same with the texture bitmap which I copied to greyscale file for reference
-The 6000x6000 or twice the original is the 250m per pixed heightfield file
-I filled the blue water areas TFDTool creates with pure black 0,0,0
-Then I spent some time in Photoshop working on several layers and using several brushes and tools to slightly tweak the grayscale height
image, mostly to brighten the higher areas and adjust some more interesting places. Mostly blur, stroke tools and some slight wave-y
filers to add some detail to now ARTIFICIALLY pumped up resolution (further on this below)
-Pro tip: to get rid of any water/shore artifacts is easy way, the so called tsunami waves or coast areas on slopes I selected the
texture map layer, selected all water areas (select by pixel color) and created another pure black layer on top of the main height layer,
that drops slight shadows around it (2 to 4 pixels black shadow) -this way the heightmap gets toned down for few pixels (two is good
value) when near the water areas; think smart not hard as The Ancient One says :P
when the heightmap was considered ready I flattened it and converted to 8bit palleted file using the stock Thirdwire terrain editor
palette (you can do this palette by exporting any heightmap as bitmap from within the TE and saving it's palette to file, most programs
allow palette saving)

 

Second step -Thirdwire Terrain Editor, the 042106 version:
so now I had the TE-format palleted 8bit heightmap but to import it without further data loss I needed to adjust the TerrainEditor.ini
settings via notepad:
-the line that specifies the min-max scale of height present in the file is this line:

 

[bitmapImport]
HeightScale=15 <---- this line, by default uses value of 10
MinLandHeight=0 <---- by default 1

 

experimenting with this value gives you the similar results as using PGUP/PGDN keys when using Gerwin's bmp2tfd tool, basically sets the global vertical scaling of min-max values in file

 

To create new 250m resolution the values at creating new map are as follows:
Terrain Map Size: 1500 (km, like original Kamchatka terrain)
Texture Tile Resolution: 2000 (meters, like all common SF2 maps and tilesets)
Height Field Resolution: 250 (meters, compared to defaul 500 meters)

 

Then if you do have the texturelist loaded yo ushould get new flat terrain with textures filling the areas, just impor t he
heightmap from the created 6000x6000 paletted bitmap and save.
This is basic procedure, same can be used to create 125 meters resolution terrains (I did so for Korea3 terrain so far) BUT those are unstable and I am still trying to get
perfect values in BOTH flightengine.ini and given terrain's _data.ini
*now the heihgt information/detail gets lost every time we index the heightmap so one must then increase the HeightScale= value to get
more or less proper -OR GOOD LOOKING height values. Also be warned that Gerwin's TFDTool doesn't properly translate non-standard maps
(1000 kilometers ones go ok though) that is why the TE hassle
That said -the height scale is a bit OFF in this map so if you are a purist complain all you want, I wanted better looking mesh more than
geographical accuracy. To have the latter we need to come up with otehr height data sources for denser terrains. I have yet to look into
the tools and programs I own what could be of use."

 

hope that helps

  • Like 3

Share this post


Link to post
Share on other sites

Thanks, guys.  I'm using CS2 to edit my heightmaps, I have the .act file for the TE palette.  I'll post a snapshot of what it looks like this evening.

  • Like 1

Share this post


Link to post
Share on other sites

yup PFunk it is in the readme for Kamchatka, wonder what Menrva's method is, mine is so-so heightmap trickery

 

I should have wrote it earlier, I followed pretty much everything that you said, Stary.  However, in regards to sea areas, I usually take them from the texture bitmap, and copy them into the heightmap bitmap, and paint them completely black, so that when I reimport them into the TerrainEditor, sea is blue (IIRC your Kamchatka HFD treats sea as land, but only in regards to altitudes of course, it doesn't affect gameplay in anyway). Also, I rather use gerwin's TFDtool to flatten rivers, airfields and lakes, and I usually tweak the exported bitmap to add slight blur between the flat tiles and the surrounding, non-flat ones. Just minor tweaks. I would avoid using the smooth heightfield function of the TerrainEditor, since it really removes many details of the heightmap. What I learned is, the less you touch a heightmap, the better, unless it's necessary for water bodies and airbases.

Edited by Menrva

Share this post


Link to post
Share on other sites

My sea is the correct color blue, but should the landmass be almost completely orange and devoid of green?

Share this post


Link to post
Share on other sites

My sea is the correct color blue, but should the landmass be almost completely orange and devoid of green?

 

I'd say not.  A screenshot would help better.

Share this post


Link to post
Share on other sites

 

 

I would avoid using the smooth heightfield function of the TerrainEditor, since it really removes many details of the heightmap. What I learned is, the less you touch a heightmap, the better,

 

Truer words have never been spoken! It really does foul it up!

Share this post


Link to post
Share on other sites

Truer words have never been spoken! It really does foul it up!

 

Yeah, I made that mistake.  Doesn't look anything like it did before.

Share this post


Link to post
Share on other sites

Truer words have never been spoken! It really does foul it up!

 

Well, I agree, but without the smooth height field option, I would have never been able to get an easy and/or fast solution to this kind of "oddities":

 

14365741059_77d06f3bef_b.jpg

Share this post


Link to post
Share on other sites

Well, I agree, but without the smooth height field option, I would have never been able to get an easy and/or fast solution to this kind of "oddities":

 

FRPignon, did you flatten airbases with TW's TerrainEditor function? Such oddities are caused by it.  That's why I resorted to use gerwin's mighty TFDtool for almost everything; with it you can tweak the heights of single tiles, and you can create small, simple flat tiles unlike TW's big circular ones.

Share this post


Link to post
Share on other sites

FRPignon, did you flatten airbases with TW's TerrainEditor function? Such oddities are caused by it.  That's why I resorted to use gerwin's mighty TFDtool for almost everything; with it you can tweak the heights of single tiles, and you can create small, simple flat tiles unlike TW's big circular ones.

 

Gerwin's TFD tool is excelent for playing with the TFD file but If you want to play with the heightmap it is , I wouldn't say  useless, but almost. Taking into account the way I'm use to work. If you want to modify a heightmap for me the best alternatives are TK's terrain editor and of course, photoshop or GIMP with a 8 bit .bmp file representing the heightmap.

Share this post


Link to post
Share on other sites

Ok, fellas.  This is what I'm looking at after resizing the heightmap to 6000x6000 and loading the ThirdWire TE's color palette in .act format.  You can see my sea looks great, but the land almost looks backwards.  The mountains appear to be the lowlands and vice versa.

 

I know I missed a step, I had to have.  I'm just trying to figure out where.

post-80211-0-16877800-1488325753_thumb.jpg

Share this post


Link to post
Share on other sites

Hey, does this image need to be in greyscale or indexed color mode when I load the TE palette?

Share this post


Link to post
Share on other sites

OK, after playing around with it, the mountains now look a little more angular.

 

post-80211-0-33516000-1488336646_thumb.jpg

post-80211-0-17801300-1488336658_thumb.jpg

Share this post


Link to post
Share on other sites

I'm still going to mess with the mountains some more. There's 4 major ranges and I want them to stand out.

Share this post


Link to post
Share on other sites

that green orange looks like inverted -greens should be low areas and the more orange the higher, maybe inversed pallete? It can happen in some paint programs

Share this post


Link to post
Share on other sites

I think you're right, but I've no idea how to flip it.

Share this post


Link to post
Share on other sites

can't you reorder palette in paint program? Or invert the colours? Sorry for late reply been away

Share this post


Link to post
Share on other sites

Not that easy, or at least I don't think it is.  Can't find the operation for reordering it.  Again, the water comes out fine, it's the land that's the problem.

Share this post


Link to post
Share on other sites

PFunk, do you have a older version of the heightmap, one that was not resized? The heightmap should be modded and flattened only at the end, if you work on it more and more time, it gets broken and less detailed. If you wish I can provide help, just send me a PM, and I'll show you my way to resize and make 250m heightmaps (without using .act palettes and other "unuseful" stuff). I can also make a brand new heightmap that matches your exact area, so that you won't need to replace targets locations or retile it, etc. (see what I've done for FRPignon's Europe terrain). I noticed that you flattened lakes with height=0, as if they were sea. It's better to flatten lakes and rivers, etc. as if they were part of land, the same thing we do with airbases flattening. IMHO it's not worth inverting the colours of the palette at this time, but it can be done easily;

it's better to work with a heightmap bitmap exported with TFDtool (the one that is black and white) instead of the ones you have showed before. Open with Photoshop, simply invert colours. Now, sea areas will be white instead of black, so next step would be to export (always with TFDtool) a tilemap bitmap. From it, select by colour (there is a tool in each paint program for this) the sea areas. Copy and paste them over the heightmap, and turn them completely black. Some small tweaks here and there, and it's done. Believe me, once you understand how it works, it's a five minutes job. Ah, even if the bitmap is black and white, just save it as a 8bit bitmap, and you can import it into TW's TerrainEditor. This is also what Stary explained in his tutorial for 250m heightmaps. I no longer see the utility of working with .act palettes, now that we can use both TFDtool and the TE together.

Again, heightmaps should be the last thing to mod, it's better to place targets and tiles first, flattening is the last thing to do (I suggest using gerwin's TFDtool, for all kinds of flattening, lakes, rivers, airbases). So, if possible, I suggest reverting to a precedent heightmap if you have it, even a 500m one. It can be easily converted into a 250m at the end.

Edited by Menrva

Share this post


Link to post
Share on other sites

hmm.... might have you look at the DBS map. I've got ONE stinking airbase (Pt. Barrow's Wiley Post/Will Rogers Airport) that just won't flatten!

Other than that, and writing the readme, it's done!

Share this post


Link to post
Share on other sites

hmm.... might have you look at the DBS map. I've got ONE stinking airbase (Pt. Barrow's Wiley Post/Will Rogers Airport) that just won't flatten!

Other than that, and writing the readme, it's done!

 

Well, I'm here to help, I'd be very glad! I can even attempt making a whole new 250m heightmap from DEM files, for the DBS terrain, it's been on my mind for quite some time.  That way we can get realistic altitudes (IIRC the map seems to have suffered the smooth heightfield treatment in the TE). Just shoot me a PM and I will look into it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..