Cand generate cubemaps!

  • If you're asking a question make sure to set the thread type to be a question!

Lonely Author

L2: Junior Member
Aug 27, 2021
87
42
So, anytime I compile a map with the cubemap entity or not, it won't generate a cubemap.

In my compile log it says that it can't generate due to lack of a file, and it's been that way since before I downloaded custom content.

is there a fix?
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
The message in the compile log about the skybox always appears regardless. Most people say it's okay to ignore it. You can tell if your map has cubemaps by loading it and pulling out something like the sniper rifle or Scout's Wrap Assassin or jar of milky bread, and see if its shiny bits reflect the map.
You can also open the BSP up using GCFScape or 7-Zip and look in the materials/maps/<mapname> dir for some VTFs.
 

Lonely Author

L2: Junior Member
Aug 27, 2021
87
42
The message in the compile log about the skybox always appears regardless. Most people say it's okay to ignore it. You can tell if your map has cubemaps by loading it and pulling out something like the sniper rifle or Scout's Wrap Assassin or jar of milky bread, and see if its shiny bits reflect the map.

I used the MvM museum case for something and it's reflecting feels just a bit out of place(Hence why this thread exists). and when I place a cubemap entity, anything reflected reflects the black and purple texture
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Some materials built into the game do not use the map's cubemaps for reflections, and instead use a custom cubemap. To my mind all Australium weapons do this, and some of the MvM museum props.

If a map file does not contain any cubemap VTFs, but it does contain env_cubemap entities, then the game will either use the default Half-Life 2 sunset cubemap, or sometimes reflect the black and purple checkerboard pattern. In my experience, players with integrated graphics chips tend to experience the latter.

So with this in mind it seems that cubemaps are not being built for your map.

It's important to note that the cubemap building process takes place in the game, and is not a part of the compile process involving VBSP, VVIS and VRAD. If you have followed the steps of the linked guide, but you still do not see proper reflections, then there must be something causing the build process to fail. The game's console may indicate the problem. You should check the contents of the BSP to see if it contains cubemap VTFs.

Are you by any chance using Pakrat to pack custom content into the map prior to building cubemaps?
 

Lonely Author

L2: Junior Member
Aug 27, 2021
87
42
No, the map is not being packed, and when I use the generate cubemaps command in-game it gives the same error as the one in my copile log

When I searched for the specified missing file, it does not exist where it claims it to be
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Would you please enable developer 1 in console, attempt to build cubemaps again and copy and paste the console text here?

I would be happy to try and build cubemaps in your map myself to see if I get the same issue.
 

Lonely Author

L2: Junior Member
Aug 27, 2021
87
42
Would you please enable developer 1 in console, attempt to build cubemaps again and copy and paste the console text here?

I would be happy to try and build cubemaps in your map myself to see if I get the same issue.

I'll give that a run tonight!

due to scheduling however, I won't be available for around 2-3 days sadly
 

Lonely Author

L2: Junior Member
Aug 27, 2021
87
42
These are the results:
Queued Material System: DISABLED!
R_RedownloadAllLightmaps took 39.703 msec!
Can't load skybox file sky_tf2_04 to build the default cubemap!
Wrote ZIP buffer, estimated size 1882, actual size 1400
R_RedownloadAllLightmaps took 24.532 msec!
Queued Material System: ENABLED!

The thing I'm trying to fix(Picture taken after respectively)
(Also ignore the text in the top corner-tf2 hasn't been online in a while)
20220121164449_1.jpg
 

Cyberen

L3: Member
Mar 30, 2021
143
30
sky_tf2_04 is a skybox with different-sized sides, which is why the error occurs. Try a custom one with same-sized textures.
 

iiboharz

eternally tired
aa
Nov 5, 2014
857
1,291
These are the results:
Queued Material System: DISABLED!
R_RedownloadAllLightmaps took 39.703 msec!
Can't load skybox file sky_tf2_04 to build the default cubemap!
Wrote ZIP buffer, estimated size 1882, actual size 1400
R_RedownloadAllLightmaps took 24.532 msec!
Queued Material System: ENABLED!

The thing I'm trying to fix(Picture taken after respectively)
(Also ignore the text in the top corner-tf2 hasn't been online in a while)
20220121164449_1.jpg
This error can be ignored. Have you actually tried running the buildcubemap command in the console? (See this article for details)
 

iiboharz

eternally tired
aa
Nov 5, 2014
857
1,291
Like I said, the error can be ignored. The skybox you use has no effect on your cubemaps. As long as you have cubemap entities in the level and are building them correctly yourself there should be no problems.