PDA

View Full Version : Lighting problem, jaggy looking edges



grady
11-28-2001, 02:02 AM
http://members.home.net/gradyfield/jaggys.gif

When I look at the sphere from certain angles I see the edges of the polygons showing like in the first panel. But other view points aren't so ugly, does anyone recognize what this problem is?

styx
11-28-2001, 03:04 AM
maybe I know what the problem is, but could you give me alink to a more recognizable screenshot ? dark blue on black is not very good.

--styx

grady
11-28-2001, 03:46 AM
Ok http://members.home.net/gradyfield/jaggys2.gif

styx
11-28-2001, 04:48 AM
hmm, that looks really weird.
I had such a problem with specular highlights, because opengl can not render hightlights on areas but only along edges so highlights often look like this (except you make the highlight less intensive or use *masses* of polys)
are you sure your material properties are setup correctly, reflectance etc... ?
did you give the material a specular color or only ambient/diffuse ?

--styx

JML
11-28-2001, 05:36 AM
Grady,

This may be caused by the way the highlights are calculated by OpenGL. The normals of the vertices are used to determine if the light shines on a vertex or not, and if so, how intense the highlight is.
From the sreenshot it looks like the jaggies appear for those quads/triangles of the sphere where the normals of the lower vertices are at an angle > 90 degrees with the vertex-to-lightsource vector.
That means that those vertices do not receive any light --> black

Also, are you sure the sphere is not clipped by the near plane?

HTH

Jean-Marc.