www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: hytparadisee on June 27, 2007, 02:52:27 pm

Title: Need Another Help
Post by: hytparadisee on June 27, 2007, 02:52:27 pm
I loaded my scene model from a 3DS file. For the sake of some special processing, i have to break a box such that its one side is detached but their geometric information intact. In other words, the box will turn into a mesh and a plane, for which, i will do the special processing.

The problem is when the plane is far away from the camera, it flickers terribly. I can guarantee that this problem only occurs if I break a plane from a box. I am not sure whether this problem exists if manually creating a plane though. Without further ado, i will give you the shots.

When the cam is near the plane, it is displayed correctly.
(http://peterhi.com/resources/images/20070627/wbok.jpg)

However, if the cam is far from the gradient plane, it is shown like this
(http://peterhi.com/resources/images/20070627/wbproblem.jpg)
Title: Re: Need Another Help
Post by: EgonOlsen on June 27, 2007, 03:55:10 pm
Those are z-buffer accuracy issues (called z-fighting). Try to use a 32-bit z-buffer (if not already done) and try to move the far-plane nearer to the viewer if possible. If that doesn't help, move away the gradiant plane from the wall. There's nothing else you can do about this.
Title: Re: Need Another Help
Post by: hytparadisee on June 27, 2007, 05:36:23 pm
Alright, solved, the board is simply not thick enough lol.

(http://peterhi.com/resources/images/20070627/wbokagain.jpg)