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:

Cubemaps

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 cubemaps about 64 units off the ground (that is, the eye level). Cubemaps also need to be at least 16 units away from any brushes and can also be put in differing areas of color or brightness.

Cubemaps

Larger rooms or open areas should have multiple cubemaps. Once the cubemaps are placed in the map, you need to run the buildcubemaps console command while in-game to calculate all the reflections. After sending the command, you will see your screen flash with the views of each cubemap. Once this is complete, the map will restart and you will see all your changes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.176.80