Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Bankie

Jagged lines giving me a headache

This topic is 5940 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!