Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

The Snake

lighting positioning

This topic is 5826 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 have a little problem. I know how to do all the lighting settings and stuff. But it''s hard for me te choose te exact values for all the parameters. This is my case: I have a dataset of points that builds up a 3d hollow pipe. all the generated triangles have a normal and I use glLightModelf( GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE ); for lighting both sides (in- and outside . This is my thought, please correct me if i''m wrong: - I need a DIRECTIONAL light for lighting the whole object, so under every single angle the object is lightened up. - I need a SPECULAR light for creating a spot light in de the center of screen and into the screen. This light should always be rotated to the opposite side of the rotation of the object. I just want my pipe, which is not smooth, to be correctly illuminated, so I can see all the shadows. As well as the inside as on the outside. Maybe somebody has a basic way for lighting, which always works correctly. Or is it maybe an idea to create six lights at each axis, negative and positive. Basically my question is: what is a proper way to lighten up an hollow object, so that you can see the relieved surfaces under all circumstances?

Share this post


Link to post
Share on other sites
Advertisement
can''t help u much but i know one thing for sure.

There are NO standard shadows in OpenGL (unfortunately).
Nehe''s code gives some examples i think but when u look at the opengl.org site there are more links.
Í''ve not implemented one yet but it''s hard i think.. (sorry folks.. i know the guru''s will disagree).
you have to use stenciling to get the shadow stuff working.
The "high-lightning" works directly in OpenGL though.

So if reality isn''t really an issue everythings alright.

b.t.w. i''ve seen a lib that implements an easy way to implement shadows.... but what''s easy.. it requires you to "register" all your object somehow and then it calculates the shads for you..... and thats making it better.

maybe you should also take a look at the redbook advanced examples... there are some shadows as well

3D as never seen before.. that is... it is still not to be seen ;-)

Share this post


Link to post
Share on other sites
I seriously recommend you don''t use two sided lighting. On a lot of hardware, it is significantly slower, or simply not supported..

as for light positioning, while I dind''t say anything specific, my reply to this might be of interest.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!