PDA

View Full Version : Rendering Problem !



encom
02-04-2003, 12:38 AM
Hi,

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 ?

encom
02-04-2003, 12:42 AM
Wire Mode:
http://www.lpmo.edu/~armati/wire.png
Solid mode
http://www.lpmo.edu/~armati/solidOk.png
Wire and Solid mode
http://www.lpmo.edu/~armati/wireSolidOk.png
but on some PC, the rendering bugs :
Solid mode
http://www.lpmo.edu/~armati/solid.png
Wire and Solid mode
http://www.lpmo.edu/~armati/wireSolid.png

encom
02-04-2003, 12:44 AM
Pictures doesnt work :-(

HS
02-04-2003, 01: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.

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

encom
02-04-2003, 04: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 ?

Bob
02-04-2003, 04: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.

Mazy
02-04-2003, 04: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