"Out of Memory or address space" error when building cubemaps

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
I hate to keep bringing this up but I'm still having this issue.

I've copied the map to a new vmf file. I've rebuilt all the displacements. I've changed their power to 2,3 and 4. Neither power worked. I've even tried using different materials for the displacements, including dev textures.

I've got the "make_triangles:calc_triangle_representation: Cannot convert" down from 8 instances to just 3.

So here's an update on other things I've tried.

While looking for other potential solutions, I found that BspZip has a '-deletecubemaps' command, which you should run between VRAD and the 'copy file' command. (VBSP > VVIS> VRAD> BspZip (-deletecubemaps) > Copy File > Run TF2) I gave it a try anyway and to not much surprise, it found no cubemaps to delete.

I wondered if the issue was due to the amount of custom content I am packing into the map. Usually I use BspZip to pack the content immediately after VRAD has finished, but this time I compiled the map without packing the content. This time I COULD build cubemaps without it crashing!

I then attempted to repack the custom content via BspZip and reloaded the map, but was greeted with the
"Material <material> does not support vertex format used by the mesh" error from before. Regardless I closed out of the map and attempted to repack it via the 'bsp_repack' command, where surprise surprise, TF2 crashed with the same "Out of Memory" error.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
Just to follow up, the map without any custom content packed in rocks up at 307mb, and the fully packed map is 807mb.

I'm going to downsize it.

EDIT: I've got the unpacked map down to 155mb, and the packed map down to 626mb. I had a few props with extra lighting detail added that I removed, and cut out a few unneeded props.
 
Last edited:

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
Just to follow up, the map without any custom content packed in rocks up at 307mb, and the fully packed map is 807mb.

I'm going to downsize it.

EDIT: I've got the unpacked map down to 155mb, and the packed map down to 626mb. I had a few props with extra lighting detail added that I removed, and cut out a few unneeded props.

626MB is really overkill for a map, I'm surprised that much can even be packed
 

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
It's actually only 471mb (626mb - 155mb) being packed in, but that is still a surprisingly large number

Try using CompilePal's PACK feature (also you should use it anyway as its far more convenient), I'm pretty sure BSPZIP does not like the massive file size
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
Try using CompilePal's PACK feature (also you should use it anyway as its far more convenient), I'm pretty sure BSPZIP does not like the massive file size
CompilePal uses the same compilers as the stock Hammer editor, including BspZip. And the fact I've been packing 471mb of content shows it does handle large file sizes.
 

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
CompilePal uses the same compilers as the stock Hammer editor, including BspZip. And the fact I've been packing 471mb of content shows it does handle large file sizes.

I thought CompilePal had its own packer as it didn't pack certain files in some releases. Anyway, even though it might handle the large file size, the cubemap embedder ingame will not.

One alternative you could try is bake the cubemaps on your map, extract them and pack them into a duplicate BSP with packed content and no cubemaps
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
So I can compile the map, build the cubemaps in and use BspZip to pack all the content in. I can then compress the map down, but when I do it seems to lose all the cubemap materials.

I even tried using Vide to pack in the cubemap materials after compressing, but VIDE could not read the .bsp

But for the time being, I have a map with all the content packed in and cubemaps. The only problem with it now is that it's still over 600mb.