DDS not working with texturearrays?


I started working with JMonkey (great engine btw!) and I see that it supports dds textures as well as texturearrays.

Unfortunately, when filling my texturearray with DXT1, DXT3, or DXT5 compressed textures, the output geometry is completely black.
Only if I use RGB888 (I use ATI Compressonator), the textures work, but the resulting file is pretty big (a single 1024x1024 texture takes up to 4 MB oO).

JPG or PNG work without any problems btw.

The odd thing is, that the DDS texture (even DXT1, 3 or 5) works well when I do not use texturearrays, but “default” texture2d, so it seems to be a problem with texturearrays? Or am I doing something wrong perhaps?

Thank you very much in advance!

1 Like

According to the documentation this one should be able to create a properly dx10 headerd dds file for this

(But I’m not entirly sure that jme can load those, but one step after another)

Thanks for your reply!

Unfortunately, the output textures from the nvidia tool also don’t work, at least if I use DXT (bc1-5).
When using the -rgb option, the texture works, its recognized as RGB8, but consumes a lot of memory (170kb DXT1 vs. 1,33mb RGB, 512x512 image).

I guess the RGB is uncompressed, isn’t it? So it seems that texturearrays don’t like compressed textures.

The DXT output from the nvidia tool can still be used as texture2d, but not within a texturearray =/

Did you just create 2d dds there and try to load multiple into an array, or did you actually create the array in that tool, as there is a specific dds subformat for arraytextures.

I created 2d dds and tried to load them into the array.

There is a specific subformat for arraytextures? oO Can you tell me how to use it?

Well their readme just says that it can assemble them from multiple images, and save them.

Never used that tool, so you have to find out on your own.

Alright, it looks like the texturearray feature in the nvidia tool does not work, it always creates a cubemap. There is another tool that can produce texturearray-dds (PVRTexTool), but it looks like the jme DDSLoader is having some problems with it. When trying to load a texturearray-dds, it throws an exception “Only DXGI_FORMAT_BC5_UNORM is supported for DirectX10 DDS! Got: 0”, independent of the format.

So just for the record: The DDSLoader cannot load texturearray-DDS, and texturearrays cannot be filled with single compressed texture2D-DDS?

I want to push this topic since I encountered exactly the same problem: Compressed textures don’t work with texture arrays in JMonkey :S
Does anyone have a clue?

Does a issue for this exist on github? so that this does not get lost at least and is properly documented as a issue?

1 Like

Not yet, at least haven’t seen any concerning this issue. But it’s a good hint, I’ll submit it as an issue on github.


Link to the issue red51 posted on github: DXT compressed textures not working with texture2DArrays · Issue #138 · jMonkeyEngine/jmonkeyengine · GitHub

1 Like

the bug ticked was closed but my textures are still black (512x512 DXT5). anyone else got this problem?

I know i had it back the last time i was doing terrain stuff,
but currently i dont use texturearrays, so i cannot confirm or deny it.

The problem can be reproduced by using the provided TestTextureArray.
With the default test you only see a single texture (Pond.jpg) where it should be 2 different textures as been seen in earlier builds. This is even a new problem!
And when changing it to load DXT5 textures the test wont even start.

@Shadowislord FYI


Are there any news?

The rendering system of jME is currently in active development, so some issues may appear (or disappear?)
If you like, you can contribute a test case for a DDS texture array via a pull request.

the bug was fixed :slight_smile: thank you