Skip to main content
GameDev.net gamedev.net
🔒 Locked

Compression algorithm with a fast "region of interest" decompression algo

Started by paic May 29, 2007 at 4:53 AM 5 replies 1.5k views
Original Post
paic
paic
Hi, I'm working on the geometry clipmaps algorithm, and I'm currently having a little trouble deciding which compression algorithm I should use. The thing is : - I need to compress a terrain height map to fit in system memory (for the moment, I use a 16k² height map, which is 512MB) - be able to decompress only a certain area of the compressed height map. And I need this decompression to be really fast, since it will be the bottleneck. The paper suggests the use of a technique described in the paper "Fast Progressive Image Coding without Wavelets" but before I start to look at its implementation, I'd like to know if someone with knowledge in compression / decompression algorithms could give me some advices, present me a few algorithms which would fit my needs ? Because I'm a total beginner in those algorithms, And am a bit lost :) Thx in advance for any help !
dragongame
dragongame
Hi,

have you looked at terrain paging? (you might want to look at: Terrain paging and rendering algorithms a gamdev thread.)
“Always programm as if the person who will be maintaining your program is a violent psychopath that knows where you live”
paic
paic
Hi,
first, thx for the answer. I did read the thread you linked, but I fail to see how it will help me ... I'm not looking for a terrain algorithm, I already chose Geometry Clipmaps. I'm just looking for the best way to handle the compression / decompression part of it.
Thx anyway, it was still an interesting read.
Emmanuel Deloget
Emmanuel Deloget
Actually, something along the line of lossless jpeg (JPEG-LS) should do the trick, but that can be quite difficult to implement. It should be able to handle a 16bits grayscale image quite well.

The "Fast Progressive Image Coding without Wavelets" is also probably a good choice, although - unlike JPEG-LS - you will probably have to implement everything yourself, as you'll have hard time to find an existing implementation (a public domain JPEG-LS implementation can be found here).

You can also check this page, which deals with a few lossless grayscale image compression algorithms.

If you can deal with small errors, you can also use a standard progressive JPEG algorithms. That should work, although the quality of the output might be a bit lower.

Best regards,
mattnewport
mattnewport
Microsoft's HD Photo looks like it could be a pretty good choice. It has very good compression ratios and image quality and offers region of interest decoding as well as the option to decompress a region at less than full resolution which is ideal for clipmaps. It also supports just about every pixel format you could want so you can use it for 16 bit heightmap values etc. It also has pretty unrestrictive licensing. I've a feeling it may actually be based on "Fast Progressive Image Coding without Wavelets". There's a robust implementation for Windows available in the Windows Imaging Component and there's also a portable implementation available as part of the Device Porting Kit downloadable from MS. I was looking into using it for my geometry clipmaps implementation but haven't get around to implementing it yet.
Winograd
Winograd
There is some basic introductory chapters to compression in general and image compression in my thesis on lossless image compression. You can skip the remote imaging part, the techniques are universally applicable.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.