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

Discussion in 'Mapping Questions & Discussion' started by Werewolf, Feb 13, 2018.

  1. Werewolf

    aa Werewolf Probably not a real Werewolf

    Messages:
    761
    Positive Ratings:
    217
    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.
     
  2. Werewolf

    aa Werewolf Probably not a real Werewolf

    Messages:
    761
    Positive Ratings:
    217
    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: Feb 24, 2018
  3. Rare Endangered Spycrab

    Rare Endangered Spycrab L2: Junior Member

    Messages:
    97
    Positive Ratings:
    30
    626MB is really overkill for a map, I'm surprised that much can even be packed
     
  4. Werewolf

    aa Werewolf Probably not a real Werewolf

    Messages:
    761
    Positive Ratings:
    217
    It's actually only 471mb (626mb - 155mb) being packed in, but that is still a surprisingly large number
     
  5. Rare Endangered Spycrab

    Rare Endangered Spycrab L2: Junior Member

    Messages:
    97
    Positive Ratings:
    30
    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
     
  6. Werewolf

    aa Werewolf Probably not a real Werewolf

    Messages:
    761
    Positive Ratings:
    217
    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.
     
  7. Rare Endangered Spycrab

    Rare Endangered Spycrab L2: Junior Member

    Messages:
    97
    Positive Ratings:
    30
    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
     
  8. Werewolf

    aa Werewolf Probably not a real Werewolf

    Messages:
    761
    Positive Ratings:
    217
    I was going to try using Vide to pack the content into a copy of the map that has the cubemaps, but that might work too.
     
  9. Werewolf

    aa Werewolf Probably not a real Werewolf

    Messages:
    761
    Positive Ratings:
    217
    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.