Ogre 3D 1.7 Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Chapter 3. Camera, Light, and Shadow

We already learned how to create a complex scene, but without light and shadow, a scene won't be complete.

In this chapter, we will learn about:

  • The types of different light sources Ogre 3D supports and how they work
  • Adding shadows to a scene and the different shadow techniques available
  • What a camera and viewport are and why we need to have them

Creating a plane

Before we can add lights to our scene, we first need to add a plane, onto which shadows and light are projected, and therefore visible to us. A normal application wouldn't need a plane because there would be a terrain or a floor to project light onto. Light calculation would work without the plane, but we wouldn't be able to see the effect of the light.