How do I prevent jagged edges alongside the surfaces of my 3d model?

Posted by badcodenotreat on Stack Overflow See other posts from Stack Overflow or by badcodenotreat
Published on 2010-04-09T21:37:34Z Indexed on 2010/04/09 21:43 UTC
Read the original article Hit count: 366

Filed under:
|
|
|

Lets say I've implemented in openGL a crude model viewer with shading which renders a series of blocks, such that I have something that looks like this.

http://i.imgur.com/TsF7K.jpg

Whenever I rotate my model to the side, it causes an unwanted jagged effect along any surface with a steep viewing angle.

http://i.imgur.com/Bgl9o.jpg

I'm pretty sure this is due to the polygon offset I used to prevent z-fighting between the model and the wireframe, however I'm not able to find the factor/unit parameters in openGL which prevent this unwanted effect.

  1. what are the best values of factor and unit for glPolygonOffset to prevent this?

  2. would implementing anti-aliasing alleviate the problem? is the trade off in performance trivial/significant?

  3. is this perhaps a shading issue? should i try a solution along this line of thought?

© Stack Overflow or respective owner

Related posts about opengl

Related posts about graphics