Author Topic: V3.03 - Texture compression  (Read 30317 times)

Krein

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 1203
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
V3.03 - Texture compression
« on: March 28, 2007, 08:19:54 PM »
There's a new option in version v3.03 (out now on the usual beta page).  It's under Options->Preferences->General->Use texture (DXT1) compression.

The Good:

 * TopoFusion displays maps the way I've wanted it to since first writing it -- FAST.  The difference in loading map tiles from disk is quite large.  I'm getting load times that are about twice as fast.

* Memory usage.  TF is a bit of a memory hog if you have the tile cache set high.  Not anymore.  For the same size of cache (in terms of number of tiles cached) the memory usage is greatly reduced -- cut at least in half.

The Bad:

* Disk usage is a bit higher.  Tiles are stored in MapsX.dat files in DXT1 format, not JPEG.  The result is about 20% more disk usage.  This personally doesn't bother me, because disk space is cheap these days.  If I can find a better DXT1 encoder I should be able to reduce this to roughly the same space requirements in a future version.

* Loading previously downloaded JPEG tiles into a compressed (DXT1) graphics system is slower.  Basically this means your existing downloaded tiles will load about twice as slow as before.  Any newly downloaded tiles will be ripping fast, but old ones will be slower than before.

Texture compression defaults to "ON" (checked).  So, some of you may want to disable it if you have a large map files.

Edit - For users upgrading to v3.05 or later (the full release), the DXT1 option will default to "OFF".  Only brand new, fresh installs will default to "ON."  Regardless, you can always toggle it on / off later.

If there is enough interest, I will write a routine to convert map files downloaded before texture compression.  I'm OK with starting from scratch in order to get the speed/memory benefits, but others may have large map collections worth hanging on to.

Map files can be intermixed with DXT1 and JPEG tiles.  If the DXT1 option is checked when you download a map tile it will be saved in DXT1.  Otherwise it is saved as a JPEG, just as before.

v3.03 and up is able to handle both image types in the same map file.  There's just the difference in speed when converting JPEG to DXT1.  It will work perfectly fine, as before, if you turn texture compression off and stick with your existing map file.

I'm curious to hear any opinions on this.  Try it with a fresh map file (just change your map directory to an empty dir), and let me know what you think.  Clearly, for any new users, using DXT1 is the best choice.

Other changes in v3.03:

3.03 - [3/26/07-3/28/07]

Contrast/Brightness are back, not affecting entire display
Fixed crash when coming back from suspend/hibernate
Fixed memory leak on Topo 2/8/32 meter tilesets
Added "Use compressed DXT1 maps" to Options->Preferences
---> See forum for details
Fixed problems with animated sprites
Increased maximum download threads to 50
Fixed crash loading 2/8/32 tilesets in DXT1 mode
GIS layers now has "..." button for choosing files




Larry

  • Sr. Member
  • ****
  • Posts: 157
    • View Profile
V3.03 - Texture compression
« Reply #1 on: March 30, 2007, 05:02:43 PM »
Quote


If there is enough interest, I will write a routine to convert map files downloaded before texture compression.  I'm OK with starting from scratch in order to get the speed/memory benefits, but others may have large map collections worth hanging on to.



Hi Krein, I'll vote for a converter. I've just tried 3.03; no problems to report.

Larry

  • Sr. Member
  • ****
  • Posts: 157
    • View Profile
V3.03 - Texture compression
« Reply #2 on: March 31, 2007, 08:01:36 AM »
Quote (Krein @ Mar. 28 2007,11:19)
Fixed crash when coming back from suspend/hibernate

Krein, my Vista machine crashed resuming from 'sleep' while TF was running. Maybe something special about Vista.


When you attempt to restart in Vista after this sort of crash, it first tries to 'resume' exactly where it left off, but in this case, that freezes with a black screen. Then you have to hold the power key down a second time and choose the correct restart option as the system boots.

Hope you can find the issue. Till then, I'll be sure to close TF immediately if I'm not using it.

Krein

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 1203
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
V3.03 - Texture compression
« Reply #3 on: April 02, 2007, 11:35:30 AM »
Interesting, thanks for the Vista report.  Looks like I'm going to have to get a machine (virtual or othwerwise) with Vista on it for testing.

I've now tested hibernation on several (XP) computers and it seems fine.

m38a1guy

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
V3.03 - Texture compression
« Reply #4 on: April 04, 2007, 04:05:53 AM »
Ok so what are you saying all the Downloaded Files I have already on my laptop will be Slower to load now? Because it took me days to get my many Gigabytes worth of data in my map files. I also converted over the 3D landscape using the converter which was a while back. I wouldnt want to load a new version that slows my performance on my existing download tiles when loading.

You mentioned a converter would it convert the files we already have in there dat formats?

Krein

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 1203
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
V3.03 - Texture compression
« Reply #5 on: April 04, 2007, 08:58:16 AM »
Right, the new version would be slower, unless you disable the DXT1 compression.  Then it will preform just as before with your existing map data.

Yep, a converter would turn your .dat files into the new format.

sanewcomb

  • Sr. Member
  • ****
  • Posts: 87
    • View Profile
V3.03 - Texture compression
« Reply #6 on: April 06, 2007, 05:26:45 PM »
Is the compression lossy? I think the quality of the Terraserver tiles are already too low, so I would give up speed for image quality. Nice to have a way to turn it off.

Steve

Krein

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 1203
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
V3.03 - Texture compression
« Reply #7 on: April 06, 2007, 06:26:53 PM »
Steve,

Good question.  DXT1 is indeed lossy, just like jpeg.  In theory you are losing more info since it's an additional compression stage.

Here are two screen grabs.  One is DXT1, the other is JPEG.  I'll give you a nickel if you can tell me which is which.







This may or may not be a hint, but when I showed those images to Alan, he was sure, after study, which one was DXT1.

But he was wrong.  '<img'>

m38a1guy

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
V3.03 - Texture compression
« Reply #8 on: April 08, 2007, 10:48:19 PM »
I was going to say the Bottom one is the compressed one?

Anyway its just a pain to remember to turn off the compression, sometimes adding new things isnt always good if it has side effects. I have no intent on downloading all those tiles again, it took forever, NASA's server stink!

Are there any serious problems in 3.0 that I should know about? Because that version seems to be the best for my needs, if there is a bug that I will never come across, because I do not use the feature then I should have nothing to worry about on using the older version.

Larry

  • Sr. Member
  • ****
  • Posts: 157
    • View Profile
V3.03 - Texture compression
« Reply #9 on: April 09, 2007, 06:54:12 AM »
Krein, I think the DXT1 option is well worth it; for those who don't want to use it, it can just be turned off.

Have you thought more about creating a converter? If so, when might it be available? I'm wondering whether or not I should just start over and rebuild my map data file. Maybe if I use the 'load maps' tool and let it run overnight.....
 Â '<img'>

Larry

Krein

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 1203
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
V3.03 - Texture compression
« Reply #10 on: April 09, 2007, 08:16:58 AM »
Yeah, it's really not hard to turn the option off, and it'll stay off.  It needs to default "on" for new users.  

m38a1guy - unchecking one box isn't reason enough not to upgrade.  You may be OK with 3.0 for a while, but eventually new stuff and other fixes will be available and you'll want to use the newer versions.  The DXT option isn't going away.

Larry - I think a converter is likely, probably before we send out the update email to everyone.  But I am leaving on a trip this week, so it's not going be done until sometime in May.