Texture Problem

Fruity Snacks

Creator of blackholes & memes. Destroyer of forums
aa
Sep 5, 2010
6,394
5,571
You don't really turn off reflections, its a reflective texture.

To get rid of that ingame, you need to do 2 things, you need to add an env_cubemap entity. This creates pictures of the area surrounding them, and will project said images onto the appropriate surfaces. Its good to put them at 64units above the ground of whatever area you are in, and to put them roughly in each individual room.

To build cubemaps you need to type the following commands, ingame into the developer console.

mat_specular 0
buildcubemaps
mat_specular 1
disconnect
sv_cheats 1
mat_reloadallmaterials
map ________

where _____ is the file name of your map (ie, ctf_stuntguy)
 

Fruity Snacks

Creator of blackholes & memes. Destroyer of forums
aa
Sep 5, 2010
6,394
5,571
You don't really turn off reflections, its a reflective texture.

To get rid of that ingame, you need to do 2 things, you need to add an env_cubemap entity. This creates pictures of the area surrounding them, and will project said images onto the appropriate surfaces. Its good to put them at 64units above the ground of whatever area you are in, and to put them roughly in each individual room.

To build cubemaps you need to type the following commands, ingame into the developer console.

mat_specular 0
buildcubemaps
mat_specular 1
disconnect
sv_cheats 1
mat_reloadallmaterials
map ________

where _____ is the file name of your map (ie, ctf_stuntguy)
 

stuntguy3000

L1: Registered
Jul 18, 2011
8
0
You don't really turn off reflections, its a reflective texture.

To get rid of that ingame, you need to do 2 things, you need to add an env_cubemap entity. This creates pictures of the area surrounding them, and will project said images onto the appropriate surfaces. Its good to put them at 64units above the ground of whatever area you are in, and to put them roughly in each individual room.

To build cubemaps you need to type the following commands, ingame into the developer console.

mat_specular 0
buildcubemaps
mat_specular 1
disconnect
sv_cheats 1
mat_reloadallmaterials
map ________

where _____ is the file name of your map (ie, ctf_stuntguy)

I am really new to this.

I am a bit confused... So i place the env_cubemap and type those things into the dev console?

With the env_cubemap do i place it in each room or once only?

I just am new to this and i am confused a bit.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
Cubemaps are like scaled down cameras used to draw reflections, so any reflective object will reflect whatever the nearest cubemap entity is "looking at". This means you'll want at least one in every room, otherwise you'll have objects and textures reflecting the contents of a different room. This can be especially jarring if the rooms have different themes.

I would recommend for any long, winding tunnel system to have a cubemap entity for each section. If it has two 90-degree bends in it, for example, it would need three cubemaps. Technically, since a tunnel made of air ducts is the same texture on all four sides, you can probably get away with just one in the middle somewhere in this case; it's up to you.
 
Last edited:

clayton

L1: Registered
Jun 17, 2011
44
23
while i'm working on a map i tend to place a single env_cubemap in the centre of the map (it doesn't matter how high for now, just drop it on the ground). compile the map, load it up. when you're in the map, open the console and type the commands in the exact order fr0Z3n lists. when the map reloads you won't see those reflective checkerboards (both on textures in the map, like on glass and metallic stuff, or tile floors, nor on weapons like the sniper rifle, or demoman bottle).

one other thing, you must be running at minimum 800x600 resolution to build cubemaps.

[edit: one last thing, if you see this: "Error: Skybox vtf files for skybox weren't compiled with the same size texture and/or same flags! Can't load skybox file skybox to build the default cubemap!" ignore it :) ]
 
Last edited:

stuntguy3000

L1: Registered
Jul 18, 2011
8
0
while i'm working on a map i tend to place a single env_cubemap in the centre of the map (it doesn't matter how high for now, just drop it on the ground). compile the map, load it up. when you're in the map, open the console and type the commands in the exact order fr0Z3n lists. when the map reloads you won't see those reflective checkerboards (both on textures in the map, like on glass and metallic stuff, or tile floors, nor on weapons like the sniper rifle, or demoman bottle).

one other thing, you must be running at minimum 800x600 resolution to build cubemaps.

[edit: one last thing, if you see this: "Error: Skybox vtf files for skybox weren't compiled with the same size texture and/or same flags! Can't load skybox file skybox to build the default cubemap!" ignore it :) ]

So this will replace a pink-black checked reflection I see on my weapons and with that error message I see that message and ignore it.

Thanks alot for the help and all.

PS With those commands why do I have to run them?
 

English Mobster

L6: Sharp Member
Jul 10, 2011
355
299
You have to run the commands just because of the way TF2 works; the maps in the game don't come with a default cubemap like most other Source games, so you just need to do it manually.
mat_specular 0:
This disables your reflections, so the game can then edit them.
buildcubemaps:
This looks at each individual env_cubemap you have on your map, then captures the appropriate images to build your reflections.
mat_specular 1
This turns reflections back on. You may still see the checkerboard, however, and to fix that, we need to reload the game.
disconnect
Disconnects.
sv_cheats 1
Turns on cheats; they are required to execute the next command.
mat_reloadallmaterials
Redoes all your lightmaps, with the new reflections. This will get rid of those checkerboards!
map *mapname*
Reload your map.

Keep in mind, this has to be done with each compile, so it's best just to use it when making a build for public release or taking screenshots/video, so as to save yourself time and headache. You can do everything normally without this, you just get those checkerboards.