DDS Texture format?

Blitz3D Forums/Blitz3D Programming/DDS Texture format?

_PJ_(Posted 2009) [#1]
Did I imagine it, or did I read somewhere that B3D can now use DDS format textures?


puki(Posted 2009) [#2]
Yes, in general. I am not sure if they are guaranteed as there are various DDS formats that all have the DDS extension.


_PJ_(Posted 2009) [#3]
Thanks Puki - I think I might be safe,
The different formats relate to bit-depth, whether Alpha flag, whether or not MipMapped alternatives are included and how many.

I'm making my own and they're greyscale no-alpha textures at 'level 1' with no mipmap scales.

I'l see how it goes.


-----------

edit: Woohoo They work fine!!!


Vorderman(Posted 2009) [#4]
DDS textures are great - you can specify your own mipmapping levels and so reduce the effects of Blitz's nasty filtering.


_PJ_(Posted 2009) [#5]
DDS textures are great - you can specify your own mipmapping levels and so reduce the effects of Blitz's nasty filtering.


Hrm.. okay, I'm tempted to try this... How do I access the Mipmaps from within Blitz? Do I load the textures as AnimTextures?


OJay(Posted 2009) [#6]
versions.txt (in blitz' root folder):
LoadTexture now loads compressed '.dds' files.

TextureBuffer() returns 0 for compressed textures.

Compressed anim and cube textures not yet supported.

Only DXTC modes 1, 3 & 5 are currently supported. Modes 2 & 4 are pretty much never used in the industry, even
NVidias own DDS exporter for Photoshop now only supports modes 1, 3 & 5.

The loader code stricly adheres to the DDS format, files saved from Photoshop using NVidias DDS exporter will
work fine. If you're getting errors, it could be that your DDS file is non-standard.

The mipmap flag is ignored when loading DDS textures. Instead, if the DDS file contains mipmaps, then they are
loaded & used.

DDS textures will load when used by meshes that are loaded using Blitz3D's various load mesh commands.

Usage tips:
If your texture does not have an alpha use mode DXT1
If your texture has a 1 bit mask, use mode DXT1a
If your texture has a smooth gradient alpha, use mode DXT5

and mipmaps are not accessable from within blitz3d.


_PJ_(Posted 2009) [#7]
Sorry what I meant was how do I make use of the Mipmaps, which is explained in yopur quote. Seems they are used autimatically. Thanks, I knew I'd seen that somewhere.


Ross C(Posted 2009) [#8]
You need to generate them yourself in the .dds textures. There was a nvidia plug in for photoshop that does it. I'm afraid that's all the help i can be...


chi(Posted 2009) [#9]
http://eliteforce2.filefront.com/file/DDS_Converter;29412

download "dds converter 2.1"... with this prog you can also adjust the mipmap-level very simple. have fun...


cheers, chi


Vorderman(Posted 2009) [#10]
NVidia have a Photoshop plugin that can save DDS files - I've just tried it with Photoshop Elements 7 and it seems to work just fine.

If you're after a good graphics tool then I thoroughly recommend Photoshop Elements - it has almost all the useful features that normal Photoshop has (all the graphics editing and painting stuff, the selection tools, layers, and blend modes, hue/contrast etc.. adjustment, the clone brush etc.. etc..) but it's pretty cheap to buy - I got mine from Amazon for £40. So far (and I use Photoshop CS2 on a daily basis at work) I can't really find anything that Elements can't do as well as full Photoshop, at least for creating game textures.

The only thing it won't do (that's game texture related) is enable you to save a TGA file as 32bit with a custom alpha channel, but seeing as you can save transparency to a PNG just by leaving the background blank that problem is easily avoided.

http://developer.nvidia.com/object/photoshop_dds_plugins.html


_PJ_(Posted 2009) [#11]
Seems I've been ,misunderstood.

I have access to Photoshop CS2 and the nVidia plugins, I am using this to draw the textures.

My original question of:
. How do I access the Mipmaps from within Blitz? Do I load the textures as AnimTextures?

(Which was probably badly worded and misleading) shiould have read something like:

"How do I get a Blitz3D application to make use of the various mipmap levels contained within DDS format texture files?"

Which, has kinda been answered:


OJAY:
versions.txt (in blitz' root folder):

LoadTexture now loads compressed '.dds' files.

TextureBuffer() returns 0 for compressed textures.

Compressed anim and cube textures not yet supported.

Only DXTC modes 1, 3 & 5 are currently supported. Modes 2 & 4 are pretty much never used in the industry, even
NVidias own DDS exporter for Photoshop now only supports modes 1, 3 & 5.

The loader code stricly adheres to the DDS format, files saved from Photoshop using NVidias DDS exporter will
work fine. If you're getting errors, it could be that your DDS file is non-standard.

The mipmap flag is ignored when loading DDS textures. Instead, if the DDS file contains mipmaps, then they are
loaded & used.

DDS textures will load when used by meshes that are loaded using Blitz3D's various load mesh commands.

Usage tips:
If your texture does not have an alpha use mode DXT1
If your texture has a 1 bit mask, use mode DXT1a
If your texture has a smooth gradient alpha, use mode DXT5


and mipmaps are not accessable from within blitz3d.




MALICE:
Sorry what I meant was how do I make use of the Mipmaps, which is explained in yopur quote. Seems they are used autimatically. Thanks, I knew I'd seen that somewhere.



All in all, everything seems okay, although I don't notice any particular difference for any DXT modes even for coloured textures. I have ensured the MipMaps are generated, perhaps I eed to tweak the settings some ?


OJay(Posted 2009) [#12]
the only difference you will see between the different modes will be the filesize, where dxt1 will be the smallest and dxt5 the largest...
somewhere on the nvidia page is a tiny dds viewer, where you can view all dds features in detail.

additionally, this might be of interest:
http://udn.epicgames.com/Two/TextureComparison.html


_PJ_(Posted 2009) [#13]
Yes, but shouldn;t I be able to see some effect in the rendering?


Ross C(Posted 2009) [#14]
Not really, unless you were previously pushing your VRAM to the max. Or unless your .dds texture for your skyboxes.

[EDITED] for shocking spelling.


_PJ_(Posted 2009) [#15]
Allrighty then, thanks for all the info :)