PDA

View Full Version : Want a small Gouraud Shading Demo?



BruceBen
11-12-2001, 06:56 PM
Hello friends, i was trying to sovle the smooth graphics problem. I know i should use average normal for each vertex when drawing triangles. Who can kindly send me a demo program which demostrate this problem? Say, to draw a cube or pyramid, some simple model. Thanks a lot. pxiaobo@hotmail.com

11-13-2001, 05:57 AM
Try one of the tutorials from nehe.gamedev.net, they are quite good and there is one tutorial (Lesson 3) which demonstrates how to colour using glShadeModel(GL_SMOOTH) as opposed to GL_FLAT, for goraud (who came up with the name for that? I can't even spell it, let alone say it) shading.

Is what I think your after from your post.
Hope it helps.

Kilam Malik
11-13-2001, 06:52 AM
Gouraud shading was invented by Henri Gouraud. Thats his paper:

Gouraud, H., “Continuous Shading of Curved Surfaces”, IEEE Transactions on Computers, C-20(6), pp. 623-629


If you are interested in the history of computer graphics:

http://www.geocities.com/CollegePark/5323/history.htm

BruceBen
11-13-2001, 06:52 AM
Thanks. But that's not what I want. This demo is just using diferent colors for each vertex. It has nothing to do with the normals. What I want is even using one color for a model you can still have the smooth effect on the edge.