Jump to content
Sign in to follow this  
Guest christian

New tool - tmfdecompress. Testers, please?

Recommended Posts

Great, looks very interesting. I will try it when I get home this evening :).


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Jim.Great program!The bitmaps produced are vertically flipped, so you might want to fix that.Is there a palette scheme you used for the bitmap output?Dick

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.> The bitmaps produced are vertically flippedInteresting. They *were* vertically flipped, but I already fixed it. What are you using to view them? I'll double-check in a few different programs myself. Looks like it needs to be un-fixed :)> Is there a palette scheme you used for the bitmap output?The colours were lifted from FS2004 screenshots which contained all the land/waterclass types. The class bitmaps are just the raw data with a bitmap header and palette attached, so palette entry 56 corresponds to landclass 56 etc.Regards,Jim Keir.

Share this post


Link to post
Share on other sites

Hi Jim.It appears if you specify a lat-lon then the image is OK... but unspecified it is vertically flipped.This is a lot of fun. I just had to make a bitmap of worldlc.bgl, and it only takes 2-3 minutes on my machine.Good news on the palette indexing... makes drawing landclass with a paint program quite possible.Dick

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.>It appears if you specify a lat-lon then the image is OK...>but unspecified it is vertically flipped.A-ha! Ok, I'll track that one down tonight. I think I know what's causing it.>This is a lot of fun. I just had to make a bitmap of>worldlc.bgl, and it only takes 2-3 minutes on my machine.I made a rather nice composite image, using "worldlc.bgl", "worldwc.bgl" and "dem4km.bgl", lightsourced, as a 'hard light' layer to add texture.Try looking at the elevation data of some addon mesh sets - it tends to be a bit of an eye-opener...Regards,Jim Keir.

Share this post


Link to post
Share on other sites

Hi Jim.I suspect your bitmap formula is OK... I use Martin Wright's Show program as my default bitmap viewer. It shows them vertically flipped. But MSPaint and PSP7 are fine. So, it seems Martin's program has a problem with that format.Dick

Share this post


Link to post
Share on other sites

Not sure Dick. I also tested the tool. I use ACDSee as my image view program and it shows them correct in preview, but when I open them they do not show. Only after a refresh the BMP is loaded and it is loaded at 1% zoom all the time (so very small), while normally it is showed with a size to match full screen.So, there might be something different in these BMP files that confuses these programs.For the rest it works fine and it was fun to look at the land and waterclass data :).


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Jim.Arno's post seems to confirm there's something wrong with your bitmap writing routine. :( Gives you something to do tonight?I did have a problem with the -c option. The decompressor crashed when I set it to 100 on a meshfile. 50 worked fine, and that was actually too much, but something to keep in mind. The meshfile was 38Megs and LOD10 ( and I must have made it right as I didn't nned to use the -c function at all ).I did confirm the odd LC value usages of the "ItalyLandpack.bgl" that seemed to aggrevate seasonal CTDs, and that it was tmfmerged, as a corner LOD5 chunk is missing, which your program converts to "0".I'm going to try some other odd files I have, and see what develops.Dick

Share this post


Link to post
Share on other sites

Hi Jim.I decompressed a chunk of dem4km.bgl ( FS9's LOD3 world ), and resampled that *elev.raw at LOD3, then resampled an LOD5-sized 1 arc second data of mine at LOD9, then merged the two TMFs and made a BGL.The resulting BGL is a large chunk of the world at LOD3 and a smaller area within it at LOD9. TMFViewer confirms this.When that BGL is tmfdecompressed, it makes the new RAW file, and INF, entirely at LOD9.I'm not surprised at this, but my computer is currently trying to resample the new data at LOD9... the RAW size ballooned to over 1GB in size! I hope to have the new BGL by morning. ;)This program works pretty good.Dick

Share this post


Link to post
Share on other sites
Guest christian

Hi Jim,Haven't tested your tool yet, but sounds great.How is the compression encoded? I was always suspecting RLE would be one of them, but I think there are several? Never tried RLE, because I never really needed decompression urgently...One thing you may want to consider is putting something about copyrights into the readme. This thing can open a can of nasty worms, since it allows people to decompress copyrighted data (like my NZ mesh scenery), modify it and sell it as their own. There is a slight chance you may get sued over this by someone who isn't happy about your program. I'm not saying that any case would hold up in court, but just getting sued or threatend is hassle enough, and I suspect you want to avoid it.So, you could put a statement into your readme that would address the issue. If you are paranoid now, you could also password protect the zip and send passwords out on request to people who want it and who you trust.I know you did this all in good intentions, and I personally can see some great uses (can it decrompress season data as well?). Just want to help you avoid personal hassles in times you get sued for all sort of ridiculous stuff.Cheers, Christian

Share this post


Link to post
Share on other sites

Hi Jim.There's a glitch in your landclass INF:Type = LandClassU8should be:Type = ClassU8==============================There are other interesting palettes that can be applied. The Olson landclass palette is one. That is the original source of MS land classification:http://forums.avsim.net/user_files/58728.jpgThe reduced size and compression don't do the pic justice, but it's very nice. This is North America ( with Central America, Carribean, and Hawaiian ). The Yellow is transparent value #254. From the default Worldlc.bglNote that there are no funny LOD5 lines or squares, and no merging of the source. The raw file or bitmap can be altered with a paint program. And the landclass extends into the ocean and lakes as it should, so coastal areas are not cut off by the water values.Dick

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.>One thing you may want to consider is putting something about>copyrights into the readme. This thing can open a can of nasty>worms, since it allows people to decompress copyrighted dataYes, I know. I wasn't sure whether or not to let people know about it at all. The real problem is that MS have never released details of the compression, so this is on much shakier ground than showing the contents of LWM/VTP BGL files.I think I'll keep this more or less under my hat. Programs are less visible in these forums than, say, in the file library.Anyway, I had a quick tinker with the bitmap code and (I think) fixed the output problems. Also, the boundary checking on min/max coords is fixed and contrast of zero should now work, even though it's pointless. Regards,Jim Keir.

Share this post


Link to post
Share on other sites
Guest cwright

Jim, this is another *very* useful program. I hope you continue to develop it. As Christian says, a suitable note in the readme should cover the copyright issue. I can immediately think of a use for this in AutoAsm. I was recently playing with the idea of automatically setting the elevations of lakes. As the program creates the asm file it would read the elevation from a terrain bitmap and set the lake elevations as appropriate. This would be quite easy to do. The only problem was, how to make a terrain elevation bitmap for, say, the local default scenery. And then your program pops up.... Best regards, Chris

Share this post


Link to post
Share on other sites
Guest christian

Hi Jim,Have you thought about putting support for regions and seasons in? Season support would be really handy, since seasons cover LOD2 quads, and it's tedious to extract the data from TMFViewer to change a smaller area. If you want any info on the season header structure, I can give that to you.Cheers, Christian

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
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...