Lighting up the world
Once we add the import statement, we'll notice the world is somewhat dark; it may be hard to see the box and plane we added. To light things up, we'll add both an AmbientLight and a DirectionalLight (sun or moon light) to the image. We're going a little unreal in this app as we've got an obviously night time image background, but our objects will be lit. Adding an AmbientLight as well as a DirectionalLight is an easy way to fake the natural world. In the real world, objects take on light from light reflected off of objects near them. An AmbientLight can simulate this gentle glow (this is often referred to as global illumination on other rendering systems). The direction light simulates either overhead room lighting (many ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access