Engine Hunk Overflow in TF2 map

I’ve been creating a TF2 map, and whenever I start loading the map ingame, I get an error “Engine Hunk Overflow!”. From what I’ve gathered, this is something to do with light hitting surfaces, but my map has no light sources in it. How do I fix this?

Put this is in your launch options:


+r_hunkalloclightmaps 0

No no no no. You’re never going to get any server to play on your map if you have to do that.

Fix the map. Optimize. Reduce.

Well, yeah; do what Lord Ned said, but if it’s unavoidable, that’s the fix.

Im having the same problem as well. No lights… yet.
The only thing I have in my map so far is displacements (Power 3). Granted there are alot of them, I dont think this would be causing the crash would it?

Start here or look at other tutorials.

I dont really think there is anything that I can do in my case…? >.<

Edit:
Im probbbly gonna get bashed for poor mapping techniques XD



Valve Software - vrad.exe SSE (May 19 2009)

      Valve Radiosity Simulator     
4 threads
[Reading texlights from 'lights.rad']
[45 texlights parsed from 'lights.rad']

Loading c:\users\severedskullz\documents\MyMod.bsp
No vis information, direct lighting only.
Setting up ray-trace acceleration structure... Done (0.49 seconds)
10005 faces
11709100 square feet [1686110464.00 square inches]
91 Displacements
2683068 Square Feet [386361824.00 Square Inches]
0 direct lights
BuildFacelights:     0...1...2...3...4...5...6...7...8...9...10 (8)
Build Patch/Sample Hash Table(s).....Done<1.1450 sec>
FinalLightFace:      0...1...2...3...4...5...6...7...8...9...10 (19)
FinalLightFace Done
0 of 0 (0% of) surface lights went in leaf ambient cubes.
ThreadComputeLeafAmbient: 0...1...2...3...4...5...6...7...8...9...10 (39)
Writing leaf ambient...done
Ready to Finish

Object names       Objects/Maxobjs  Memory / Maxmem  Fullness 
------------       ---------------  ---------------  -------- 
models                   1/1024           48/49152    ( 0.1%) 
brushes                  7/8192           84/98304    ( 0.1%) 
brushsides              42/65536         336/524288   ( 0.1%) 
planes                 116/65536        2320/1310720  ( 0.2%) 
vertexes              8358/65536      100296/786432   (12.8%) 
nodes                 2755/65536       88160/2097152  ( 4.2%) 
texinfos                 8/12288         576/884736   ( 0.1%) 
texdata                  6/2048          192/65536    ( 0.3%) 
dispinfos               91/0           16016/0        ( 0.0%) 
disp_verts            7371/0          147420/0        ( 0.0%) 
disp_tris            11648/0           23296/0        ( 0.0%) 
disp_lmsamples     5778864/0         5778864/0        ( 0.0%) 
faces                10005/65536      560280/3670016  (15.3%) 
hdr faces                0/65536           0/3670016  ( 0.0%) 
origfaces               99/65536        5544/3670016  ( 0.2%) 
leaves                2757/65536       88224/2097152  ( 4.2%) 
leaffaces             9948/65536       19896/131072   (15.2%) 
leafbrushes           1208/65536        2416/131072   ( 1.8%) 
areas                    2/256            16/2048     ( 0.8%) 
surfedges            40790/512000     163160/2048000  ( 8.0%) 
edges                20666/256000      82664/1024000  ( 8.1%) 
LDR worldlights          0/8192            0/720896   ( 0.0%) 
HDR worldlights          0/8192            0/720896   ( 0.0%) 
leafwaterdata            1/32768          12/393216   ( 0.0%) 
waterstrips            104/32768        1040/327680   ( 0.3%) 
waterverts               0/65536           0/786432   ( 0.0%) 
waterindices          2544/65536        5088/131072   ( 3.9%) 
cubemapsamples           0/1024            0/16384    ( 0.0%) 
overlays                 0/512             0/180224   ( 0.0%) 
LDR lightdata         [variable]    48148972/0        ( 0.0%) 
HDR lightdata         [variable]           0/0        ( 0.0%) 
visdata               [variable]           0/16777216 ( 0.0%) 
entdata               [variable]         689/393216   ( 0.2%) 
LDR ambient table     2757/65536       11028/262144   ( 4.2%) 
HDR ambient table     2757/65536       11028/262144   ( 4.2%) 
LDR leaf ambient      2356/65536       65968/1835008  ( 3.6%) 
HDR leaf ambient      2757/65536       77196/1835008  ( 4.2%) 
occluders                0/0               0/0        ( 0.0%) 
occluder polygons        0/0               0/0        ( 0.0%) 
occluder vert ind        0/0               0/0        ( 0.0%) 
detail props          [variable]           1/12       ( 8.3%) 
static props          [variable]           1/12       ( 8.3%) 
pakfile               [variable]      106725/0        ( 0.0%) 
physics               [variable]        2939/4194304  ( 0.1%) 
physics terrain       [variable]       20561/1048576  ( 2.0%) 

Level flags = 0

Total triangle count: 20384
Writing c:\users\severedskullz\documents\MyMod.bsp
1 minute, 7 seconds elapsed

** Executing...
** Command: Copy File
** Parameters: "C:\Users\SeveredSkullz\Documents\MyMod.bsp" "c:\program files (x86)\steam\steamapps\SourceMods\mymod\maps\MyMod.bsp"


** Executing...
** Command: c:\program files (x86)\steam\steam.exe
** Parameters: -applaunch 218 -game "c:\program files (x86)\steam\steamapps\SourceMods\mymod" -dev -console +map "MyMod"


Eww Dx7 water. Place a normal water texture.

Also, don’t just give us vrad, give us the whole compile log.

I just picked a random texture…
And Whoops. Mustnt have copied it all…



** Executing...
** Command: "c:\program files (x86)\steam\steamapps\severedskullz\sourcesdk\bin\source2007\bin\vbsp.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\SourceMods\mymod" "C:\Users\SeveredSkullz\Documents\MyMod"

Valve Software - vbsp.exe (May 19 2009)
4 threads
materialPath: c:\program files (x86)\steam\steamapps\SourceMods\mymod\materials
Loading C:\Users\SeveredSkullz\Documents\MyMod.vmf
Patching WVT material: maps/mymod/nature/blenddirtgrass001a_wvt_patch
Patching WVT material: maps/mymod/lostcoast/nature/blendsandsand007c_wvt_patch
fixing up env_cubemap materials on brush sides...
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
Processing areas...done (0)
Building Faces...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing C:\Users\SeveredSkullz\Documents\MyMod.prt...Building visibility clusters...
done (0)
Creating default LDR cubemaps for env_cubemap using skybox materials:
   skybox/sky_day01_01*.vmt
 ! Run buildcubemaps in the engine to get the correct cube maps.
Creating default HDR cubemaps for env_cubemap using skybox materials:
   skybox/sky_day01_01*.vmt
 ! Run buildcubemaps in the engine to get the correct cube maps.
Finding displacement neighbors...
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (0) (2927 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Water found with no water_lod_control entity, creating a default one.
Compacting texture/material tables...
Reduced 14 texinfos to 8
Reduced 8 texdatas to 6 (274 bytes to 197)
Writing C:\Users\SeveredSkullz\Documents\MyMod.bsp
12 seconds elapsed

** Executing...
** Command: "c:\program files (x86)\steam\steamapps\severedskullz\sourcesdk\bin\source2007\bin\vvis.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\SourceMods\mymod" "C:\Users\SeveredSkullz\Documents\MyMod"

Valve Software - vvis.exe (May 19 2009)
4 threads
reading c:\users\severedskullz\documents\MyMod.bsp
reading c:\users\severedskullz\documents\MyMod.prt
 724 portalclusters
1732 numportals
BasePortalVis:       0...1...2...3...4...5...6...7...8...9...10 (0)
PortalFlow:          0...1...2...3...4...5...6...7...8...9...10 (1)
Optimized: 0 visible clusters (0.00%)
Total clusters visible: 44878
Average clusters visible: 61
Building PAS...
Average clusters audible: 187
visdatasize:50568  compressed from 139008
writing c:\users\severedskullz\documents\MyMod.bsp
1 second elapsed

** Executing...
** Command: "c:\program files (x86)\steam\steamapps\severedskullz\sourcesdk\bin\source2007\bin\vrad.exe"
** Parameters:  -game "c:\program files (x86)\steam\steamapps\SourceMods\mymod" "C:\Users\SeveredSkullz\Documents\MyMod"

Valve Software - vrad.exe SSE (May 19 2009)

      Valve Radiosity Simulator     
4 threads
[Reading texlights from 'lights.rad']
[45 texlights parsed from 'lights.rad']

Loading c:\users\severedskullz\documents\MyMod.bsp
Setting up ray-trace acceleration structure... Done (0.54 seconds)
7024 faces
11709101 square feet [1686110592.00 square inches]
91 Displacements
2683068 Square Feet [386361824.00 Square Inches]
7024 patches before subdivision
630434 patches after subdivision
0 direct lights
BuildFacelights:     0...1...2...3...4...5...6...7...8...9...10 (7)
BuildVisLeafs:       0...1...2...3...4...5...6...7...8...9...10 (37)
transfers 56159401, max 522
transfer lists: 428.5 megs
GatherLight:         0...1...2...3...4...5...6...7...8...9...10 (1)
    Bounce #1 added RGB(0, 0, 0)
Build Patch/Sample Hash Table(s).....Done<1.3021 sec>
FinalLightFace:      0...1...2...3...4...5...6...7...8...9...10 (36)
FinalLightFace Done
0 of 0 (0% of) surface lights went in leaf ambient cubes.
ThreadComputeLeafAmbient: 0...1...2...3...4...5...6...7...8...9...10 (11)
Writing leaf ambient...done
Ready to Finish

Object names       Objects/Maxobjs  Memory / Maxmem  Fullness 
------------       ---------------  ---------------  -------- 
models                   1/1024           48/49152    ( 0.1%) 
brushes                  7/8192           84/98304    ( 0.1%) 
brushsides              42/65536         336/524288   ( 0.1%) 
planes                 116/65536        2320/1310720  ( 0.2%) 
vertexes              7002/65536       84024/786432   (10.7%) 
nodes                 1601/65536       51232/2097152  ( 2.4%) 
texinfos                 8/12288         576/884736   ( 0.1%) 
texdata                  6/2048          192/65536    ( 0.3%) 
dispinfos               91/0           16016/0        ( 0.0%) 
disp_verts            7371/0          147420/0        ( 0.0%) 
disp_tris            11648/0           23296/0        ( 0.0%) 
disp_lmsamples     5778864/0         5778864/0        ( 0.0%) 
faces                 7024/65536      393344/3670016  (10.7%) 
hdr faces                0/65536           0/3670016  ( 0.0%) 
origfaces               99/65536        5544/3670016  ( 0.2%) 
leaves                1603/65536       51296/2097152  ( 2.4%) 
leaffaces             7608/65536       15216/131072   (11.6%) 
leafbrushes           1181/65536        2362/131072   ( 1.8%) 
areas                    2/256            16/2048     ( 0.8%) 
surfedges            29176/512000     116704/2048000  ( 5.7%) 
edges                14789/256000      59156/1024000  ( 5.8%) 
LDR worldlights          0/8192            0/720896   ( 0.0%) 
HDR worldlights          0/8192            0/720896   ( 0.0%) 
leafwaterdata            1/32768          12/393216   ( 0.0%) 
waterstrips             17/32768         170/327680   ( 0.1%) 
waterverts               0/65536           0/786432   ( 0.0%) 
waterindices           351/65536         702/131072   ( 0.5%) 
cubemapsamples           0/1024            0/16384    ( 0.0%) 
overlays                 0/512             0/180224   ( 0.0%) 
LDR lightdata         [variable]    45457636/0        ( 0.0%) 
HDR lightdata         [variable]           0/0        ( 0.0%) 
visdata               [variable]       50568/16777216 ( 0.3%) 
entdata               [variable]         692/393216   ( 0.2%) 
LDR ambient table     1603/65536        6412/262144   ( 2.4%) 
HDR ambient table     1603/65536        6412/262144   ( 2.4%) 
LDR leaf ambient       724/65536       20272/1835008  ( 1.1%) 
HDR leaf ambient      1603/65536       44884/1835008  ( 2.4%) 
occluders                0/0               0/0        ( 0.0%) 
occluder polygons        0/0               0/0        ( 0.0%) 
occluder vert ind        0/0               0/0        ( 0.0%) 
detail props          [variable]           1/12       ( 8.3%) 
static props          [variable]           1/12       ( 8.3%) 
pakfile               [variable]      107209/0        ( 0.0%) 
physics               [variable]        2927/4194304  ( 0.1%) 
physics terrain       [variable]       20561/1048576  ( 2.0%) 

Level flags = 0

Total triangle count: 14732
Writing c:\users\severedskullz\documents\MyMod.bsp
1 minute, 36 seconds elapsed

** Executing...
** Command: Copy File
** Parameters: "C:\Users\SeveredSkullz\Documents\MyMod.bsp" "c:\program files (x86)\steam\steamapps\SourceMods\mymod\maps\MyMod.bsp"



There ya go…

*Edit:
Wrong Bracket for "/code >.<

You’re getting the same thing the OP is?

In the OB engine it stores the lightmaps in the hunk memory, if you got too big lightmaps then it will overflow and crash like that. try changing the lightmap size

Yes. Im getting an engine error saying Hunk Overflow.

And how do I go about doing that?

Edit: Ok so Its higher?
Hows 25 sound?

select all brushes in your map, open the texture settings thingy, change the lightmap scale to something lower(or if it wasent higher, long since i used it)

No, its higher.

Higher = less data stored.
Lower = More data.

Ok. everytime I lower it from 17 to 12 and click apply… it just goes right back to 17 again. wtf?

Try setting it to a square number (16, 32, 64 etc.)

Can’t change lightmaps on displacements.

You can, but there is a minimum size

It was long since i used it, it has to be a power of two, and its probbably an higher amount you gotta put there as Firegod522 said, try something like 64

I set mine to 25 and it seems to work fine… (was about to state that it doesn’t have to be a power of two because 25 isn’t a power of two… then had a second thought, and hit myself in the head. That’s what I get for hopping on forums and trying to do math right after waking up. XD)

Well I guess that is why I couldn’t set my light-maps on my displacement lower than 16…