pagsab Posted 7 hours ago Posted 7 hours ago As in some other SF2 terrains, the amended tilesets which I have made for my own personal use have until now eschewed the tiny heightmap files which add detailed relief to coasts and river banks. However, at the end of my previous long thread at https://combatace.com/forums/topic/101404-spain-and-seaplanes/, Gerwin recommended the heightmap files as a way of handling islands too small for the blunter instrument of elevation points in the HFD. After studying his Iceland terrain, I at last worked out that these heightmap files overlay extra terrain height on top of that specified in the HFD, at 256 elevation points per tile instead of the standard 16. My usual blundering experimentation finally let me create a bespoke heightmap file for my smallest island as shown below, which takes up only a quarter of a tile on my reduced scale terrain. As suggested by Gerwin, I removed my previous single elevation point whose blunderbuss effect had inevitably made some coastal water slope disconcertingly upward along with the land, and instead I relied entirely on my new and much more precise grayscale heightmap bitmap which added extra height in proportion to the lightness of each pixel. Since elevations are always applied to the SW corner of each box just as in the HFD, I needed to test my heightmap with the tile in all four possible orientations, and remove any elevations which raised water as well as land. I gave my various single tile islands a generic gentle slope by setting their HeightMapScales at 50 in the terrain data.ini, but I created separate steeper variants of the uncultivated islands by using a setting of 150 (as seen below from a Macchi 200 over tiny Panarea in the Lipari isles of my new Sicily and Malta terrain). Beyond 150, the unwelcome side-effect of the sagging of the tile below sea level for reasons I do not understand becomes too noticeable to be tolerated. I was delighted to find that I could also in due course use this heightmap technique to make the chalk cliffs in my NW Europe terrain steeper, by reducing their horizontal width from a quarter to a sixteenth of a tile. However, what really excited me about the heightmap files was not their utility in a few niche cases but rather their potential to make my terrain relief as a whole look less jagged and more natural. I created a generic 'noise' heightmap file as shown below, designing it so that the pattern would be unaffected by tile rotation and so that it would be easy to black out one or more of the four elements to tailor the heightmap for coastal as well as inland use. Having assigned all my tiles except those with airfields, rivers or built up areas an appropriate variant of this generic heightmap file, I fired up the sim with some trepidation, fearing that using this technique so widely would drastically reduce frame rates. To my great relief, the only obvious adverse impact was a thin shifting white line in the distance marking the limit at which the system incorporated the heightmaps – a bit distracting, but by no means a showstopper. The compensatory payoff was an incredibly rich and rolling topography, especially in areas like the mountains on either side of the Straits of Messina as shown by the low flying SM.79 below. I could not resist the sheer enjoyment of weaving at treetop height through the maze of winding valleys which my rescaled HFD data and my high resolution generic heightmaps had combined to create. This technique is fairly quick and straightforward and can be used on pretty much any SF2 terrain, whether it already uses heightmap files or not. It is especially worthwhile in terrains with 16 rather than 64 elevation points per tile. I will now give a short step by step guide to how to apply it to inland tiles, based on my own recent experience. - Copy from this or another terrain two 16 pixel square heightmap bitmaps – one all black from a sea tile and one with a range of grayscale shades from black to white. - Open the two bitmaps side by side in Photoshop, and expand them greatly as shown above. (I tried using GIMP or Microsoft Paint instead, but only with my old copy of Photoshop could I get my amendments to the indexed bitmap to work properly.) - Pick up a shade from the second bitmap and paint it onto the first using a single pixel brush. Continue to create your desired generic noise template from dark grey to white. Just a few appropriately spaced shades will suffice, and you can pick up black to roll back if need be. - When you are happy, save your creation as an 8 bit bitmap, and paste a copy into your terrain folder. Different tiles can reference the same bitmap, but this only works if they use the same HeightMapScale. You need to save the bitmap again with a different name for each different HeightMap Scale you wish to use. - Open your terrain's data.ini, and scroll down to the first inland tile texture which you wish to use this bitmap. Add 'HeightMap=XXX.bmp' and 'HeightMapScale=XX.000000', substituting the file name you have given the bitmap and the value you wish to assign. I find that 25 for field tiles and 50 for hill and wood tiles gives a good result. - Continue adding similar entries to all inland tiles which you wish to use your new bitmaps. I recommend deleting any existing heightmap entry from the all sea tiles, where it seems rather redundant. When you are done, close the data.ini and opt to save your changes. - Start the sim, create a flight, and explore to see the result. Go back and tweak the noise bitmaps or HeightMapScales based on what you find. I hope that these ideas may help others to enjoy their own preferred SF2 terrains even more. I am very grateful to Wrench and Gerwin for highlighting the utility of these tiny but potentially very helpful heightmap files. If anyone has any ideas of how to remedy the tile sagging or white line side-effects which I mentioned, do please let me know. 2
Gepard Posted 5 hours ago Posted 5 hours ago IIRC had the modification of the _hm file the issues, that you can fly through the hills and that groundobjects "sink" into the soil.
gerwin Posted 5 hours ago Posted 5 hours ago In my IcelandNA example: The plain sea also has a _HM. And the _HM shows a certain zero level of gray for sea level. Gray, not Black. 25% of black, or 64 out of 255 in rgb terms. I had good reasons to do so back then, altough the particulars escaped me. May have some interactions with terrain _data.ini settings as well, like the ones below. [HeightField] DetailScale=1.0 DetailFrequency=1.0 MaxHeight=200 MinHeight=0 [HeightOffset] NonTexturedMesh=-10.0 TexturedMesh=-5.0 DetailedMesh=0.0 LowDetailMesh=-1.0 ;WaterMesh=0.8 WaterMesh=0.1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now