Difference between revisions of "Engine Hunk Overflow"

From Valve Developer Community
Jump to: navigation, search
(Created page with "== What Does It Mean? == === Engine Error === This is an engine error message that occurs when attempting to load the map in-game. This is typically related to Lightmap...")
 
(How To Fix: rewrote fixes. i recommend against r_hunkalloclightmaps 0 cause its done for a reason...)
Line 12: Line 12:
  
 
== How To Fix ==
 
== How To Fix ==
 
There are two ways of fixing this error:
 
 
*+r_hunkalloclightmaps 0
 
*+r_hunkalloclightmaps 0
**This will eliminate the error altogether. Insert this command into your [[Command Line Options|game's launch options]]. For multiplayer maps, this command also needs to be inserted in the start up command line for [[Source Dedicated Server|game servers]].
+
**Put this in your [[Command Line Options|launch options]]. This will eliminate the error altogether, but it's not a solution for multiplayer games because it forces the server to put it in their command line options (and many will not do this).
*Finding faces with odd lightmap values.
+
*Find faces with odd or extreme lightmap values.
**If you have not changed any lightmap value at any given time, the fastest way to reset the lightmap value back is to select the entire map, open the [[Hammer Face Edit Dialog|face edit sheet]] and input <code>16</code> in the lightmap/luxels value.
+
**Very large [[displacements]] can cause this error. The lightmap value can automatically change (sometimes, to an undesired value). Try splitting them up or making sure the scale on them is not extremely small/big. Having the displacement be very stretched in one dimension can also cause it.{{confirm}}
**Check your [[displacements]]. If they are large, the lightmap value will automatically change (sometimes, to an undesired value).
+
**If you can't find any lightmap values that seem odd, as a last resort, select the entire map, open the [[Hammer Face Edit Dialog|face edit sheet]] and put <code>16</code> for the lightmap scale.
  
 
[[Category:Modding]]
 
[[Category:Modding]]
 
[[Category:Level Design FAQ]]
 
[[Category:Level Design FAQ]]

Revision as of 13:50, 3 February 2019

What Does It Mean?

Engine Error

This is an engine error message that occurs when attempting to load the map in-game. This is typically related to Lightmap values being modified to an odd value.

What Is Hunk Allocation

This is described as the memory allocated for light data.

  • 0 = to normal "program memory" with alloc
  • 1 = to Valve's seemingly limited to certain size "MemoryStack memory" with Hunk_Alloc

How To Fix

  • +r_hunkalloclightmaps 0
    • Put this in your launch options. This will eliminate the error altogether, but it's not a solution for multiplayer games because it forces the server to put it in their command line options (and many will not do this).
  • Find faces with odd or extreme lightmap values.
    • Very large displacements can cause this error. The lightmap value can automatically change (sometimes, to an undesired value). Try splitting them up or making sure the scale on them is not extremely small/big. Having the displacement be very stretched in one dimension can also cause it.[confirm]
    • If you can't find any lightmap values that seem odd, as a last resort, select the entire map, open the face edit sheet and put 16 for the lightmap scale.