GLX & DDS, mipmaps are black?

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
User avatar
sparkprime
Ogre Magi
Posts: 1137
Joined: Mon May 07, 2007 3:43 am
Location: Ossining, New York
x 13
Contact:

GLX & DDS, mipmaps are black?

Post by sparkprime »

I'm getting this strange bug on my work pc, (work - heh, don't tell anyone) where dds textures are black beyond the first (largest) mipmap.

Have there been any changes to any code that might have done this? It's only in the last few weeks I think. 1.6 svn.

When I get home I can verify that it's not just this machine that is broken, but jpg textures seem to work fine. I also have no dds tools here which is irritating, as there seem to be no linux dds tools that actually work (the gimp plugin doesn't work).
User avatar
sparkprime
Ogre Magi
Posts: 1137
Joined: Mon May 07, 2007 3:43 am
Location: Ossining, New York
x 13
Contact:

Post by sparkprime »

It happens on win32 GL too. Here is the dds:

http://spark.woaf.net/skybox_side.dds

The DDS has no mipmaps so is relying on autogeneration of them. Generating mipmaps offline using the dx texture tool seems to fix it.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

Any chance it's related to this:

http://www.ogre3d.org/phpBB2/viewtopic.php?t=41547
sinbad wrote:I'm raising the bug with my contacts at nvidia and committing this workaround to the v1-6 branch until they fix the drivers
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Yep, same bug. Generate mipmaps in your tools and include them in the DDS to avoid the problem for now, I'm waiting on a response from nvidia. Or downgrade your driver of course ;) It only happened from the 175.x driver.
User avatar
sparkprime
Ogre Magi
Posts: 1137
Joined: Mon May 07, 2007 3:43 am
Location: Ossining, New York
x 13
Contact:

Post by sparkprime »

Ah right, that's pretty annoying. Nvidia must do a lot of testing before their releases :)
User avatar
sparkprime
Ogre Magi
Posts: 1137
Joined: Mon May 07, 2007 3:43 am
Location: Ossining, New York
x 13
Contact:

Post by sparkprime »

It just occured to me that getting the backend to generate dxt mipmaps for me is stupid because it will have to do lots of hard work to store those mipmaps in dxt compressed formats - finding optimal palettes for each 4x4 block. Even though the input image is dxt compressed, when they shrink it down, they would have to merge 4 adjacent 4x4 blocks into a single 4x4 block and recompute the palette for that block.

So I was probably killing performance by not generating them offline...
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Yeah, it's generally a good idea to pre-generate mips if you're using DDS of any kind, unless distribution size is an issue. You save time and you can tweak them much more carefully.
Post Reply