Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn OpenGL

You're reading from   Learn OpenGL Beginner's guide to 3D rendering and game development with OpenGL and C++

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781789340365
Length 208 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Frahaan Hussain Frahaan Hussain
Author Profile Icon Frahaan Hussain
Frahaan Hussain
Arrow right icon
View More author details
Toc

Lightmaps

Let's discuss lightmaps in this section. But first, let's try to understand what a lighting map is. Well, in the real world, if you have, let's say, a crate that is partly metal and partly wood, similar to the following screenshot:

The wooden parts of it will react differently to the light compared to the metal parts. It might sound obvious, but OpenGL (or any other sort of 3D graphics API) doesn't have a concept of wood or metal or plastic, or anything else and as a result, we need to program that in. We need to use other techniques to help illustrate that visually as the wood should be less shiny than the metal parts of the crate. If you search on lighting maps, you'll get a bunch of information. You can create them in various tools. You can use Maya or Photoshop to create them. So, without further ado, let's get down to the coding...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime