View Full Version : Rendering Problem !

02-03-2003, 11:38 PM

I develop a visualization prog with Qt 2.2.3 and OpenGL under both windows and linux.I render 3D object with 3 methods :
Wire Mode
<img src = "http://www.lpmo.edu/~armati/wire.png">

Solid mode
<img src = "http://www.lpmo.edu/~armati/solidOk.png">

Wire and Solid mode
<img src = "http://www.lpmo.edu/~armati/wireSolidOk.png">

but on some PC, the rendering bugs :
Solid mode
<img src = "http://www.lpmo.edu/~armati/solid.png">

Wire and Solid mode
<img src = "http://www.lpmo.edu/~armati/wireSolid.png">

What is the problem ? I do the same with linux and windows.
It seems depthBuffer is disabled !!!
How can i correct it ?

02-03-2003, 11:42 PM
Wire Mode:
Solid mode
Wire and Solid mode
but on some PC, the rendering bugs :
Solid mode
Wire and Solid mode

02-03-2003, 11:44 PM
Pictures doesnt work :-(

02-04-2003, 12:47 AM
Looks like Z-Fighting.

The systems that render "ok" mostlikly have an 24bit Z-Buffer while the systems that dont render "ok" are only using 16bits for the Z-Buffer.

Try adjusting the near and far clipplane to overcome the problem.

02-04-2003, 02:44 AM
Sould i modify the gluperspective() function ?

02-04-2003, 03:08 AM
Ok, thanks, it works, but when i set the near clipplan far, it cuts my object !
Before (without the ok) the near clipplan = 0.1, it was ugly, now it's 0.5, te render is better, but object are clipped ! what is the best value for the near plan ?

02-04-2003, 03:12 AM
A good value for the near plane is about 0.1% of the far plane. You can go down to 0.01% for a 24-bit depth buffer. Example; if the far plane is at 10, you can have the near at 0.01. If The far plane is at 10000, you can have the near at 10. It's not absolute values that matter, but relative values.

02-04-2003, 03:19 AM
the best value is equal to the nearest point in the view, and far value should be as near as the vertex most away from teh camera