Game Development Reference
In-Depth Information
Chapter
12
Lighting, Camera, and Material Effects in
Scene Kit
In the previous chapter, you gained an understanding of how Scene Kit uses the scene
graph to render the objects for the user. You also now have an Xcode project that is just
waiting to have more done to it.
In this chapter, you will explore how the lighting of a scene works and the different type of
lights that are available in Scene Kit. Along with the lighting, you will learn about how the
object's material plays an important role in how the object is lit up and displayed to your
user. After you have the object lit up and looking nice, you will see how the camera, in oth-
er words, the point of view, can be controlled to give the user a new perspective of the
scene.
Lighting Up the Scene
Ask any director or photographer, and one of the most important items to a scene is light-
ing. You are in luck because Scene Kit provides several types of lighting that you can ma-
nipulate to make your scene pop.
In Scene Kit, you will use the SCNLight object to create a light source in your scene. You
will set the light type to one of four different light types provided to you from Scene Kit.
SCNLightTypeAmbient : This light will illuminate your scene from all
directions; the light's position or direction has no effect on the lighting of the
scene.
Search WWH ::




Custom Search