• Advertisement

Archived

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

glutSolidSphere holes at top . . .

This topic is 5456 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

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
Advertisement
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
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
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

  • Advertisement