Archived

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

mstein

glutSolidSphere holes at top . . .

Recommended Posts

mstein    122
I am using glutSolidSphere and have lighting enabled. My light is positioned on the negative z-axis, at (0,0,-3). Anyhow, not all of the sphere illuminates properly. The very top (well of the portion facing outward at(0,0,1) is a black circle. I assume this may have to do with the normals that glutSolidSphere uses, but since it makes its own normals I figured there is not much I could do . . . or is that not the problem. thanks

Share this post


Link to post
Share on other sites
63616C68h    122
Maybe you''re mistaking a "black top" for a darker shade of the sphere''s color. Does the sun spot happen to be on the direct opposite side of your light source?

Share this post


Link to post
Share on other sites
cowsarenotevil    3006
Perhaps the znear in your perspective is too low, and it''s accidentally culling the faces due to an error. Always try to keep znear above one, because even perfectly good code can produce weird artifacts on some coputers.

-~-The Cow of Darkness-~-

Share this post


Link to post
Share on other sites
mstein    122
the znear solution sounds like it may be the problem. The normals at the top of the sphere should be (0,0,1) which would be right in line with the light, so i doubt that the lights position is a problem. thanks much.

Share this post


Link to post
Share on other sites