Jump to content
Sign in to follow this  
Guest smithf

Mesh Help!?!?

Recommended Posts

Guest

Alright, I downloaded two 100 meter DEM files, converted them to 16bit lsb format that the resampler likes and pasted them together side by side with a little program I wrote to create 1 big 2401x1201 file that covers a good chunk of northern Illinois and Indiana. Created the bgl just like the docs say and WOW. I've got hills!Then I pasted together some (b&w) 2m satelite photos enough to cover central Tippecanoe County and I'm starting to colorize them. But even at 100m the hills get flattened out too much in certain areas. Yes the midwest is flat but not where the rivers wind through them.So I wrote a little program that oversamples small areas of the big file by some ratio and fills in weighted averages for the new data.Then I grabbed a 350x250 area out of my 100m file and oversampled it by a factor of 5 for an almost perfect match at LOD11I've looked at the data with a hex editor and it looks just like it should. Hills where they should be, valleys in the right spot etc..But when I go to make the bgl it makes a complete mess of the landscape. It seems to be almost completly flat with small random variation. In the eastern half it is about 20 meters above the original scenery and about even with it in the west with a great cliff deviding the two halves. Here's my inf[Destination] LOD = 11 DestDir = "e:tmp" DestBaseFileName = "Lafayette" UseSourceDimensions = 1 [source] Type = ElevS16LSB NullCellValue = -9999 SourceDir = "e:tmp" SourceFile = "Lafayette.bsq" Lat = 40.5333333333333 Lon = -87.000000000000 NumOfCellsPerLine = 1751 NumOfLines = 1251 CellXdimensionDeg = 0.0001664 CellYdimensionDeg = 0.0001664 ScaleInMeters = 1.0

Share this post


Link to post
Share on other sites
Guest christian

Is your data 16bit integers?Cheers, Christian

Share this post


Link to post
Share on other sites
Guest

Yes! 16 Bit LSB. I grabbed the same area at 4x and got almost exactly the same thing. If I change the lod in the inf to 12 the mesh dissapears completely!

Share this post


Link to post
Share on other sites
Guest christian

Can you post screenshots (raw data and Fs2002 pics)? Hard to see whats going on...Cheers, Christian

Share this post


Link to post
Share on other sites
Guest sgreenwood

Hi Checkmate,By increasing your resolution from 100m to 20m you may have made your features too small to show up on the sim using the default fs2002.cfg settings. Try increasing your TERRAIN_MAX_VERTEX_LEVEL from 19 to 21. See www.fs-traveler.com/tmv-example.html for more details.The LOD11 quads that will include your new mesh extend from:W86.95313 - W86.71875N40.5176 - N40.2979The rest of your source area will remain default mesh, and you "may" see cliffs along these boundaries.Regards, Steve

Share this post


Link to post
Share on other sites
Guest

Hopefully a picture will appear with this message.First image is MS view of Lafayette IN. No Wabash river and US 231 is on top of the hill. Next is my partially colorized satelite photos laid on MS 1k mesh. As you can see the Wabash river is running accross the face of a very gradual slope Pic 3 is my 100m mesh. River is flat and and 231 aka River Road is in the valley. But the hill still isn't steep enough and the road on top of the hill should be runnig up the back of it.Pic 4 shows my oversampled mesh. Everything's pretty much flat.Pic 5 shows the Purdue University Airport in a trench. It sits perfectly on my 100m meshLast pic shows the ugly cliff that runs north-south at appx W86*57I'll send you the data file if you'd like. It looks OK to me but I have very little experience.

Share this post


Link to post
Share on other sites
Guest

The 20m (Now 25m) mesh shouldn't have features any really small features yet because I haven't edited it yet. It should look just like the 100m mesh. I did make that change and the cliff @ -86@ 57.5 is REALLY noticible now. That must be the western edge.I don't get why I've got the cliff there though. The terrain data west of there is somewhat higher. Does the resampler move all the data to fit the quadrants? And why is the rest of it completely flat?How far west would I have to go to get another quadrant or two.

Share this post


Link to post
Share on other sites
Guest sgreenwood

> I did make that change and the cliff @ -86@ 57.5 is REALLY noticible now.Because you are seeing more of the detail in the mesh data.I assume the cliff is between the 25m mesh and the default. It will probably be smaller, or go away, with the 100m mesh active. It occurs because of the differences in elevations in the two sets of data used and the way the sim handles these sharp transitions. This is why we see more cliffs around airports, lakes,... with higher resolution mesh.Resample does not move the data as long as your inf coordinates are correct for the source data. It just ignores all data not enclosed in a full LOD quadrant. The first two links on my "Tips" page may help clarify the issue. The calculations are for LOD7, but the concept is the same.www.fs-traveler.com/tips.htmlLOD11 quadrants are 0.05859375 degrees wide (from the LOD table). Multiply this by the number of quads you want to add, then subtract the product from -86.95313 to find out how much further West you have to go.I can e-mail you the crude Excel spreadsheet I used for the calculations I provided earlier if you would like.Steve

Share this post


Link to post
Share on other sites
Guest

Actually the 100m mesh was active in the picture. The data for that area in the 20 & 25m are the same height as the 100m and yet it looks like the resampler averaged the whole area and flattened it.I'd love to see the spreadsheet.Thanks for your interest, time, advice, and supportJohn

Share this post


Link to post
Share on other sites
Guest sgreenwood

You're welcome.The forum e-mail system does not seem to support Attachments. Send your e-mail address to support@fs-traveler.com and I will send you the spreadsheet. 100m mesh is still not very accurate. This may contribute to your alignment problems. You may want to try 30m data. Steve

Share this post


Link to post
Share on other sites
Guest christian

>Pic 3 is my 100m mesh. River is flat and and 231 aka River >Road is in the valley. But the hill still isn't steep >enough and the road on top of the hill should be runnig up >the back of it.Are you sure the photo and elevation data match? It's possible that they use different coordinates... >Pic 5 shows the Purdue University Airport in a trench. It >sits perfectly on my 100m mesh that doesn't mean anything. All airports are put on the right elevation automatically, the mesh doesn't have anything to do with it.>Last pic shows the ugly cliff that runs north-south at appx >W86*57 Is that near an airport? Then the cliff is caused by the difference between your mesh and the airport elevation...Cheers, Christian

Share this post


Link to post
Share on other sites
Guest

I rewrote part of the program that oversampled that original 100 meter data and got Corduroy! I then realized I had used columns instead of rows in part of the input. When I fixed the same equation in the output it was dead on. Now I have to write a program to edit 2.2 million altitude points.I feel really stupid. Thanks for everyone's help.Picture shows one span of US 52 waiting for more texture and final placement where it crosses the Wabash river and US 231. Mackey Arena and the Purdue airport can be seen peeking over the top of the hill.P.S. if anyone needs a tool to oversample dem data I have a crude one.

Share this post


Link to post
Share on other sites
Guest smithf

One way I have found to post a spreadsheet is to change the suffix to .txt with instructions to the users to "Save As" to their computer, and then change the suffix back to .xlsFrank Smith

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...