Why is TextureLoader giving 8-bit textures?

Hello,

It seems TextureLoader is returning 8-bit textures when it shouldn’t be. At first I thought the wrong color depth was set for the whole application, then after a few hours of fiddling around I found out the application (canvas3d) is in 24-bit mode (and desktop is in 32-bit mode).

But all of my textures look like they are 8-bit, like there are not enough colors. The original textures are fine, and I’ve set min and mag filters to nicest, but I get color banding like you get when a 16 or 32 bit texture is loaded as 8-bit.

I must have spent at least 4 hours looking through java docs and fiddling around, does anyone have any ideas about what might be going on?

Thanks,
-mike

here is a screenshot: http://img.photobucket.com/albums/v158/tandaur/bad.jpg
Look at the mountain image on the far walls.

Make sure all your driver settings are site to high quality. Some buggy drivers don’t support 32 bit textures.

I’m using a geforce4, with the latest drivers. The image settings in the driver are set to highest quality.

Anyone have any ideas? Is it the texture loader, the Texture2d or something else?

I’m loading them like this:


TextureLoader loader = new TextureLoader(filename, null); //null observer is that a problem??
Texture2D texture = (Texture2D) loader.getTexture();
texture.setMagFilter(Texture2D.NICEST);
texture.setMinFilter(Texture2D.NICEST);
texture.setEnable(true);
Appearance app = new Appearance();
app.setTexture(texture);
setAppearance(app);

The textures on my md3 models also have that color banding, they load the textures similarly, they use Texture instead of Texture2D.

I had same problems, I posted a step by step solution here:
https://java3d.dev.java.net/issues/show_bug.cgi?id=232