source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Cubemaps not working in Source

Open somerandompiggo opened this issue 6 years ago • 2 comments

Ok, so i know there are a million other posts regarding this issue but, i have read literally all of them and have never got it working. ONCE... I tried different engine versions, i tried building cubemaps in gmod, nothing has worked so far, pls help.

somerandompiggo avatar May 04 '19 19:05 somerandompiggo

This does work I have used many time's on my level's. The problem is a default black vtf valve has added to calm down some reflections before cubemaps are built, would be nice to opt out, anyway here is the info:

Cubemaps after SteamPipe Update

Due to the SteamPipe update, a recognised problem might be building the cubemaps with no effective results. According to a thread, this problem can be fixed by following those steps: Bug: <Counter-Strike: Global Offensive> In Counter-Strike Global Offensive, editing your map file directly like this can have adverse side effects including node graph glitches and losing static_prop shadow data.This method can prevent that.

Place env_cubemap entities in valid locations in your map, and compile. Important: Name has to shorter than 30 characters (including the .bsp extension), or the .bsp won't be writeable! Also, don't change the map name after compilling, or the cubemaps won't work!
Use your favorite .bsp pakfile editor (For example, VIDE or Pakrat. Usage of these tools isn't included in this tutorial.), and load your .bsp.
Delete all files that are a "Texture" or "Texture (HDR) type. (Not "Material" files, only the .vtf's!)
Save the edited .bsp.
Copy your map back to your game's maps folder.
Open console and type: "map -mapname-". (In my case, "ttt_mars_colony_cubemap".)
Once you're ingame, open the console again and type this: "mat_specular 0" and "buildcubemaps".
Wait until the cubemaps are built, and then re-enable specular mapping with "mat_specular 1" and reload your materials with "mat_reloadallmaterials".

I do a full restart (close game and restart) when done.

Note:If you want to pack custom content with your map, do it after building cubemaps.

1157 avatar May 07 '19 17:05 1157

It would be good if you could build cubemaps to a separate file so you could pack them later, Ill try your advice too :D

On Tue, 7 May 2019 at 19:00, 1157 [email protected] wrote:

This does work I have used many time's on my level's. The problem is a default black vtf valve has added to calm down some reflections before cubemaps are built, would be nice to opt out, anyway here is the info:

Cubemaps after SteamPipe Update

Due to the SteamPipe update, a recognised problem might be building the cubemaps with no effective results. According to a thread, this problem can be fixed by following those steps: Bug: <Counter-Strike: Global Offensive> In Counter-Strike Global Offensive, editing your map file directly like this can have adverse side effects including node graph glitches and losing static_prop shadow data.This method can prevent that.

Place env_cubemap entities in valid locations in your map, and compile. Important: Name has to shorter than 30 characters (including the .bsp extension), or the .bsp won't be writeable! Also, don't change the map name after compilling, or the cubemaps won't work! Use your favorite .bsp pakfile editor (For example, VIDE or Pakrat. Usage of these tools isn't included in this tutorial.), and load your .bsp. Delete all files that are a "Texture" or "Texture (HDR) type. (Not "Material" files, only the .vtf's!) Save the edited .bsp. Copy your map back to your game's maps folder. Open console and type: "map -mapname-". (In my case, "ttt_mars_colony_cubemap".) Once you're ingame, open the console again and type this: "mat_specular 0" and "buildcubemaps". Wait until the cubemaps are built, and then re-enable specular mapping with "mat_specular 1" and reload your materials with "mat_reloadallmaterials".

I do a full restart (close game and restart) when done.

Note:If you want to pack custom content with your map, do it after building cubemaps.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/source-sdk-2013/issues/473#issuecomment-490185692, or mute the thread https://github.com/notifications/unsubscribe-auth/AKZTNYIMNFX3AOIL2BOX5N3PUG7SVANCNFSM4HKZSUJQ .

somerandompiggo avatar May 07 '19 19:05 somerandompiggo