Sign in to follow this  
Guest sgreenwood

Help. My mesh isn't showing.

Recommended Posts

I've been flying MSFS since my C64 days and I've added a few buildings to the world in the past but this is the first time I've tried doing a mesh.I downloaded a 100m dem from the sight reccomended in the terrain SDK and converted it with READ_DEM. What I got appeared to be a 2884802 byte file with a signed 2 byte integer for every sample in a 1201x1201 grid. then I ran resample with the following inf file.[Destination] LOD = Auto DestDir = "e:tmp" DestBaseFileName = "tippy" UseSourceDimensions = 1 [source] Type = ElevS16LSB SourceDir = "e:tmp" SourceFile = "dane.bsq" Lat = 41.0000 Lon = -87.0000 NumOfCellsPerLine = 1201 NumOfLines = 1201 CellXdimensionDeg = 0.000832 CellYdimensionDeg = 0.000832 ScaleInMeters = 1.0tippy is short for Tippecanoe county, IN USA where this mesh is.I compressed it, converted it to a bgl, stuck it in my ADDONScenery directory and went flying. No change.I changed the LOD to 10 and then 12. I got a really big bgl but still no change. I thought maybe there just wasn't enough difference from the original mesh so I changed the first 4 bytes from ce00 ce00 cd00 ce00 to fe00 ce01 ce01 fe00 and found the start of the next row 2402 bytes in and did the same there. then I re tmf/compress/bgl and went to N41 W87 and looked for my mini mountain. Not there.I moved the bgl from my addon directory to it's own directory and made sure there was an entry in scenery.cfg. still no luck.I moved the lat and lon to Florida where 600-800 foot elevetions would REALLY stand out. Still doesn't show up.Anybody know what I'm doing wrong?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Checkmate,Your inf file looks ok.The terrain in that area is pretty flat, even with 30m mesh, but you should see some improvement.I just created mesh for the area and checked it at N40 49.25 W86 44.61. There is a river there, and I can see a difference in elevation along the river bank - small cliff with the 100m mesh. You may need to compare screen shots if you are checking an area with no significant relief.I suggest trying another area with more hills to confirm your technique.My inf:&l;Destination&r;LOD = 10DestDir = "_data-hdrdem"DestBaseFileName = "40086-danville-e"UseSourceDimensions = 1&l;Source&r;Type = ElevS16LSBNullCellValue = -9999SourceDir = "_data-hdrdem"SourceFile = "40086-danville-e.dem"Lat = 41Lon = -87NumOfCellsPerLine = 1201NumOfLines = 1201CellXdimensionDeg = 8.3263946711074104912572855953372e-4CellYdimensionDeg = 8.3263946711074104912572855953372e-4ScaleinMeters = 1Regards, Stevewww.fs-traveler.com

Share this post


Link to post
Share on other sites

You're right it is flat except along the rivers but thats exactly where i'm interested in putting some scenery. The Purdue University Airport sits on a 100 foot bluff near the river. The university has some cool buildings and stadiums. There's an historic old courthouse where Abe Lincoln spoke on his way to Washington and some cool old bridges.I have topo data good enough to do a 10m mesh in some parts. I'll probably oversample the 100m stuff and tweak it in the areas I'm particularly interested in.I still can't get mine to work but I continue to try.I've seen somewhere that a mesh has to cover entire quadrant or it doesn't show up. How big is a quadrant? Is that simply one square of the mesh it's replaceing?I've also heard of a bug in the tmf2bgl program that miswrites the header. I guess thats where I'll look next.

Share this post


Link to post
Share on other sites

At LOD 9, a quadrant is about 0.176 by 0.234 degrees. When producing mesh from a single dem, there is always an area along some of the borders that will not be included. AT LOD 9, this can be as wide as 0.234 degrees! Have you checked your mesh in areas other than at the Purdue airport, e.g. near the center of the area of coverage? Since the airport is near the edge of the DEM area, at N40.412 W86.937, I suspect it may not be included in the bgl. The best solution is to combine danville-e and danville-w DEMs into a single bgl.I have two "tips" that discuss this issue in some detail at:www.fs-traveler.com/tips.htmlFrom the author of BGLPatch:>Mesh files produced with the Microsoft Terrain SDK tools may be unusable >if they are on the western hemisphere. The reason seems to be that the >header of the BGL file contains wrong eastern coordinates: Always >W000:00:00.0000.The bug exists, but I have never had "unusable" mesh because of it. I created and tested mesh yesterday using the danville-e data and the FS2000 SDK tools. No problems.Good luck, Steve

Share this post


Link to post
Share on other sites

I resampled/compressed/bgl using your header. Still no luck.I ripped the whole thing out of the library and put the bgl back in the addon directory. Still nothing. (Note: I exited and restarted msfs2k2 after each change.)I told it not to use addon scenery and then told it to use addon scenery. HILLS!! Way cool thanks for the help.I put my original bgl back in and restarted and everything still works so I guess it was just the way it was installed.So now the data I've got @1201 samples/degree is about 100m ? Can I interpolate it out to 10m edit it and resample it at LOD = 10 appx 30m?I guess now i need to write some VB code to help me edit the mesh.You don't know of any raw data (pre tmf) file editors out there do you? (not hex editors that's what I'm trying to avoid.Thanks again for all your help

Share this post


Link to post
Share on other sites

Congratulations!Another tip I neglected to mention. I usually delete the scenery.dat file in the level above the scenery folder where I am installing test mesh. This seems to avoid some types of problems, especially if I keep replacing a file with the same name.As for editors:I use MicroDem for most of my data preparation. You can select an area and edit the elevations in a grid, much like a spreadsheet, but it is only one or two steps up from a hex editor. The DEM file format it uses when saving files is not a standard DEM, but they can be converted for the SDK using MDEM2BSQ.exe (much like readdem.exe does with standard DEM files). Some people edit greyscale images using graphics programs and then convert these to a format suitable for input into the SDK. This approach seems popular when the only source of good elevation data is printed maps. I have no experience with this procedure, but one tool I see mentioned is GRISES50, available at: http://www.dazeflight.de/specials/mesh/mesh.htmI would not recommend oversampling all your data to 10m. I'd leave that bgl as it is and use Microdem to create a small subset of the data for the area you are interested in and work with the subset. Then use a higher level LOD to create the bgl, to insure that it shows up in the sim (quadrant size issues still apply).Good luck, Steve

Share this post


Link to post
Share on other sites

I downloaded it along with the docs I'll give it a look.Right now I've written a little VB program to combine 2 contiguous dems and edit them a little.I'll probably pull out small areas, oversample them and replace the oversampled data with topo data that I have.MSFS has my airport about 1.5 miles from where MS Terraserver has it. My dem data would put it in between and my topo data is from a map with no Lat/Lon just a scale and reference points (intersections, etc.) to work from.My ponderous question of the day is do I move my airport to my satelite photos or move my satelite photos to my airport or move both of them to my dem data (which I could edit to match either).Life is nothing if not interesting

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