Best placement of cubemaps to receive realistic reflection?

Bloodroke

L1: Registered
Jul 30, 2013
29
8
I have read a few tutorials over these last months about mapping necessities, do's and don'ts, but I am still confused on proper cubemap placement due to each article on them always saying something different on their proper placement.

Where would cubemaps best be placed? On the face of the reflective surface (for example, touching a reflective floor), or in the center of the room, floating?

The latter method seems to produce unrealistic reflections that do not match where the reflected detail actually is. I am thinking the first method would be better, but I just want other people's opinions first before I go ahead and change things.

On another note, steampipe "broke" cubemaps. Every map compiled now stores the default TF2 cubemaps, and even when buildcubemaps is run in the console, the cubemaps are never actually updated. I found an effective fix on Facepunch, and I would like to share it with everyone in the tutorials section, if it hasn't already been done. Would it be O.K. to do so?
 

Player1

L1: Registered
Aug 23, 2012
24
15
In general, have one cubemap in every room, near the center, 64ish units above the ground. In places with highly reflective surfaces, have them closer to the entrance(s). The game will automatically use the nearest cubemap when making reflections, so keep that in mind.

Also too much cubemaps will make reflections look better, it may cause performance drops, but it will definitely increase the map size. It's best to just have one in every room, and a few in large open areas.

This is a pretty good explanation : http://www.youtube.com/watch?v=haEnMYAL-ho

If you still want some more tips, look at one of valve's maps, and look at the placement in them
 

mint onion

L3: Member
Jul 18, 2013
101
45
for more generalized information about cubemaps, on the content creation side of things, this link may help you better solidify your understanding of what a cubemap is and can help you know where to place your env_cubemap entity.

the "env_cubemap" is the origin point used when generating a single cube map. it scans the environment around it to generate a cubemap texture. this texture is then referenced as the "environment map" for the surrounding actors that use reflections.

due to the limits of realtime technology, we need to be as cost efficient as we can for better performance.

normally, i would generate a cubemap using the object that uses it as the origin point. say there was a glass bowl placed on the center of a dinner table. i'd place the origin point on the bowl.

since it's just a bowl, using smaller texture dimensions would allow for more cubemaps in the rest of the level, without notable increase in the overall footprint. rather than using the default size, i'd want to generate a smaller sized texture.

however, if the table was filled with silverware, i'd use one big cubemap at the center of the cluster of actors, to generalize, or average all the different center points into one.

and say behind the wall was the kitchen. you wouldn't want the bright lights and ovens to reflect from your bowl in the center of the table, so instead, you'd use a second cubemap for the kitchen.

the reflections will not be 100% accurate. it is a necessary smoke and mirror technique. so long as there are not major artifacts, such as huge texture seams, pink checkers, or reflections from another room (func_doors do not influence cubemap renders) then a few units this way or that, won't make a huge difference.

On another note, steampipe "broke" cubemaps. Every map compiled now stores the default TF2 cubemaps, and even when buildcubemaps is run in the console, the cubemaps are never actually updated. I found an effective fix on Facepunch, and I would like to share it with everyone in the tutorials section, if it hasn't already been done. Would it be O.K. to do so?

definitely share useful tutorials and information. i think it would be best practice to credit your sources. it's gentlemanly and will save your ass if they were wrong.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
normally, i would generate a cubemap using the object that uses it as the origin point. say there was a glass bowl placed on the center of a dinner table. i'd place the origin point on the bowl.
The drawback to this is that it may very well end up taking pictures of the inside of the bowl. Sadly there is no way to tell it to hide a particular prop while building the cubemaps.
 

mint onion

L3: Member
Jul 18, 2013
101
45
stevethepocket makes a great point and is something we should consider when placing an env_cubemap. the same can be said for placing the entity too close to any solid surface, such as the wall or floor. (i think i read the limit was 16 units)

the big takeaway i'm trying to impart is that placing the env_cubemap at eye-level (64 units) won't necessarily generate the best results for world props, as it depends on the location of what is using the cube map.

i think it's worth repeating that this understanding is coming from a content creation perspective. take note, i'm new to level creation and the hammer tools.

i would assume the intention of placing the entity at eye-level is so that the speculars on the player's weapon model will look accurate as they run through an area.