Jump to content

  • Log In with Google      Sign In   
  • Create Account

How can I do lighting properly?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Whim   Members   -  Reputation: 122

Like
Likes
Like

Posted 02 April 2000 - 04:49 PM

Wow! Im glad i found NeHe''s site and forum. Lots of helpful stuff appears here. Recently, I started a small GL app (using GLUT, not the windows API), and was frustrated to find that despite following (to my knowledge) the red book and other working examples, I cannot seem to get a large grey slab to be lit properly (I''m aiming for a "table" look). When I sent it to my friend, he said it worked fine, though ... and the odd thing is that we have the same video card. I''ve tried using two different drivers for my voodoo3 (the ones from teh 3dfx site, and then also the older ones from GLSetup), and the block still appears to be solid shaded, in that I cannot see any edges that are internal to the silhouette. Can anyone suggest what I might do to remedy this situation, or more accurately diagnose the problem? Thanks in advance o.O (Confused programmer )

Sponsor:

#2 Scootr7481   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 April 2000 - 08:54 PM

I wanted to suggest three things. First off, are you sure you set the shade model to smooth or gourad? If it''s set to flat (default) then the anomaly you''re experiencing is supposed to happen. Second, you should try winding techniques. By default, the front of a polygon is facing you (or out) if you set the vertices in a counter-clockwise motion. If you made them all in a clockwise motion, you can change that by setting the gl command for culling to GL_CW instead of GL_CCW (default for counter-clockwise). And Last, you should calculate normals for your ploygons, that is how to make sure OpenGL nkows how to handle lighting from the 90 degree angle of the polygon face.

-- John d8?)

"No, really, I DO know it all!" <-- Yeah, Right!!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS