lighting positioning
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?
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 ;-)
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 ;-)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement