DDS file format

A texture can contain multiple images. For example, a cube map contains six images. A volume texture contains a whole stack of images. If you supply explicit mipmaps, then those are separate images too.

So far, panda supports file formats like JPG, PNG, and TGA. These file formats only store one image. That means, if you want to load a multi-image texture (ie, a cube map, or a volume texture, or a texture with explicit mipmaps), then you have to supply a whole bunch of image files.

However, there are file formats like DDS that can store mipmaps, multiple cube faces, or volume textures in a single file. In other words, multi-image files. Pro-rsoft and I are adding support for DDS textures, which means we’re creating the infrastructure for multi-image files.

In addition, we’re making it so that you can put multiple images side-by-side in a JPG or PNG. Ie, if you want to store a cube map in a JPG, you create a very wide JPG with room for six side-by-side images. Then, you put a note in the JPG comments indicating that it is intended to be used as a cube map. The texture loader will split it up into six pieces.

As I’ve mentioned elsewhere, I will help anyone implement any small feature that they want. I do this because I want you guys to familiarize yourselves with the process of modifying panda3D. This is a feature that pro-rsoft wanted, and I’m helping him with it at his request.

Forgive me if this is a rudimentary question,
but what is the benefit of DDS image format? When would one use it in a realtime application? Is it sort of like an HDR image that stores light exposure information, and can light a scene using global illumination? Thanks!

No, it has nothing to do with HDR at all.
DDS is a format capable of storing not just a single texture, but multiple. For example, it can store all 6 images of a cubemap (including mipmaps). Panda3D will read the file and extract the cubemap and mipmaps and set up a texture with it.

msdn.microsoft.com/archive/en-us … frame=true

Thanks for the reply and the link. This is something that I can use but never heard of before.

the features that i want from DDS is :
1 picking my own mip maps(so that i can ascent features that would blur out)
2 picking my own compression (which produces the best / space ratio)

Ooops… :blush: Totally forgot about DDS…

Josh, do you still think it’s worth to continue together? I know its a nightmare with those timezone differences.

Right now, I’m working very hard on the automatic shader generator. It’s really consuming me - I want this in there as soon as I can. I think it’s more important than DDS support, right now.

josh, make sure to look into how UT3 does it!

Where would I find that information?

UT3 mod development kit. You have to pay 300k for UT3 docs :slight_smile:. So (scratches head) i dont know.

hey guys when is this project ready?
i’m waiting for this and i realy need it in a month
maybe i can help with it?

and guys for everyone who want to convert dds take this one:
softpedia.com/get/Multimedia … TBmp.shtml

it also supports extended bmp (bmp with mipmaps) and ACE

Hmm, I don’t know about the project that Josh and pro-rsoft started together. I suspect that fizzled when Josh left CMU.

But DDS support exists in Panda cvs now, anyway. You can load DDS textures directly if you get the latest Panda from cvs and build it yourself.

It’s hard to imagine a project that truly needs DDS support, however. It’s just a convenience. Almost anything you can do with DDS you can do with other texture formats, just a little more clumsily. Also, note that Panda has always included its own multi-image file format, TXO, which is even more powerful than DDS, and you have access to this file format now with Panda version 1.5.x. The only downside to TXO is that there aren’t a lot of standard converters to write it, so you’d have to write your own Python code to generate TXO files, or use egg2bam.

David

ty man, for the info.
I’m gonna try that txo format. actully it’s not such project that i coudn’t use a regular image for mat, but it’s more somthing this: i want my project to need it.

EmjeR

OK, though as I said before, it’s hard to imagine how you could design a project that needs this feature, since anything you can do with this feature you can also do without this feature.

David