PDA

View Full Version : How to get sharp light/dark boundary on lit sphere?



MeanFox.com
10-24-2002, 10:23 PM
Hi,

I am using gluSphere with a purely diffuse lighting from far away. How can I make the light/dark boundary very sharp?

Increasing the sphere slices & stacks doesn't help.

Any help appreciated!

Mean Fox

nexusone
10-25-2002, 04:13 AM
Have you added normals?

example:

sphere = gluNewQuadric();
gluQuadricDrawStyle( sphere, GLU_FILL);
gluQuadricNormals( sphere, GLU_SMOOTH);
gluQuadricOrientation( sphere, GLU_OUTSIDE);
gluQuadricTexture( sphere, GL_TRUE); For texture mapping optional.

Also enable material settings?



Originally posted by Mean Fox:
Hi,

I am using gluSphere with a purely diffuse lighting from far away. How can I make the light/dark boundary very sharp?

Increasing the sphere slices & stacks doesn't help.

Any help appreciated!

Mean Fox



[This message has been edited by nexusone (edited 10-25-2002).]

MeanFox.com
10-25-2002, 10:58 AM
Yes, done all this.
Diffuse is (1, 1, 1), ambient is (0, 0, 0).

I want the sort of sharp boundary you see when you look at images of Earth... how to achieve that?

Mean Fox