PDA

View Full Version : blinking objects because of overlap



zerodot
03-06-2002, 07:52 PM
is there any way to get rid of that blinking OpenGL does when objects move over top of eachother? it seems to not be able to decide which plane to display, so it just blinks them on and off. could this just be my video card? (voodoo 4500)

I have a bunch of random objects, and trying to figure out how to make them not collide, while still being random, is something I'd like to avoid.

thanks in advance

blood.angel
03-06-2002, 10:00 PM
Hi.
I dont know how to solve it but its called z fighting. Do a search on this on these forums and you may find a solution.

chowe6685
03-07-2002, 07:45 AM
bump out the near plane, or move in the far plane when you set up the perspective matrix

seu
03-07-2002, 08:38 AM
Originally posted by zerodot:
is there any way to get rid of that blinking OpenGL does when objects move over top of eachother? it seems to not be able to decide which plane to display, so it just blinks them on and off. could this just be my video card? (voodoo 4500)

I have a bunch of random objects, and trying to figure out how to make them not collide, while still being random, is something I'd like to avoid.

thanks in advance

As others said, what you're having is objects "Z-fight". If two objects are exactly at the same distance from de camera, probably it's unsolvable. Try offsetting a little one object from the other.
If there's a difference in distance but you still see artifacts, try increasing the zNear value you're using. eg. if you know your nearest object (to the cam) is at 20 units, you can use 10 as the zNear, and it will probably solve it.