dds or jpeg

Tips for creating and manipulating planet textures for Celestia.
Topic author
Vincent (France)

dds or jpeg

Post #1by Vincent (France) » 03.01.2005, 17:57

I've made a dds texture (5 Mb) and a jpg texture (1 MB) for mercury : the two textures have nearly the same quality and look nearly the same in Celestia.

So here is my question : Is it true that it's better for cpu to use the dds texture even if it's heavier ? :roll: And why ?

Thanks
Vincent

kikinho
Posts: 330
Joined: 18.09.2004
With us: 20 years 2 months
Location: Eden, a planet in Etheral Universe

Post #2by kikinho » 03.01.2005, 18:14

Because dds textuures are compressed. And dds textures spend less time to appear in Celestia than PNG and JPG.
One day we will swim in the subsurface ocean of Europa and take shower in ethane lakes of Titan.

Topic author
Vincent (France)

Post #3by Vincent (France) » 03.01.2005, 19:11

OK, but then why is dds 5 times heavier than jpg ? As dds is more compressed, shouldn't it be the contrary ?

I don't understand how a 5Mb texture is easier to load than an only 1 Mb file...

Regards,

Vincent

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 2 months
Location: Germany

Post #4by Harry » 03.01.2005, 21:16

Vincent (France) wrote:OK, but then why is dds 5 times heavier than jpg ? As dds is more compressed, shouldn't it be the contrary ?

I don't understand how a 5Mb texture is easier to load than an only 1 Mb file...

The JPG is only compressed while being on disk. Celestia has to decompress it before it can be used by the graphics card, which requires significant amount of CPU time, and it's geting pretty large after decompression (width * height * 3 [bytes]), and it uses up that much memory either in main memory or in the graphics card memory.

DDS on the other hand doesn't need to be decompressed at all before getting used (the graphics card can decompress it in real time when using it), so it takes practically no CPU at all and only as much main/graphics card memory as it takes on disk (typically 1/6th the full size). It does however have worse(!) visual quality then JPGs, and not all graphics card can use it, but DDS can be much faster to load then JPG and allow higher resolution textures with the same amount of graphics card memory.

HTH,

Harald

Topic author
Vincent (France)

Post #5by Vincent (France) » 03.01.2005, 22:15

OK, thanks for this perfect explanation !! :D

Regards,
Vincent

Topic author
Vincent (France)

Post #6by Vincent (France) » 03.01.2005, 22:16

OK, thanks for this perfect explanation !! :D

Regards,
Vincent

Topic author
Vincent (France)

Post #7by Vincent (France) » 03.01.2005, 22:29

So, let me ask you another question please :

in that case, is it usefull to open all my big jpeg textures with photoshop (I have the dds plug) and convert them into dds ?

Vincent

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #8by maxim » 04.01.2005, 00:47

Vincent,

you could do that, but you should be a bit carefull to achieve the best possible quality. It is not always obvious how to get it with this tool.
But usually every bigger celestia jpg-texture on the net should have an equal dds-texture at it's side. So perhaps you just need to download.

maxim

Topic author
Vincent (France)

Post #9by Vincent (France) » 04.01.2005, 11:49

Thanks Maxim. And I agree with you when you say that, even with some experience, we have to be carefull with Photoshop and more particularly with dds files.

If you still have some time (and space :wink: ) for my questions, I realised that some dds files have MIP maps. I've tried to save these files without keeping the MIP maps and then, I noticed that the sides of the planets were 'glittering' because resolution seemed to be upper...

So are these MIP maps used to avoid this glittering ?

Vincent

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #10by maxim » 04.01.2005, 14:41

The mipmaps (lores versions of the texure) are used for horizont rendering to avoid those flickering effects. It's a tradeoff between filesize and quality. If you like to have maximum render quality to should keep mipmaps. But it increases filesize and memory occupation of course.

maxim

Topic author
Vincent (France)

Post #11by Vincent (France) » 04.01.2005, 23:32

life is also a trade off... Thanks Maxim

Vincent

Topic author
Vincent (France)

Post #12by Vincent (France) » 04.01.2005, 23:32

life is also a trade off... Thanks Maxim

Vincent

Nameless
Posts: 8
Joined: 03.07.2004
With us: 20 years 4 months
Location: Germany

Post #13by Nameless » 12.01.2005, 13:18

kikinho wrote:Because dds textuures are compressed. And dds textures spend less time to appear in Celestia than PNG and JPG.


How did you think about JPEG 2000 ?
It's also open source: http://www.ece.uvic.ca/~mdadams/jasper/

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 2 months
Location: Germany

Post #14by Harry » 12.01.2005, 13:56

Nameless wrote:How did you think about JPEG 2000?

You can't beat DDS when it comes to performance, but you can easily beat it when it comes to quality - JPG is pretty good in most cases and offers good compression ratios, and for perfect quality (and alpha layer) you can use PNG.

JPEG 2000 would offer smaller files (or better quality), but I am not sure that this would make a huge difference. It does also have an alpha layer, which could be very useful (e.g. to replace huge PNG textures). However I am not sure it's worth the work to include it, and there aren't yet that many programs which support it.

Harald


Return to “Textures”