Book Image

Source SDK Game Development Essentials

By : Brett Joseph Bernier
Book Image

Source SDK Game Development Essentials

By: Brett Joseph Bernier

Overview of this book

Table of Contents (18 chapters)
Source SDK Game Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Cubemaps


Cubemaps allow all the normal and bump-mapped materials in your maps to reflect light properly. They are also necessary for proper water rendering and making sure your weapons reflect the proper parts of the world. To see the effects of a cubemap in the best possible way, let's check out some before and after pictures in the following image:

In the before shot, the water looks pretty, and it is reflecting the wall. However, overall the wall looks flat and dark. Once a cubemap is placed into a map, you can immediately tell the difference. In the circle on the left, you can see the reflection of the sky in the wall. In the center circle, there is a reflection of a green light located behind the player. In the right circle, you can see the reflected upper wall and the refracted bottom wall beneath the water's surface.

Cubemaps are placed into the world with the env_cubemap entity. A good rule of thumb is to place one cube map in each room, one cubemap in each hallway, and to keep the...