• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 How do I convert my greyscale bump height BMP for use as a mesh in SBuilder?

Messages
73
Country
us-minnesota
I have a greyscale height image for an island I originally made for SimCity 4, but I would like to use it as a mesh for FS9 to import using SBuilder.

Looking at the help files, I see that mesh maps are generally green. How do I convert it into a format usable by sbuilder, and how do I actually import it? Clicking the mesh button and then clicking the tile the image is in causes an error saying no mesh map exists. The image dimensions are 11 x 16 km.
 
Is this a real world location, or is it instead a custom-created "fictional" terrain ? :scratchch


Also, what file 'type' is it (ex: RAW, HGT, PNG, BMP, BSQ, DEM etc.) ?


If you ZIP and attach or link to a download location within this thread, we could advise you better. ;)

GaryGB
 
Indeed, it is custom fictional. After posting, I made some progress, where after reading up on the inbuilt help and some googling, I was able to get my mesh to appear in FS9 by originally converting from PNG to BMP as I already planned to; however after several recoloring attempts in Gimp, the "mountains" looked more like stepstairs. So that's my current roadblock re: the meshes. I did stumble upon a new roadblock; I am unable to get the landclass maps to work so I can avoid the repeating landclass textures in FS9. I also added the coastline using the "middle of the ocean" tutorial since the island is an imaginary upwelling of the South Atlantic Ridge as I planned. After adding the coastlines and mask polygons, the island became flat again and the mountains were erased, even though the LD11 bgls are already in my addons.

And as requested, download links. :)

It doesn't have the airports yet, so I included the saved flights. I forgot to switch to a default plane since I was using one no one has yet. (Personal recolor of an SGA MD-95)
 

Attachments

  • scenery.zip
    1.5 MB · Views: 282
  • plutonisland.zip
    1.6 MB · Views: 280
  • savedflights.zip
    27.8 KB · Views: 298
Interesting project using a terrain mesh generation method via SBuilder for FS9 that has been explored by very few developers ! :scratchch


FYI: One must modify FS9 default water flattens in copies of local HP*.BGL and HL*.BGL files by Appending them to SBuilder for FS9.

Next one locates and edits local terrain vector data, and then outputs "replacement" local BGLs that allow a new FS9 terrain mesh to show.


BTW: IIRC, there is another workflow to create LWM-type FS9 terrain mesh via SDK Resample using 1 or more 32-bit elevation data source "RAW" file(s) with the FractionBits parameter to smooth 'stair-stepping' / 'terracing' artifacts in the BGL output by Resample.


LWM-type BGLs mapped onto the FS terrain quad grid should allow you to map land class onto the underlying gridded terrain mesh.


I can explain these processes further if you are interested. :)


GaryGB
 
Last edited:
My free time is rather over-committed today, but to get you started with some info: :pushpin:


FS9 local files to be copied and 'Appended' in SBuilder for FS9 to re-work flatten polygons (NW quad corner):

[FS2004 install path]\Scenery\Ocen\scenery\HP994440.bgl
[FS2004 install path]\Scenery\Ocen\scenery\HL994440.bgl
[FS2004 install path]\Scenery\Ocen\scenery\FL994440.bgl


In addition to FS9 SDK TMFViewer, you may wish to use Jim Keir's LWMViewer v1.4x and/or LWMViewer v2.x::idea:

http://www.jimkeir.co.uk/FlightSim/LWMViewer.html



How to use LWMViewer 2 for FS9 Landclass Editing

http://calclassic.proboards.com/thread/6907/use-lwmviewer-fs9-landclass-editing


BTW: I have yet to find the info I had on the use of a "RAW" source file and FractionBits parameter with FS9 Resample, but will continue with that search tomorrow. :scratchch


Some initial reading:

http://www.ptsim.com/forum/viewtopic.php?p=2460

http://www.fsdeveloper.com/forum/threads/input-32-bit-dem-for-resample-exe.20210/

https://msdn.microsoft.com/en-us/library/cc707102.aspx#TheResampleTool


More tomorrow ! :)

GaryGB
 
Last edited:
http://www.fsdeveloper.com/forum/threads/input-32-bit-dem-for-resample-exe.20210/#post-133605

If this is for FSX, I believe you can use SampleType=FLOAT32 in the Source section... as long as the Source Type=Raw.

You should then be able to use fraction bits to scale the Destination.

I also see the FSX resample allows the destination file to be BIP, which is a raw data type. So... you could take the 32-bit float, resample to BIP ( making the data 16-bit integer again, and then resample that BIP using the fs2000 resample, to a scaled 16-bit output for FS2000->2004.

:stirthepo

Dick

Rhumbaflappy's work-flow would more likely merit testing to reduce "terracing" artifacts in your elevation data source via Resample:

* Step 1 = process RAW or HGT source with a FractionBits parameter value between ex: 3 -to- 6 ...with output to BIP file format

* Step 2 = process BIP file format input ...with output to a BGL terrain mesh in legacy FS2Kx file format for use in FS9.



FYI: You may need to first...

*Verify that elevation source data is a true height map and contains grayscale elevation data at the proper bit-depth

* Re-project elevation source data into Geographic (Lat-Lon) / WGS84 GIS projection required by Resample.


BTW
: What utility did you use to create your "fictional" terrain, and what file output formats did it offer ? :scratchch


GaryGB
 
Last edited:
I used at least three, Gimp, Wilbur x64 from Fracterra, and Sid Meier's Civilization 2 Test of Time for the original outline/coastline.

I used Gimp to help with the recoloring, and Wilbur x64 is a fractal terrain generator. It's GUI is a bit user-unfriendly, unfortunately, but they were kind enough to provide several tutorials to help understand everything. Sid Meier's Civilization is the reason my username is what it is. ;)

Adding the map to SimCity 4 and then building the cities is what inspired the landclass map I was trying to use.
 

Attachments

  • tmp_15112-plutorising31734556921.png
    tmp_15112-plutorising31734556921.png
    327.6 KB · Views: 498
IIUC, you converted PNG source files to BMP, then edited the BMPs in GIMP.

What program was originally used to output HeightMap-type elevation data files ? :scratchch


I'm trying to determine if source files had contained elevation data that may have been lost by editing / converting in GIMP. ;)

GaryGB
 
Yeah here's the file types supported by Wilbur, since that the source of the height data. Provided by cell phone cuz my hotspot data limit is near and reset day is far. ;)



 
I have not tinkered with Wilbur recently, but having installed the 64-bit update, I see that it now supports quite a few file formats. :yikes:

http://www.fracterra.com/wilbur.html


I'm pleased to see that the author is still actively developing Wilbur, and that he has implemented such an extensive terrain tool-set. :D

My impression is Wilbur retains vector geometry internally while modifying on-screen display via extensive use of shader technology. :scratchch


FYI: Eliminating terracing artifacts may require processing via a GIS application before output of a Resample terrain mesh source file.


BTW: You may wish to use XnView as a freeware graphics utility to view file properties and generate preview images of project files:

http://www.xnview.com/en/xnview/


PS: I will be rather busy this week and throughout the weekend, but may have some time next week to see if Wilbur can output a elevation data file format compatible with Resample and/or standard GIS applications.


Fascinating project ! :)

GaryGB
 
Last edited:
I look forward to hearing what you find! :)

In the meantime, from continued work on the project, I have noticed that when I add a polygon of *any* kind to parts or the whole of the island, the polygon seems to act as a flattener, even when flattening is not selected. Right now, I have just two, one for the sea mask and the other for the land mask, since the island is in the middle of the Atlantic. For some reason they seem to suppress the heightmap that would otherwise actually show up in the game without the polygons. Am I missing something?
 
Hmm. Is it possible to cut holes in my polygons in SBuilder for FS9? Im wondering if thats what I need to do to make my mesh working again, since they were able to form terraces earlier.
 
Hi again:

While looking for detailed tutorials on how to add islands with 'elevated terrain' that do not exist in FS9 default scenery within otherwise 'all water' areas, I discovered this "worked example" by Scott Smart: :idea:

FS9 "Coastlines and Mesh" thread (with Scott Smart Robinson Crusoe Island Tutorial) - The FS2004 FS9 Forum - The AVSIM Community:

https://www.avsim.com/forums/topic/350066-coastlines-and-mesh/


Download package
:

https://library.avsim.net/search.php?SearchTerm=scir_robinson_crusoe.zip&CatID=root&Go=Search

SCIR Isla Robinson Crusoe Chile

File Description:
Terrain and Mesh for Robinson Crusoe Island and Selkirk Island, including the airport SCIR (Robinson Crusoe). Robinson Crusoe Island is located west of Santiago, Chile at approximately S33-40/W78-50. It is about 2.5 hours flying time from Santiago(SCEL).


Filename: scir_robinson_crusoe.zip
License: Freeware, limited distribution
Added: 23rd October 2011, 14:08:29
Downloads: 903
Author: Scott Smart
Size: 9382kb

https://library.avsim.net/download.php?DLID=162879

scir_robinson_crusoe-1-jpg.34610



Also, some incidental info on 'VTP Layer Numbers' to use for shorelines in FS9:

http://www.ptsim.com/forum/viewtopic.php?p=604


Additional info on VTP layers and minimum extent for mapping land class tiles to be displayed:

http://www.simforums.com/forums/need-some-help-with-vtp-lwm-scenery_topic16641.html


Some "Island" search hits at PTSIM:

http://www.ptsim.com/forum/search.p...5bed338887ed0b5a1145&keywords=island&start=15


You may wish to review some of the concepts and terminology for working with FS terrain scenery (especially for projects involving use of the legacy FS2Kx SDK) in this tutorial:

Ground2K for Beginners - Newly revised for Ground2K version 4 by Luis Feliz-Tirado

https://library.avsim.net/esearch.php?CatID=fs2002sd&DLID=33724


Additionally, I found this thread in the "official" SBuilder support forum:

Norman's thread on "Changing a small bit of Alaskan Coastline"

Although this mini-tutorial deals with SBuilderX and FSX methods that involve clipping content to LOD-9 (aka "QMID-11") quad boundaries, the concepts in SBuilder for FS9 are somewhat similar, and IIRC involves clipping content to (4) adjacent LOD-13 (aka "QMID-15") quad boundaries instead ...due to the differing LOD-8 "Cell" terrain tile granularity for mapping of LWM and VTP quad tiles versus land class to be blended at run time in FS2004:

http://www.ptsim.com/forum/viewtopic.php?p=5785&sid=a11a9aeed7da808e73964d01345829c4


See especially the linked Adobe "Shockwave Flash" demo video that SBuilder author Luis Sa' made (playable in MS Internet Explorer and/or another 'media player' type of utility): :pushpin:

http://www.ptsim.com/sbuilderx/videos/normans.swf


Generally speaking, one must "Remove and Replace" existing local scenery content.

The local FS9 default water poly(s) must be excluded, and replaced with 1 or more legacy vector polygon(s) that define only the edges of the new island shoreline in LOD-13 sized segments, rather than covering entire LOD-8 terrain cell(s) with 1 or more larger objects.

One can define the shorelines as poly-lines with mapped custom or default textures, and can optionally map coastal 'wave action controller Effects' to those shorelines as well.

In addition to placing your custom 'fictional' terrain mesh within those quad areas, you may need to place a land class polygon under the island water polygon "hole" so that FS renders a textured and hardened land surface there.

You can also place a polygon mapped with a custom VTP texture over that land area as well.


Hope this helps you get farther along. :)


PS: I still plan to look further at which, if any, Wilbur file outputs might be utilized to make Geo-referenced custom terrain mesh source files for FS2Kx SDK Resample when I have some more available time. ;)

GaryGB
 

Attachments

  • scir_robinson_crusoe-1.jpg
    scir_robinson_crusoe-1.jpg
    53 KB · Views: 1,084
Last edited:
I read through one of the links, and I realized that the way for me to fix my "accidental flattening" issue with the polygons, was to set a fake altitude of -9999 for the LWM and texture polygons, and my hills were visible again! :D

2 new questions: From looking at the project files of the Crusoe Island download, I noticed that the mesh map (srtm4.bmp), the green altitude colors for the island itself are banded. Is this what I need to do for my island as well, in order to avoid the inadvertent terracing? I skimmed through Wilbur's options and settings earlier, but could not immediately find such a feature.

One thing I completely forgot to include in my OP was a highest peak altitude to aim for. After checking the region I made for it in SimCity 4, the highest peak I could find was 635.42 meters. How can apply the banding to my greyscale image to make the highest point of my island 635.42 meters without terracing, or any other max height I might set my eyes on?

Edit: Found it! In Wilbur, go to Filter>Mathematical>Span. In the dialog, set the "High" parameter to your desired max height, and click ok. Next, go to Save As, and select "16-Bit POV TGA Surface (*.tga)", and name your file. After that, open it in your preferred image editor. Due to a bug(?) the image will be vertically flipped. Reflip back to its original orientation, and save as a .bmp. The rest is the standard procedure of importing to Sbuilder as a Mesh Map, calibrating, etc. :)

Some quick pics from my cell before I head off to bed. :)





My 2nd question, is it possible to set my landclasses to use Hard Winter textures year round? I could just use polygons to acheive that, however I'd end up with endless repeating patterns since they would take up huge areas considering the size of my island.
 
Last edited:
Good job with the ongoing research and troubleshooting ! :D

I will be traveling this weekend, and upon my return I will try to allocate some free time for refreshing my memory on how best to implement the options related to FS9 format land class textures.

IIRC, though, there is a way to do what you are inquiring about, and only a few developers have done this in their FS9 projects, most notably Holger Sandmann in his freeware and payware sceneries of mountains / glaciers in the PNW area.

AFAIK, Holger had also implemented methods to minimize appearance of land class tile redundancy.

GaryGB
 
http://www.fsdeveloper.com/forum/th...use-as-a-mesh-in-sbuilder.439824/#post-771793

My 2nd question, is it possible to set my landclasses to use Hard Winter textures year round? I could just use polygons to acheive that, however I'd end up with endless repeating patterns since they would take up huge areas considering the size of my island.

What you propose to do is an advanced process that very few FS developers fully comprehend (including myself as well !) :alert:

You will likely find that working with Jim Keir's LWMViewer2 to configure FS' default land class textures allows for much better reduction of redundancy via default tile randomization / rotation, rather than using manually-assigned custom or default land class image "photo" textures applied to VTP2 tiles.

http://www.jimkeir.co.uk/FlightSim/LWMViewer.html

http://calclassic.proboards.com/thread/6907/use-lwmviewer-fs9-landclass-editing

http://www.fsdeveloper.com/forum/threads/ptsim-larger-maps.424686/#post-628531

http://www.ptsim.com/forum/viewtopic.php?p=881

http://www.ptsim.com/forum/viewtopic.php?p=2446



You may also wish to review this thread wherein Holger explains a number of factors related to how the FS land class and seasons work:

http://www.fsdeveloper.com/forum/threads/texture-blending-or-dithering.8566/



Some links regarding work with defining "Seasons":

https://www.google.com/search?q=FS9+custom+season's+file+site:www.fsdeveloper.com&sa=X&ved=0ahUKEwjlpoPg4fTTAhVD32MKHecfCq0QrQIIMSgEMAA&biw=1288&bih=740


A couple of threads which discuss working with "Regions":

http://www.fsdeveloper.com/forum/threads/dead-grass-problem-in-australia.21638/

http://www.fsdeveloper.com/forum/threads/regions.3223/


PS: You may actually achieve a more detailed terrain render in FS9 at run time via a LWM3 vector "sloped flatten" BGL which allows display of as little as 4.8 Meters (LOD-13) between elevation data points on the ground.

One would otherwise be limited to no less than 19.1 Meters (LOD-11) between elevation data points on the ground in a FS9 SDK Resample "terrain mesh" BGL when displayed in FS9 at run time.

Thus I cannot recommend pursuing the FS9 SDK Resample work-flow with RAW HeightMap source files and FractionBits to reduce terracing. :pushpin:


However, there should be another way to achieve the goal of minimizing terracing artifacts via ex: Terrain Sculptor. ;)

http://www.fsdeveloper.com/forum/forums/terrain-sculptor.146/


Alternatively one could perform a "Polynomial Re-rectification" (technically also a re-sampling process) in a GIS application, or semi-automatically 'smoothing' a TIN or contour line based terrain mesh in a 3D modeling application in 1-KM-by-1-KM tile segments at a time, then import them into a GIS application.

One would then export the TIN data from a GIS application as 1 or more BLN file(s) to be "Appended" into SBuilder for FS9, and create 1 or more LWM3 vector "sloped flatten" BGL(s). :idea:


Hope this helps a bit more ! :)

GaryGB
 
Last edited:
Back
Top