Z-test problem

1st image : everything looks fine, the white plane is under the grass one
2nd image : the camera is a bit lower and the white plane appears over the grass one (though it’s still under).

What’s that ? :o :o :o

Did you get it sorted?

Strange things like that did happen to me too, well not exatly your case, but as you saing - just move a camera a bit - and it got wrong rendered, move it back - everything fine… and the movent is so little, that actually nothing changes in the scene really, same nodes in your view and same order…

I going to open new topic with very simple yet killing me test case with that sort of thing happening, but this time it would be regarding transparency…

In fact it may be due to a lack of precision of the Z-buffer : when the farPlane value is too far the precision is reduced, thus leading to some mistakes in rendering. Is 3000 really too high for a back-clip distance ?

[quote="<MagicSpark.org [ BlueSky ]>,post:3,topic:28265"]
In fact it may be due to a lack of precision of the Z-buffer : when the farPlane value is too far the precision is reduced, thus leading to some mistakes in rendering. Is 3000 really too high for a back-clip distance ?
[/quote]
Well, yes, but only when your nodes are very close, my test case will be sort of “general”, objects will be far from each other, and another thing is - I have triyed to make farPlane of relatively little distance (200), and nearPlane of (1) - didn’t help.
BTW, nearPlane distance - would be something to worry about first of all, since depth buffer resolution is much more sensitive to it than to farPlane.
Don’t make nearPlane too close…

But anyhow, it doesn’t seems to be the depth test problem…

Edit: What about 3000, well… sounds a bit too big, do you realy need it to be so big? Always try to make farPlane as close as your scenario allows, and nearPlane - as far as it is acceptable (1 or 0.5 should be fine, don’t do 0.001 etc, as people tend to do)…

Well, yes, but only when your nodes are very close, my test case will be sort of “general”, objects will be far from each other, and another thing is - I have triyed to make farPlane of relatively little distance (200), and nearPlane of (1) - didn’t help.
BTW, nearPlane distance - would be something to worry about first of all, since depth buffer resolution is much more sensitive to it than to farPlane.
Don’t make nearPlane too close…

But anyhow, it doesn’t seems to be the depth test problem…
[/quote]
Can’t wait to see the test case. Each bug is a chance to understand more the rendering code.

Just my three cents…

Can’t you simply put your whole scene into a TransformGroup, which scales it down such that a farplane of any smally value would be sufficient?

Yeah of course.

Anyway the I don’t have two planes which are rendered as close in my game : the white plane was there for debugging purposes only.

See here http://www.java-gaming.org/forums/index.php?topic=14898.0.

Well, you could, but you would lose even more accuracy through floating point transformations. A multiplication with the scale, followed by the depth comparion…

So its not a good idea…