Jump to content
Sign in to follow this  
Guest Crashgate3

Nested LODs

Recommended Posts

Guest Crashgate3

I've got my LOD13 mesh working beautifully now, but the only problem is that when I move only about 2 miles away, the mesh I've made reverts to the lower LOD default scenery, which is nothing like the mesh I've made (an entire hillside disappears). Is there any way of making a lower LOD mesh myself and have this displayed when I move out of range?

Share this post


Link to post
Share on other sites
Guest sgreenwood

[div style=display:inline;float:left; width:60%; padding:0; margin:0; color:black;font-size:1.3em]As you've noticed, LOD determines the radius within which mesh is rendered under the aircraft. Beyond that distance, the sim uses the next lower resolution (LOD) mesh available for the area. If you just make another version of your mesh using an LOD of 10 and install both, you may be able to see the LOD10 mesh from a distance, with the higher res data becoming visible when you come within range.To the right is a table showing my estimates for popular LOD values.Stevewww.fs-traveler.com[/div][div style=display:inline;float:right; width:30%;position:relative;top:-160][table valign=top" border="1" cellpadding="2" padding="0" margin="0" cellspacing="0" bgcolor="fffff0][tr][th bgcolor=#f0f0f0]LOD [/th][th bgcolor=#f0f0f0]radius [/th][/tr][tr][td width=50" align="right]13 [/td] [td width=50" align="right]4 [/td][/tr][tr][td width=50" align="right]12 [/td] [td width=50" align="right]8 [/td][/tr][tr][td width=50" align="right]11 [/td] [td width=50" align="right]12 [/td][/tr][tr][td width=50" align="right]10 [/td] [td width=50" align="right]27 [/td][/tr][tr][td width=50" align="right]9 [/td] [td width=50" align="right]45 [/td][/tr][/table][/div][div style=clear:both][br][/div]

Share this post


Link to post
Share on other sites
Guest Crashgate3

Thanks :-)How big is a LOD 10 cell compared to a LOD 13? My current mesh uses 3x3 LOD 13 ones, so I've a feeling I'm going to have to heightmap a bit more terrain as well as just reduce the resolution of my existing one.

Share this post


Link to post
Share on other sites
Guest sgreenwood

>Thanks :-)You're welcome.>How big is a LOD 10 cell compared to a LOD 13? My current mesh>uses 3x3 LOD 13 ones, so I've a feeling I'm going to have to>heightmap a bit more terrain as well as just reduce the>resolution of my existing one.I was concerned about the amount of data you had. The area doubles with each step down in LOD number, so you will need enough data for 8x8 LOD13 cells to fill one LOD10 cell. Is there any lower resolution mesh aready available for the area, so you don't have to make your own? (Which airport is it, or where is it?)Steve

Share this post


Link to post
Share on other sites
Guest Crashgate3

Its LPMA, in Madeira (yes, huge project).The only bit I really want different to the default scenery is within about 2 miles of the airport, so I was thinking I could create a contour map of the area using the overhead view, screenshots and by creating a visibility layer in the weather options at a certain level. This should give me a contour which I can get with a screenshot, and slowly work up the altitude until I have a full map. Once I have the contours, painting the heightmap isn't actually that hard. The area I've made will cover 2 LOD 10 cells, but one of them will be mostly sea, and the area I've made already I can just lower the resolution in Photoshop.

Share this post


Link to post
Share on other sites
Guest ocelotl

What you can do in order not to need more terrain is foolowing the SDK information and use the data you already have, resampling it to exact coordinates and to LOD10.I'm inside a project where I'm using LOD10 as destination and am doing that for LOD9 and LOD8, just to have a good horizon at whatever the height and visibility I'm flying at.

Share this post


Link to post
Share on other sites
Guest sgreenwood

Well, I took a look at the area with SRTM-based mesh loaded, and it doesn't look too bad. This might be a reasonable alternative to your approach for filling the surrounding area, which sounds tedious. I spent a bit of time considering how I would continue from here, and created a simple website (mostly links) you may find helpful. It includes:* a screenshot approaching the airport in FS* a decent topo map of the island* a Microdem view of the island data, with contour lines* the SRTM hgt source data for the island* my mesh, created from the above data.The address is http://www.fs-traveler.com/downloads/madeira/At the very least, Microdem can probably give you better contour lines than your approach will. Unfortunately, the SRTM data is missing elevation values in the center of the island, in the most mountainous region. If your technique works well, you might want to consider using the SRTM data and fixing this area of missing values!Steve

Share this post


Link to post
Share on other sites
Guest Crashgate3

Oh, that is perfect! That SRTM data was exactly what I was looking for!!! Thank you sooo much :-DIs there any program that can convert that into a heightmap that a paint program can read so that I can have a go at fixing the missing part in the centre?

Share this post


Link to post
Share on other sites
Guest sgreenwood

You're welcome. The original SRTM data does not seem to be available any more, either at the original or the current published web address, and the seamless server reported no available data for the island when I tried it. I hope my providing it is OK with them.I haven't worked with heightmaps, but Microdem can save the data in "BSQ" format, which is the format used by resample. Use the I/O menu to merge the data (it can read the compressed files directly). The merged output will be saved in Microdem's proprietary DEM format. Then open the newly merged DEM and use the File menu to save it as a BSQ file.You may be then be able to read the BSQ data into an image editor as the RAW data type, but others will have to help you with this process.BTW, I just fixed the mesh link. On my server, HTTP apparently doesn't recognize ".bgl" as a valid registered MIME type. Go figure :-)Steve

Share this post


Link to post
Share on other sites
Guest Crashgate3

Hmm.. I'm very new to actually manipulating DEMs - I tried using Microdem to look at the heightmaps on the site you made, and they seem to have a lot more data missing than the contoured map you made. Are they from the same data? http://forums.avsim.net/user_files/107618.jpg

Share this post


Link to post
Share on other sites
Guest sgreenwood

You're right, they don't look very good do they. (Sorry!)Now you get to do a little experimenting. Microdem provides the option of filling holes in the data using a fairly good interpolation algorithm, and you get to specify the radius to use. It will fill them automatically when you merge files, if that option is checked in the program Settings. From the Options menu, select the Import/Export tab, and check the "Auto fill holes on DEM merge" box. then specify the "Merge gap to fill". While you are there, check the Maps tab and make sure your Primary Datum is set to WGS84. (We may need to change more settings as well.)I believe I used a value of 25, but this is a very subjective choice. I usually choose a value large enough to fill the small holes, where interpolation works fairly well. Then I fill the remaining large holes with GTOPO30 data, but this doesn't always work very well, especially in rugged terrain, where the differences in merged source data can be extreme. You can see the result in my mesh. :-(You might even use a value large enough to fill all the missing data and see how it looks!You can also use the menu option "Edit -> Fill Dem Holes" to fill them manually, or for a single file.In any case, zoom in on the "filled" image to evaluate the result.(I'm using an older version of Microdem, so the menus may be a bit different.)Steve

Share this post


Link to post
Share on other sites
Guest Crashgate3

OK.. I've now got the 2 DEMs stitched together, and I've filled the holes (although that big square bit in the middle won't go).How do I go about convert it into a mesh that the sim can use? I had a go writing an inf file and using resample, but it didn't work :-(http://forums.avsim.net/user_files/107636.jpg

Share this post


Link to post
Share on other sites
Guest sgreenwood

That looks better.No need to trim it, resample will do that for you. Since you've already created an inf file, I assume you were able to get the necessary values from the Microdem menus: * "Calculate -> Map Window Corners" will give you the coordinates you need.* "Info" will provide the rest of the values.I'm afraid we still have some work to do, including filling that hole. I'll dig out my original material for the area tomorrow; I should have the data I used to fill it originally. Here's the problem:If you use the FS2000 version of resample, it will create the mesh, leaving the "missing value" values in the data. But the sim does not treat it intelligently, and gives us spikes in those locations.The FS2002 and FS2004 versions respect the missing values and leaves any LOD cell with more than 2 or 3 nearby missing values blank. This is useful is some instances, but not here. The other challenge with these versions is that they will not allow us to "oversample" the data by very much. Specifically, they will not create mesh if you use an LOD of 10 or more with this source data. If you used one of the recent versions of resample and a high LOD, you might want to try again with an LOD value of 9, just to confirm that your proceddure is correct. The problem here is that so much is trimmed off, around the edges and because of the missing values, that the mesh is useless. So we need to fill the hole. I'll also upload the two hgt files to the north. That way you will have enough data to use any version of resample, and a higher LOD, if you use the FS2000 version.An alternative approach might be to use a tool such as BlackArt, which may be able to retrieve data and fill the holes for you. The new versions of Microdem may also be able to, but I think my approach is easier, although they may blend the edges better.Steve

Share this post


Link to post
Share on other sites
Guest sgreenwood

I decided to proceed by filling the holes with DTED0 data (30 arcsec, so it is not very good, but it is comparable to GTOPO30, and the files cover the same areas as the SRTM files, so it is convenient.)Download this additional data from my site:[pre style=position:relative;top:-15] www.fs-traveler.com/downloads/madeira/N33W017.hgt.zip www.fs-traveler.com/downloads/madeira/madeira_dted.zip[/pre]Extract the data in madeira_dted.zip, producing the following tree:[pre style=position:relative;top:-15] dted w017 n32.dt0 n33.dt0 ... w018 n32.dt0 ...[/pre]Then in Microdem:Set Options to automatically fill holesMerge these SRTM files:[pre style=position:relative;top:-15] N32W017.hgt.zip N32W018.hgt.zip N33W017.hgt.zip[/pre]Merge the three dted0 files (*.dt0)Load the merged dted0 file, then File -> Save as -> DTED0[pre style=position:relative;top:-15] the default values should be OK (this expands them them to the same spacing as the SRTM data)[/pre]Merge the merged DTED0 and merged SRTM files, in this order. Data in later files replace that in earlier files in the sequence, where present.(you may try filling any remaining holes at this point)Set the Missing Values to Sea Level (Edit menu)Save as BSQ fileThe results are not perfect, but this demonstrates one procedure for filing the holes. Additional cleaning of the boundaries between sources is possible, but can become very labor-intensive!-------------------------------PS:The DTED0 data was obtained from: http://geoengine.nima.mil/geospatial/SW_TO.../rast_roam.htmlAnd did you know that Madeira and Portugal scenery are available at:http://www.ptsim.com/en/madeira/madeira.htm[br]

Share this post


Link to post
Share on other sites
Guest Crashgate3

Thanks for all the help - I'd have got sick of me by now.. :)I can make the merged DEMs, and merge them to create one without any holes. Then I save it as a BSQ DEM, and make an INF file for it. I compile it with resample and it spits out a bgl. I've added this to the scenery and nothing shows up. When I look at the bgl using TMFviewer however, it shows up fine - it just doesn't appear in the game. I've checked that its in the scenery library, and in the right folder.Here's a link to a zip containing the DEM I made (before I converted it to a BSQ), and the INF file I used to compile it.http://www.geocities.com/stripeylaughter/madcomplete.zipAm I doing something wrong?

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
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...