Cubemaps

Avatar
Lostprophetpunk
409 Posts
Posted Jul 13, 2011
Heya there,

I am just wondering about cubemaps. I am wondering what they are used for? As I have seen them mentioned around the forum, but I haven't got a clue what they are.

If anyone could help out, thanks in advance.

Advertisement
Registered users don’t see ads! Register now!
Avatar
morrock
23 Posts
Posted Jul 13, 2011
Replied 39 minutes later

Cubemaps are used to increase the speed of rendering reflections and specular reflection.When you compile the map, the nearby environment is projected onto the cube map. That projection is then used to simulate reflections and specular reflection without having to dynamically handle reflection in simple cases, which is graphically expensive. The downside is the reflection is taken from the cubemaps perspective, and not the player. This is why when placing cubemaps, it's best to place them close to the center of whatever reflective object will be using the cubemap, to minimize the offset.

For example, water in Portal 2 has dynamic reflections, but if a user sets their graphics settings low enough (or has slow enough hardware) the engine will use a cube map instead of real reflections. They are also used on surfaces which are reflective, but do not provide enough detail for the player to notice it as a fake reflection, such as shiny metals, or distant glass objects.

http://en.wikipedia.org/wiki/Cube_mapping

Avatar
Skotty
671 Posts
Posted Jul 13, 2011
Replied 1 hour later
So it just means: Cubemaps are important for reflections on nearly all textures. If there are no cubemaps in the map you will have bad looking white reflections.
Just create env_cubemaps at some places in the map, about 64 units above the floor. One per room should be enough.
If you got env_cubemaps you need to "build" their reflections still ingame. So if you compiled your map and started it, type into your console "buildcubemaps".
Avatar
morrock
23 Posts
Posted Jul 13, 2011
Replied 45 minutes later

Skotty wrote:
If you got env_cubemaps you need to "build" their reflections still ingame. So if you compiled your map and started it, type into your console "buildcubemaps".

Ah, I forgot the most important step. Thanks.

Skotty wrote:
If there are no cubemaps in the map you will have bad looking white reflections.

Actually with no, or bad cubemaps, you'll see the Valve default purple and black checkerboard texture. Sorry if I seem rude to correct you, but it's just a good thing to know in case you run into that nasty texture.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Hober
1,180 Posts
Posted Jul 13, 2011
Replied 27 minutes later

How the hell is this a thread?

http://developer.valvesoftware.com/wiki/Cubemaps

img