DDS texture trouble

Hi,



I'm experimenting with DDS textures and I can't figure out why my texture doesn't show up. I'm using the TestMeshLoading class for my test. I changed the texture property in the Example.material file for Ninja like this:

material Examples/Ninja
{
        technique
        {
                pass
                {
               
                        texture_unit
                        {
                                texture test.dds
                        }
                }
        }
}


then I added the test.dds file to the jmesrcjmetestdatamodelogrexml folder where the rest of the textures are. I'm thinking maybe the format of my DDS file is not compatible with jme. I attached a screen shot of the file properties in ATi's TheCompressonator. You can see that the compression format is DXT1 so it should work from what I read in the wiki:
Only a certain variation of DDS is supported.. DXT1-3-5 compressed, 2D (non-cubemap), DirectX9 format. Use ATI Compressonator to make compatible DDS images

Only a certain variation of DDS is supported.. DXT1-3-5 compressed, 2D (non-cubemap), DirectX9 format. Use ATI Compressonator to make compatible DDS images

Actually I have made some changes to the DDS importer a while ago and that statement is false. Uncompressed and grayscale images are supported, as well as cubemaps.

As for the error, I really can't be sure of what's causing it.. It should work but it doesn't. Are there any messages in the log? Are you sure the texture is actually loaded and that it can be found?

The texture is definitely being loaded. I've stepped through TestMeshLoading and put a break point at line 122:

model = (Node) loader.loadModel(meshURL);


I jumped over this line and inspected model; it has two OgreMesh children and each of them has a LWJGLTextureState with imageLocation = .../test.dds .

The ninja model basically loads up without any apparent texture; it's a grey color when scene lights are on and totally white with the lights off.

The only problem I can think of there being is the unusual size 1024x512 which might not be supported by your video card, also since the texture appears white instead of black, which indicates more so a hardware issue than a software one… You might have to send me or upload it the texture somewhere so that I can take a look at it and debug the DDSLoader and find where it fails. I have tested ATI Compressonator and DXT1 textures with my improved loader and never had any problems with loading so I am rather surprised about this problem.

I’ve uploaded the texture file here: http://www.filehosting.org/file/details/38396/test.dds

I brought the texture into GIMP (DDS plugin) and re-saved the file with the following: compression = none, format = RGB8. Now I can see the texture on the ninja. Is it possible that my video card can't handle compressed DDS textures?



Here's what jme prints out about my video device:

INFO: Running on: ati2dvag
Driver version: 6.14.10.6912
ATI Technologies Inc. - ATI Radeon X300/X550/X1050 Series - 2.1.8494 Release

I just checked it and it loads fine on my PC. It's possible your video card doesn't like DXT compressed textures where the width and height are not the same (1024x512) but I doubt it. Radeon X300 even supports shaders (OpenGL2.0) so I am confused as to why it would not support compressed textures, which were introduced in OpenGL1.3…

Did you try downloading the latest drivers yet? It's possible you're using a really old driver which would explain the problem.

Just updated my drivers, same problem  :?



I'm running in dual screen mode, could that cause an issue?

I just tried this on another computer, my macbook pro (NVIDIA GeForce 8600M GT) and I still have the same grey/white texture.



Momoko_Fan can you tell me exactly what you did to apply the test.dds texture to the ninja. I'm starting to think it's not a hardware issue.

Mr.Marbles said:

I just tried this on another computer, my macbook pro (NVIDIA GeForce 8600M GT) and I still have the same grey/white texture.

Momoko_Fan can you tell me exactly what you did to apply the test.dds texture to the ninja. I'm starting to think it's not a hardware issue.

I guess possible reasons from my experience.
1. If the dds image doesn't have mipmap and Texture Minification Filter is one of *NearestMipMap, *LinearMipMap.
2. If the dds image has mipmap and loaded with no mipmap option of Minification Filter,
after then image's mipmap option is changed to one with mipmap.