Jump to content
  • Advertisement
Sign in to follow this  

Problem about Quadric Sphere normals

This topic is 3476 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 use display lists and gluSphere to draw a human body which is loaded from a bvh file. Because bvh is a hierarchy format, the drawing code is written as a recursive function. Anyway, the code of drawing a bone looks like as follows:
glRotated(t, localOffset[2], 0, -localOffset[0]);
i = bodypart->GetID();

And the code of setup display lists is as follows:
glNewList(list, GL_COMPILE);
glScaled(width, length / 2, width);
glTranslatef(0, 1, 0);
gluSphere(mQuadricObj, 1, 10, 10);

Then here is the result: As you can see, the body is composed of many spheres. But the problem is, normals of some spheres are correct, while otheres are wrong. Ex. Each limb is dark. Any idea about what the problem is would be appreciate. ps. The white ball represents the light source.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!