Page 1 of 1

PNG vs DDS vs VT

Posted: 13.02.2006, 05:12
by barbarossa2
Anyone care to give me a one or two sentence practical advantage/disadvantage comparison of the following formats when used in Celestia? I have lots of experience w PhotoShop and am comfortable using and editing PNG and JPG files for use in Celestia. But the big picture advantages and disadvantages of the following formats FOR CELESTIA still escape me...

PNG, JPG, DDS, VT

Thanks!

-Chris

Re: PNG vs DDS vs VT

Posted: 13.02.2006, 06:37
by jnthn
barbarossa2 wrote:the big picture advantages and disadvantages of the following formats FOR CELESTIA still escape me...

PNG, JPG, DDS, VT


I'm sure someone who better understands than I do will come along and make it clearer, but I'll have a go at it. It's all about image quality vs. performance. For small textures, high quality PNG's won't affect performance much. As the size increases, you have to make some choices.

PNG good: High quality images. The compression is lossless.

PNG bad: Takes lots of system RAM and CPU time to process. Makes Celestia a real dog. Woof.

JPG good: Takes less storage space than PNG. Performance may be a bit better than PNG. I'm not sure I can tell a difference.

JPG bad: Still chews up a lot of system RAM and CPU time. Lossy compression, so the image is degraded... but can still be quite good image quality, if you save them at a high quality compression ratio. (You knew that anyway) All in all... if I must choose between JPG and PNG, I will nearly always choose PNG.

DDS good: Processed directly by the video card, thus relieving a lot of the strain on the system RAM and CPU.

DDS bad: Lossy compression (there is u8888 compression, etc. which is lossless, but file sizes become prohibitive). Files in dxt1c format (the compression which yields the smallest file size) still take a lot of disk space.

I have a 64K VT of the Blue Marble Next Generation that I'm working on, and with DDS dxt1c compression, the disk space used is slightly more than with PNG, (1.7GB vs 1.9GB... yes, GB :o), but Celestia uses less memory, and overall performance is much smoother with DDS than with PNG.

A VT can be in any of the image formats Celstia understands (PNG, JPG, or DDS). It's just a method of tiling large textures in layers, so that you only load a few tiles at once. This makes it possible to use very large textures with a reasonable amount of memory. There's a detailed explanation here if you're interested in more depth.

The decision of what to use depends a lot on what type of texture. For large VT planet surfaces, DDS is best, IMO. The image degradation is tolerable, and the performance improvement is large. However, for normalmaps, and specular maps, high image fidelity is a must, and I'd go with PNG, or very high quality JPG (for normalmaps anyhow... PNG is the only suitable choice for spec maps, IMO.

OK... that was quite a bit more than a sentence or two. I quit now. 8) Hope it was helpful.

ciao,
Jonathan