Cubemaps are Valve's way of making reflections.
Instead of raytracing or calculating them in real-time in some way, shiny objects get
their reflections from a picture stored in the map file itself.
The reflection pictures are taken when you enter the buildcubemaps command in the console,
so they won't change regardless of what happens around them during gameplay.
Objects and brushes get the reflections from the nearest cubemap from them by default,
though you can force them to get reflections from others.
BUILDING CUBEMAPS - HELP?
Once you have built the cubemaps for your map, it will record it onto the BSP file so
that anybody it's shared with will be able to see the reflections without having to build
them themselves.
Be sure to share the BSP that's in your CSGO maps folder as this is the only one that will
be updated.
If you recompile your map it needs to be built again.
HOW DO I TEST THE CUBEMAPS?
The short answer is: if it looks okay, it's okay.
The only time you should really be worrying is if your sniper is reflecting completely
the wrong surroundings, or if something seems to be glowing and you don't want it to.
I've noticed that CSGO has fewer reflective surfaces than say, CSS, so you may not even
run into many problems.
The main place you can find dodgy reflections is in the AWP scope, so it may help to run
about with this out.
The console command 'impulse 81' works in some games and gives you a beautiful shiny
cube to test the surroundings, though really I think the awp scope is more relevant for
real-world testing.
Particularly in maps with static props, like CSGO has.
WHERE SHOULD I PUT THEM IN GENERAL AND HOW MANY?
This really depends on your level.
The map I'm demonstrating them in is a worst case scenario with a lot of contrast.
Generally the placement doesn't have to be too precise.
I would say to add one in the middle of each room or 'area' of your level, generally 64
units off the floor, since this is head-height for players and so it will reflect more closely
to what players would see in that part of the level.
Nothing terrible will happen by not doing this as it's very approximate any way.
Just be sure that they're at least 16 units away from solid objects, otherwise it will
mess up the reflection, as if it's taking a picture through whatever it's close to.
WHAT ARE THE EXCEPTIONS?
The exception is high contrast areas, where there's a dark place next to a very bright
one.
In this case, and if there are shiny floors, walls or ceilings, place the cubemap in the
darkest part of the room as less shiny reflections are a lot better than over-the-top reflections
like this here.
SNIPER SCOPES If the floors, walls and ceilings aren't shiny,
you only have to worry about scope reflections and the props in the room.
I would use common sense here and to see if it looks okay.
If you have a door way, make sure that you have a cubemap either side, an equal distance
away, as this will make the transition on the weapon model the moment the player steps
through the door.
WINDOWS For windows you can make a cubemap specifically
for them, since they tend to be in weird high up places and are quite shiny.
Place it about 32 units in front of the window and it should automatically pick it up.
WATER For distant water, or cheap textures, Source
uses a cubemap to determine the water's reflections.
Place the cubemap above the surface of the water and it should take care of the rest
itself.
Using a water_lod entity will let you adjust the distance that proper reflections should
be replaced with these cheap ones ASSIGNING CUBEMAPS TO SURFACES
Say you want something in a dark place to be shiny, or if a texture just isn't reflecting
a near-by cubemap that you want it to.
You double-click on the cubemap, select 'brush faces...' then choose the faces that should
use that cubemap for their reflections.
This lets you do interesting things.
You could assign a cubemap in a bright place to something that you want to look as though
it's glowing in a dark part of the level, or if your level benefits from an Unreal-style
glow to everything.
WHAT'S STOPPING ME FROM PUTTING THEM EVERYWHERE?
I'm pleased you asked, as I really wanted an excuse to do THIS.
Each bit of ground is cut up and gets their reflections from the cubemap directly above
/ below it.
As a result the reflections look really pretty, and light isn't shown going through walls
or anything.
The downside is that a 550 kb map is now over 20 mb, and it's only a very small map.
It also takes ages to compile the reflections and makes the design of the map generally
messy which has several knock-on effects.
In short, don't do this because there are a lot more useful and efficient ways of making
a map look good without resorting to brute-force tactics such as this one.
BUT I WANT IT TO BE PRETTY!!!
Me to!
I went back to the original version of the map and with 5 carefully placed cubemaps managed
these results.
Granted, they're not as precise, but the map was only 600 kb in size and seriously, what
do you expect from me?!
In practice it's not normally too obvious since there's loads of rubbish all over the
map disguising the seams and people are normally too busy shooting each other and generally
playing the game to notice something like this.
CSGO's de_dust 2 has some bad transitions, but we can all forgive it for that.
WHERE I PUT THEM In the open court-yard I put it closer to
the floor.
This way it reflects less of the sky since surrounding it are towering walls.
This helps when you're doing this, since the walls now block the reflections when you're
at a shallow angle like this.
For the dark areas inside and the transitional places I would put the cubemaps in the darkest
part of that area, away from any light sources.
You could argue that this limits the effectiveness of shiny surfaces, but I'd argue that it's
better than two alternatives: ridiculously bright reflections, or none at all.
ADJUSTING THE SIZE OF THE CUBEMAP I recall being able to adjust the detail of
the cubemap by adjusting this value, though it doesn't seem to do anything in CSGO.
In fact, I'd advise against it as it has caused my buildcubemaps command to crash the game.
CONCLUSION The number of words, length of this video
and general tone may make you think that cubemaps are complicated, but they're really not.
Just place them in your level, and if they don't work, see if anything mentioned in this
video can help.
Have fun.