In this video we study two methods to light a terrain - the standard Diffuse Lighting and the novell technique of Slope Lighting.
This video is based on "Focus on 3D Terrain Programming" by Trenk Polack: https://www.amazon.com/Focus-Terrain-Programming-Game-Development/dp/1592000282.
Slope Lighting is based on an article by Charlie Van Noland: https://archive.gamedev.net/archive/reference/articles/article1436.html
More info on diffuse lighting: https://youtu.be/e-lnyzN2wrM
More info on loading models using Assimp: https://youtu.be/sP_kiODC25Q
Timecodes:
0:00 Intro
0:52 Diffuse Lighting
2:03 Normal vector calculation
7:31 Slope Lighting
9:04 Improving Slope Lighting
14:14 Slope Lighting problems
15:58 Conclusion
Make sure to watch all the previous tutorials in the 'Terrain Rendering' playlist at https://www.youtube.com/playlist?list=PLA0dXqQjCx0S9qG5dWLsheiCJV-_eLUM0
Please visit https://ogldev.org to see more of my tutorials on modern OpenGL.
Link to source: https://github.com/emeiri/ogldev/blob/master/Terrain5
OpenGL 4.6 specification: https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf
Feel free to comment below.
Email: ogldev1@gmail.com
Instagram: @ogldev1
Github: https://github.com/emeiri/ogldev.git
Twitter: @ogldev
One time donations (Paypal): https://ogldev.org/donate.html
Patreon: https://www.patreon.com/ogldev
Credits:
* Music: "Elevate" by https://bensound.com
* 'Right hand rule' image: https://en.wikipedia.org/wiki/Right-hand_rule#/media/File:Right_hand_rule_cross_product.svg
Enjoy,
Etay Meiri
#opengl #ogldev #opengtutorials