Engine Hunk Overflow

Alright guys, need some tips with this annoying map crash bug.

Ive been working on a fairly large, open-terrain post apocolyptic map for Terminator RP, and right now im trying to make a compound for skynet.

The map is 90% made of displacement terrain, with a nodraw solid underneath it. However, when I try to make a flat solid ground area for the skynet compound, it suddenly gives me this repeating error. I see no reason why source cant handle a simple flat solid with one texture.
Ive tried deleting it, remaking it etc, and Im pretty sure its not something else on the map. All of my source limits are well under 70%, and if I remove this primitive compound area, it seems to compile fine.

Can anyone give me tips on what actually causes the “Engine Hunk Overflow” issue so I know what im looking for?

Heres some pics of the map btw - hammer and ingame, so you guys can get an idea of the scale.

Have you tried splitting it up into more?
I’ve found Source doesn’t like very big brushes.

Splitting up what. The big solid mass im using as a base for the compound?
I dont see how that would really make a difference.
No less visleafs etc would be created by doing so.

From what I know of this error, it’s source rendering too much at once. May well be that one brush pushing it past what it’s happy with. I believe there is a command that you can run the game with which will stop this occuring since Sgt.sgt had a similar problem with evocity 2.

Ah I remember.

Im gonna try and make that solid, and the other flat ground areas, all flat displacements and see if that effects it at all. BRB 30 minutes.

On the steam window right click garrysmod and go to the launch options, paste this into the command line. +r_hunkalloclightmaps 0

Mucho appreciato. Will try it.
Although I would rather everyone didnt have to do that to play it. Ill try and work around the issue.

The map’s a real beauty

Strange, but cool map.

Map looks excellent. The only fix might be that console command.

Its a start up command.

And Davebrown, hope you now, that if you release this map, everyone has to put that command in to play.

It crashes because the amount of lightmaps in the level. What Valve did for EP2 is that they put the lightmaps in the hunk memory. This saves loading time but limits the number of lightmaps you can have it a map

+r_hunkalloclightmaps 0 in the launch options will prevent the lightmaps from being loaded into the hunk memory

I had to do this with gm_apoc; but after I added the command the whole map would not render fully on screen. Parts far away from the player would be removed in chunks(this might or might not happen with you). This problem is pretty much the reason why I had to add fog in gm_apoc

  • is a prefix for source command lines to execute a command on startup, before executing user.cfg and autoexec.cfg. So it’s a console command.

Touche. You can’t use it in console and load up a map, then take it off and play on a different map if you wanted to. You need to load the game with it.

Its because of the amount of open space, and displacements, being rendered at once, make it raining/excuse for fog and split it up into 4 areas. with area portals in each area.

When I read the title I imagined a bunch of tanned muscular guys flowing out of a car engine while a huge mexican guy flexed in the background

Sinner

You could dice the map up into a bunch of hint textures to load only what you see. Correct me if I’m wrong about that one.

You’re wrong, since there won’t be any intervening solids the vvis will just work out that all the separate visleafs you make can see each other and render everything in all of them at once anyway, you’d just increase compile times by doing this.

Am I correct in saying that I could include the autoexec.cfg with “+r_hunkalloclightmaps 0” inside it, and use pakrat to make it part of the map?

Surely that would work.