Jagged lines giving me a headache

Started by
3 comments, last by Bankie 22 years ago
Sigh. I''m a bit of a beginner on this OpenGL lark, but I reckon I''m doing okay apart from a little problem with jagged lines. I''m doing a remake of an old futuristic sports game called Xeno, and around the ice rink I have several advertising boards. The ones which are perpendicular look fine from any angle, but the ones at other angles look awful on the bottom edges - these show as wavy lines. To help you understand take a look at http://www.bankie.com/xeno.html All the boards are sitting on the ice, and I''ve tried moving them up off the ice slightly, but they still look crap. The players and the ball don''t look too good on their undersides either. Urrrgh.
Advertisement
Do the boards still look bad when drawn with nothing behind them (from the camera''s viewpoint)? Try drawing just the boards on their own, clearing the buffer with a sensible colour so you can see the boards. If they are still jagged, it looks like you''re suffering from the infamous "Z-fighting" problem.
When I take the ice away, the boards look fine and dandy, but peculiarly, the undersides of my MD2 models are still wavy. The player MD2 models are simple cylinders for now and the ball is ummm... a ball. There''s nothing too complex in there yet. If my problem is a Z-buffery thingy, can someone point me in the right direction? In case it''s relevant, I''ve been modifying the simpengine from the OpenGL Game Programming book.
Well, it does sound like a z-buffer problem to me. That said, I''ve never had that problem before, so I might be wrong.

Basically the solution is to move the "near plane" as far away as you can, and bring the "far plane" as close as you can (without chopping the far end off your level).

I''m rubbish at describing how things like z buffers work, so I''ll defer the responsability to good old google . If you search for "z buffer flimmering" you get some good links that explain the problem and how to solve it.

Thanks. I''ve managed to find a fair whack of stuff on the web now that I know the techie term, and it looks like you''re right. Cheers.

This topic is closed to new replies.

Advertisement