Cubemaps (Source 2): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(moving page from draft.)
(No difference)

Revision as of 03:20, 4 February 2025

English (en)中文 (zh)Translate (Translate)
Env cubemap.png
An example of specular reflections on some models (exaggerated through r_showenvcubemap).

A cubemap is a texture that represents a three-dimensional rendering of an area. Source 2 Source 2 has env_cubemap and/or env_cubemap_box entities as sampling points to generate these textures, which are then integrated into the map file. Cubemaps in Source 2 are also parallax corrected if env_cubemap_box is used.

Todo: Document about env_cubemap_fog.

Preview

New in Source 2 Hammer. You can preview cubemaps by going to "Preview Baked Lighting" menu > Bake All Cubemaps. You can also use "Bake Selected Cubemaps" to preview the selected cubemaps.

Building cubemaps

Note.pngNote:If the option "Build cubemaps on load" is checked in Hammer Build Map dialog, as soon the game loads the map after it is compiled, the cubemaps will be automatically built, and the map will be automatically reloaded.
Command Description
map map_name Loads the map; replace "map_name" with the map's actual name
buildcubemaps Begins building cubemaps.
Note.pngNote:Source 2 does not support building cubemaps with number of iterations (e.g.: buildcubemaps 2). (Confirmed on Counter-Strike 2)