• Advertisement
Sign in to follow this  

Problem about Quadric Sphere normals

This topic is 3353 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:
glPushMatrix();
glRotated(t, localOffset[2], 0, -localOffset[0]);
mBoneMat.apply();
i = bodypart->GetID();
glCallList(mLists);
glPopMatrix();

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);
glEndList();

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
Advertisement
Sign in to follow this  

  • Advertisement