Sign in to follow this  
Guest AMC612

Mesh not showing up

Recommended Posts

Hi everybody,I used Jokin Bedialauneta's Grises50 tool to create new mesh terrain for a small Island I've applied photoreal textures to: I didn't follow author's suggestion to use a 256*256 image, as I hoped that it was an old restriction and that Elrond Elvish' Resample Tools (or MS Tmf2bgl) would "split" the mesh according to the LOD value.I spent a whole day of work for gray-scale overlaying a scanned map (one gray layer every 5 meters, being 130m the maximum altitude), and I ran grises50, from wich I obtained the dem file. Then I started Reample Tools, set my preferences, and eventually got my bgl file.But this is not a happy-end story, as FS doesn't show up my mesh: I also tried disabling all other non-standard scenery, but nothing to do. I tried several combinations of settings (ElevS16LSB, ElevS16MSB, Centered Sample switch et cetera) with slightly different output files, but same result.Any guess?This is my INF file as generated by FS Resample Tools:[Destination]DestDir = "C:ProgrammiFS Grises5 Mesh Maker"DestBaseFileName = "LICD"UseSourceDimensions = 1LOD = AUTO[source]Type = ElevS16LSBSourceDir = "C:ProgrammiFS Grises5 Mesh Maker"SourceFile = "LICD.dem"Lon = 12.499003Lat = 35.540535CellXdimensionDeg = 3.4841E-5CellYdimensionDeg = 2.676E-5NumOfCellsPerLine = 4401NumOfLines = 2277ScaleinMeters = 1SampleIsCentered = 0I can assure that co-ordinates are good. 4401 and 2277 correspond to the width and the height of my original image. I didn't try and change "LOD" setting as I really wouldn't know which could be best. CellDimensions were automatically calculated by FS Resample Tools, whilst I'm a bit confused about "SampleIsCentered" option.Thank you for your help! SergioPs: output bgl file is not "empty", being 9.2 MB its size.http://forums.avsim.com/user_files/19639.jpg

Share this post


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

Hi Sergio.If the BGL shows up in TMFViewer, it's a valid BGL. If your BGL shows up in TMFViewer, but not in the sim, the LOD is too rough ( too low a number ).The problem is probably due to :LOD = AUTOtry:LOD = 7Mesh is only shown if the LOD is higher than the default or any addon. Steve Greenwood has done a study of the default LODs for FS2002, and he might have some better advice. But LOD7 should work. You can leave out the "SampleIsCentered" line.Dick

Share this post


Link to post
Share on other sites

Hi Sergio,Dick is correct. The first step is to determine whether your data looks correct in TMFViewer.In general, it is probably not a good idea to use LOD=AUTO because you don't know what value is used, and this makes debugging problems more difficult later on. Dick's example involving mesh LOD priority is one such situation.If you use an LOD high enough to show the mesh properly in TMFViewer and it still doesn't show up in the sim you may have a different problem entirely. I haven't tried to make any islands, but I believe that the water mask controls the elevation where you are working. If so, you may need help from scenery design experts. Dick is better qualified than I am to address this issue.Steve

Share this post


Link to post
Share on other sites

Dick,thank you so much for your support.I was able to succesfully open and view the bgl file within TMFViewer, so you say this is a valid scenery and that's good news.Bad news is that I tried to set the LOD manually to 14 first, and then to 13, but with no effect. I tried these two values because in the meantime I was able to estimate that in my original dem every sample point corresponds to a 3.12m square cell. So LOD 14 (2.4m per sample) and LOD 13 (4.8m per sample) seemed to me best choices.By the way, comparing the output file size, I realized that setting LOD to AUTO leads the resampler to choose LOD 14 (which is, in facts, a good choice).And yet, mesh does not come up.This is so frustrating! Sergio

Share this post


Link to post
Share on other sites

Steve,thanks for your hint about water mask. Unfortunately I can't say I perfectly know what you're talking about.. =)If you come to know more about this, your help will be highly appreciated: I also happen to be somewhat new to this forum and this makes me quite unsure about who and where to ask.Thank you again!Sergio

Share this post


Link to post
Share on other sites

Hi Sergio.I looked at your INF file again. You had:Lon = 12.499003Lat = 35.540535By this do you mean: N12* 29.94198' E035* 32.4321' ?Also LODs greater than 10(?) might not show in the sim.Dick

Share this post


Link to post
Share on other sites

Hi Dick,I know Longitude and Latitude values may look odd but they're correct: N35 and E12; the island is located somewhere in the Meditarranean between Africa and Sicily. This is actually the place where I passed my Summer holidays last year. :)Trying different values for LOD caused a strange effect: the following 'table' reports output file size corresponding to LOD settings.LOD = 15 -> filesize = 21345 KBLOD = 14 -> filesize = 9812 KBLOD = 13 -> filesize = 3486 KBLOD = 12 -> filesize = 906 KBLOD = 11 -> filesize < 1 KBLOD = 10 -> filesize < 1 KB...and so on. It looks like the roughest LOD I'm able to select is 12.Also note that by selecting LOD 12 and viewing it with tmfviewer, the island appears cropped towards East: I suppose this must have been done by the Resampler in order to fit to the LOD grid.This might have something to do with the fact that I cannot go under 12? Maybe automatic cropping completely eliminates the mesh? Please note that this is a very small island, and that my mesh extends 13km West-East and 7 km North-South (according to UTM coordinates).Thank you again,Sergio

Share this post


Link to post
Share on other sites

Hi Dick,>Also LODs greater than 10(?) might not show in the sim.How embarrassing! This is the second time you've picked up on this issue after I've overlooked it. Of course higher LOD mesh will show up if TERRAIN_MAX_VERTEX_LEVEL is set to 21 in fs2002.cfg, but this is not always desireable. And the radius in which LOD14 mesh would be rendered is very small, perhaps a mile or two at best. Only the default (0m) elevation would be used until practically on top of the island.When I need to salvage coastline which would otherwise be trimmed off by Resample at lower LOD values, I add enough additional water to the area to extend the data into the next LOD quadrant beyond the one I need. This will probably be necessary here if a much lower LOD is used, since the island is quite small. TMFViewer is a welcome addition to our toolbox. It is surprising to see how much currently available mesh has extensive truncated shorelines. Sergio,I see you have already discovered this! You will need to add more surrounding water, as suggested above.Steve

Share this post


Link to post
Share on other sites

Steve,this is just a giant step forward. Unofortunately, I'm not sure wether I'll be able to add more water still maintaining orthorepherence: seeking hot spots on land is easy, but on sea, or even worse, on pattern-like/blank textures, is almost an impossible task! I'll try that setting in the cfg file.. why do you think this is not adviseable?Talk to you tomorrow. Good night,Sergio

Share this post


Link to post
Share on other sites

I have not worked with Grises, so I don't know how easy it is to add new area accurately, but I wanted to at least encourage you with one approach to working around this problem. I pre-process my DEM data with Microdem, so if I need to add additional area to a coastline I can always take a small subset from the GTOPO30 global data, merge it in, and set missing values to sea level. I then trim the final merged file if desired.Is Grises able to export your data in any "standard" DEM format for additional processing? Microdem can read most formats, but a format with header information included in/with the data file is easier to work with. Actually, I have my TMVL set at 21 almost all the time. It reveals more of the detail in higher resolution mesh, and is required if the LOD is 12 or more. The improvement with 30m or better mesh is substantial.But providing this additional detail requires more processing resources. I adjust other factors in the sim in order to enjoy the additional detail, but that is a personal preference.The additional detail itself can sometimes be a problem. Some addon scenery and photoreal textures are provided with their own mesh, and some of this mesh is of very coarse resolution. When viewed with a TMVL of 21, the slopes in the terrain often appear to have been constructed with large blocks. The effect is really not acceptable, so when spending time is these areas, I set the level back to 19. I do wish we could adjust the setting within the sim, however.Stevewww.fs-traveler.com

Share this post


Link to post
Share on other sites

Steve,I agree with you about the TMVL setting in FS: I tried it on 21 and the island popped up (as shown by the picture below), but I also noted a remarkable frame-rate drop both with LOD 13 and 12. So I'm reverting back to TMVL 19 and trying the MicroDem way.I must say I already tried to import the mesh in MicroDem, but the dem file created by Grises was not readable at all. So I thought to use the "ASCII XYZ from BMP" import function - and I actually did, having a 200MB+ ASCII output file as a result. Converting this latter to DEM seemed quite a huge task even for my good ol' AMD XP 2100+, so I gave up: what stopped me was also the long list of Microdem's bugs and instability issues - I feared I would spend two hours of hard CPU process for nothing. I think I will have to try again.Actually, as XYZ from BMP is stored in "PixelX,PixelY,Altitude" and not in "Latitude,Longitude,Altitude", I'm a little unsure about which option I should pick up for converting XYZ to DEM: chances areEasting-northing (UTM)x-y rectangularLatitude-longitudeLongitude-latitudeI'd say the second is my best shot, but then how would I orthorepherence the DEM?Also, I'm considering wether it would be a wise move to turn BMP resolution down a bit: 3.1 meters per pixel is quite high, don't you think?Last, I'm wondering how to "smooth" some parts of the mesh, which currently has only 5-by-5 steps of grays (1 step = 1 meter): maybe blurring the original image? Or does MicroDem feature "smoothing" or interpolation algorithms? I'll have to find out.Thank you so much for your help.http://forums.avsim.com/user_files/19881.jpg

Share this post


Link to post
Share on other sites

It's me again.Ok, I think we're up to something. Unfortunately today is a busy day so I don't think I'll be able to proceed more before tomorrow; but I decided to go for LOD 10, so I blurred my original picture (to get rid of those nasty 5-by-5 meters steps), resized it by 92% (sigh...) in order to have a scale very close to LOD 10 (38.4m/sample) and save CPU time at the same time. Then I moved my first steps in BMP-to-XYZ-to-DEM conversion, which is not the simpliest task on Earth.Next step will be enlargement of the mesh area, which means in this case adding water in all directions without losing orthorepherence. This shouldn't be hard to do from a theorical point of view, but I fear MICRODEM will require merging with some larger DEM file, am I right?One specific question: how shall I export the dem file from MICRODEM in order to make it readable by the Resampler? Which format is best?Thanks in advance.Sergio

Share this post


Link to post
Share on other sites

That must be some island! ;)I suggest using the GTOPO30 (w20n40?) data for the water. You can download the data here: ftp://edcftp.cr.usgs.gov/pub/data/gtopo30/global/Be sure your Primary Datum is WGS84 before saving any files.You will need extract the compressed file and then Import the Dem, as GTOPO30. It will ask for coordinates to use; you can select a reasonable portion of the region to work with. You can then extract two Subsets from the new DEM - one to the NE and one to the SW of your island. Before merging, these subsets will have to be resampled to the same XY spacing as your island data.Once merged, Set Missing Values to Sea Level, and trim (subset) your final DEM as needed. That's "all" there is to it. To convert your Microdem Dem to Resample-readable format, use BIGBSQ, available at: http://www.terrainmap.com/Steve

Share this post


Link to post
Share on other sites

Steve,I will never thank you enough.Actually I found that MICRODEM merging capabilities are limited to a certain DEM size, so this couldn't work for me as I needed big DEMs to fit to the correct LOD 10 grid. Most surprisingly, Excel turned out to be my saviour in this task: in facts I converted BMP to XYZ and then edited this latter file in Excel. With proper matrix calculations I was able to convert its original Line#,Column#,Elev format to UTMEasting,UTMNorthing,Elev. At this point all I had to do was add a couple of coordinates for SW and NE points of external LOD 10 grid, import the XYZ in MICRODEM, set all missing data to sea level, and save.This was not an easy thing - it took me the whole morning to see this damned Island's LOD 10 mesh appear. But eventually it did. So this is a happy-end story now, and this is thanks to you and Dick.As this is going to be a freeware scenery by ISD Project (Italian Scenery Designers, but the site is down at this time), of which I'm a proud member, I would like to have your full names gentlemen, to include them in the Credits: without you this would have never been possible.SergioPs: if you wish to see the results: http://simflying.de-zordo.it/prodotti/licd/screens.html . There are three set of images: first shows default scenery, second shows LOD 10 scenery, last shows LOD 13 scenery. You were right: 10 looks better than 13.

Share this post


Link to post
Share on other sites

Congratulations!You've certainly covered a lot of ground and the result looks good. To reinforce this learning experience, you should probably create a few more islands before too long. :)>MICRODEM merging capabilities are limited to a certain DEM sizeTrue, but it is quite a large size. I am currently merging 10m data to create mesh bgls 1/2 degree high by 1 degree wide. It should handle areas at least 3 times that size using 30m data. I suspect there was some other problem. At any rate, your solution is more practical in this case. Steve Greenwood

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