Hi,
this is a complex bug I hope someone will be able to shed light now. Right from the start, I can't provider any reproducible test case beyond supertuxkart - the irrlicht mesh view demo, for instance, uses no lighting and can't reproduce that.
First, here is what the object looks like in blender :
the red color is done using vertex painting. Okay a few vertices are not fully painted in blender but I fail to see how this could result in what we see in-game!
In game, however, here is what we see :
What we have found out about this :
1) it only happens when the silo is exported as one with the rest of the track, in a large model. If we export it as a separate scene node, the shading becomes correct again.
2) it occurs on the faces facing the sun. If the model is rotated, the new faces facing the sun get this.
3) If I reduce the power of the sun, it stops occurring.
4) tried disabling specular lighting, didn't help. fully disabling lighting makes this go away.
5) Note that the normals of the model are smoothed so even if the sun somehow managed to make vertex colors go away I think it should still look smoother than that
6) repainting the object differently tends to make the issue go away, like only specific colors were affected??
So I think that under some circumstances, unfortunately I don't know which, the sun overrides the vertex color on SOME vertices of some faces.
Anyone has a clue how to further debug this??
Sun washes away vertex colors
Sun washes away vertex colors
Visit us at http://supertuxkart.net
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Sun washes away vertex colors
Actually, the upper image also shows these white streaks, just a little less obvious. Also normals of the silo are not smoothed, otherwise the silo would be perfectly round. This could be the root of the problem, though, as a wongly calculated normal might introduce such problems. How's the silo bottom connected to other meshes below the terrain?
Re: Sun washes away vertex colors
I am aware that it's not fully painted in blender, though the vertices at the bottom in the model are not white, they are just slightly less red - the game renders them fully white. So I agree they aren't as red as the others but still irrlicht renders the wrong color it seems to mehybrid wrote:Actually, the upper image also shows these white streaks, just a little less obvious. Also normals of the silo are not smoothed, otherwise the silo would be perfectly round. This could be the root of the problem, though, as a wongly calculated normal might introduce such problems. How's the silo bottom connected to other meshes below the terrain?
As to how the mesh is connected to everything else, it's very simple, it's not connected at all. The silo is not joined to the ground in any way. It doesn't have a bottom, if that matters
Visit us at http://supertuxkart.net
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Sun washes away vertex colors
Is the mesh somewhere in your SVN?
Re: Sun washes away vertex colors
The mesh can be found here : http://www.mediafire.com/?hilqs292x58c3h4
(if you get it from our latest SVN you will get one where we managed to make the problem go away without quite knowing how we did it)
in case you want the textures, they are at http://supertuxkart.svn.sourceforge.net ... acks/farm/ and http://supertuxkart.svn.sourceforge.net ... /textures/
And for the blender file, go to http://supertuxkart.svn.sourceforge.net ... acks/farm/
"farm.blend" is the one with the issue, "farm2.blend" is the one where the issue mysteriously went away (I think in fram2.blend the vertices are better painted)
Unfortunately I have not been able myself to reliably reproduce this in a small testcase so if you're trying to reproduce it maybe you won't see anything, that's what makes this bug tricky
(if you get it from our latest SVN you will get one where we managed to make the problem go away without quite knowing how we did it)
in case you want the textures, they are at http://supertuxkart.svn.sourceforge.net ... acks/farm/ and http://supertuxkart.svn.sourceforge.net ... /textures/
And for the blender file, go to http://supertuxkart.svn.sourceforge.net ... acks/farm/
"farm.blend" is the one with the issue, "farm2.blend" is the one where the issue mysteriously went away (I think in fram2.blend the vertices are better painted)
Unfortunately I have not been able myself to reliably reproduce this in a small testcase so if you're trying to reproduce it maybe you won't see anything, that's what makes this bug tricky
Visit us at http://supertuxkart.net