Jump to content
  • Advertisement
Sign in to follow this  
Paprica

Local or infinite viewpoint within light models.

This topic is 2265 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

According to this: http://fly.cc.fer.hr/~unreal/theredbook/chapter06.html (@ Local or Infinite Viewpoint)

What's the view point?
The author claims that you can choose either a local viewpoint or a viewpoint that its distance is infinite.
Isn't it the exact same thing as choosing between a positional light or a directional light?
I'm confused... Please help me understand this subject.

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
The author claims that you can choose either a local viewpoint or a viewpoint that its distance is infinite.[/quote]
quoted from the article:
you can position them near the scene, as a desk lamp would be, or an infinite distance away, like the sun[/quote]
The term viewpoint means viewpoint. Nothing to do with graphics. Hes saying a light can be positional or directional. Positional lights effects in a given area around the light in all directions. The sun is infinitely away therefore its position does not matter because if the sun moved 3 feet in any direction, everything on earth would be lit the same. If you move a desk lamp 3 feet it will light the scene completely different. Edited by dpadam450

Share this post


Link to post
Share on other sites
Okay, so what does this

glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
have to do with all the information you've given?

Share this post


Link to post
Share on other sites
http://www.opengl.or...lLightModel.xml

Absolutely nothing. In fact I have never heard of that or used it. It is super super old and not used with shaders. It is only used for specular calculations it will either take a single vector (negative z-axis) or a vector from the eye to every pixel being rendered. Edited by dpadam450

Share this post


Link to post
Share on other sites
Thanks for the explanation.
Do you know if OpenGL's "red book" teaches shaders? I have no idea what they are...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!