Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

How can I do lighting properly?

4: Adsense

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   

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 )

#2 Scootr7481   Members   

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.