My new work demanded me to have knowledge of lighting in openGL. I set forth for it. I understood that there are mainly 3 types of lighting sources used while rendering any graphics scene.
They are
1.Ambient lightsource (This is coming from all directions equally)
2.Directional light source (This one is fixed in space and as we move object / view it moves along. It shines fixed portion of the object all the time.)
3.Observer light source (This one is coming from the direction of viewer. So no matter how y twiddle the object its always going to light the portion facing you).
SO I played around all 3. I used directional light source and changed its position by rotation the source angle in each iteration and rendered the screen. It gives nice effect. Here I am attaching snapshot of it.
They are
1.Ambient lightsource (This is coming from all directions equally)
2.Directional light source (This one is fixed in space and as we move object / view it moves along. It shines fixed portion of the object all the time.)
3.Observer light source (This one is coming from the direction of viewer. So no matter how y twiddle the object its always going to light the portion facing you).
SO I played around all 3. I used directional light source and changed its position by rotation the source angle in each iteration and rendered the screen. It gives nice effect. Here I am attaching snapshot of it.
No comments:
Post a Comment