NVIDIA: All objects in single color

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

NVIDIA: All objects in single color

Post by Andi|xng »

In our game, Bolzplatz 2006, using a modified Irrlicht 0.14,we found the following problem:

Some people with NVIDIA video cards have the following bug:

Image

There should be textured 3d objects, but they are rendered in a single color (not always blue, but in a single random color). Some small objects are rendered correctly (like the circle in the middle of the screen), also all 2d graphics (even with 512x512) work correctly.

We found out, that this helps in most cases: Change the NVIDIA quality setting from "High quality" to "high performance" and it works - in Windows. In Linux it doesn't help anything.

Is this problem already known? Is there any solution? Please help!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I was not aware of this problem, so it might be not that common. I only know of this compile problem with nVidia drivers under Linux. Does OpenGL and DirectX make a difference under Windows? I guess that this problem is reproducible, i.e. occurs each time the app is started on that system!?
Maybe it's a problem with depth of buffers (because using high speed will change to 16bit depth or 32bit calculations), or some effects which corrupt the render states and which are left out due to changed settings. Since 2d images are drawn the render states are probably the cause.

BTW: Which changes did you make to Irrlicht 0.14? I've read that the linux distribution want to combine an original Irrlicht version with your app. And I'm currently making a priority list of patches to include for the next release.
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

I have not tried it with DirectX yet, thanks for the idea. I'll try to find some people with NVIDIA cards that want to help me testing.

The only modification that may cause the problem IMO is loading all textures in 32bit, see here:
http://irrlicht.sourceforge.net/phpBB2/ ... ght=#77010
The other modifications are just added features, like a mesh scene node for the crowd (people decals) and draw2DImage with rotation.

But as far as I remember, the problem already occurred before that modification... I have no idea why.
I'll try it with DirectX first.
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

I think the problem is solved. We found out that it is a problem with fog!

I used this code (java) to switch fogging off:

Code: Select all

GameEngine.getVideoDriver().setFog(new SColor(), true, 1, 0); //is this really "fog off"?
My idea was: Let's use 1 as the start value and 0 as the end value. This makes no sense, so there is no fog. I did not think much about it further, because it works - on all video cards, except some NVIDIA cards...

Please tell me how I can switch the fogging off (without changing each material's properties)! Now I use veeery high start end end values, so they are never visible. Thanks!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Fog has to be turned on explicitly for each material with fog in Irrlicht. So if you just do nothing it should be fine, no matter which values you use. Otherwise it's a problem in Jirr.
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

But fogging changes often during the game. There are many situations when I have do disable fogging. I can't believe that there is no method to do this? Am I the only one using different scenes during the game? ;) Perhaps someone wants to add it in a later version? I think, it's only a few lines of code (I could do it in OpenGL, but have to experience with DirectX).

In the meantime I'll use very high fog distance so it can't be seen.
Post Reply