ProblemThere are several possible causes for the
SV_SetBrushModel: NULL error, if in trying to fix it with one method you find the solution doesn't work then that means the error is being caused by one of the other alternatives.
Corrupted brush in the mapDuring the course of manipulating brushwork these 'broken' brushes happen occasionally. They're often 'phantom' brushes, brush objects that you can't see in the editor but appear in game when once a map has been compiled.
How to fix a corrupted, broken or phantom brushTo fix this first try the 'brush cleanup tool' from the main menu (it's location may vary depending on which version of GTKRadiant you're using.
If that doesn't work make sure you've not got any objects hidden and make sure the show/hide options in '
View » Filter' are set to display everything.
- Draw a brush in the editor and resize it so that it covers the whole map. Leave it selected.
- Right click and from the pop up menu choose 'Select » Select Inside'. This will select everything in the map (that was contained inside the brush).
- Go to 'File » Save Selected' and save the selected brushwork to a completely new and clean file.
If the error was caused by a phantom brush doing this should remove it from the map.
Bad func_groupA collection of brushes that have been 'connected' together using the editors func_group 'entity' has got corrupted somehow, usually by the presence of a bad brush in the group, or in some cases by the accidental deletion of a brush from a group (it's usually best to ungroup, delete and then regroup).
How to fix a bad func_groupThe only way to fix a bad func_group is to ungroup the entity and clean the brushwork up (using brushcleanup) before regrouping the objects back together.
Incomplete or partial brush entityThis is the most likely cause of the error and it happens when trying to make brush based entities that involve the 'origin' shader. The origin brush is 'entity specific' which means it can't exist in the world on it's own like other brushes, it always has to be grouped with other brushwork to form an entity;
func_door,
func_mover,
func_rotate,
func_script_mover and so on, all of these are brush based entities that are comprised of normal brushes and an 'origin' brush. If an origin brush is left in the world ungrouped with other brushes the 'Null' error results.
How to fix an incomplete or partial brush entity
You need to track down the offending orphaned origin brush. Once found either delete it, or regroup it with whatever brushwork it was supposed to have been grouped with. You may need to ungroup the entity, select the origin brush and then regroup.
Improperly placed 'entity' textureRelated to an orphaned origin brush is the accidental improper use of entity specific textures/shaders. This happens when an entity shader is 'mixed' with other normal textures on an object. More often than not, it's the 'origin' texture/shader that's been misplaced on one or more faces of a door or similar brush based entity (see above). Entity textures/shaders can't be mixed in this way (unless it with specific instances of 'nodraw'), they have to be placed on all faces of a brush.
How to fix improperly placed entity texturesAgain as with an orphaned origin brush, the offending texture will need to be tracked down and corrected. Look at all the brush based entities in the map to see if any faces are covered in origin (or areaportal, clusterportal and so on)
Design note: If you're working on a big map that has a lot of real-estate being used, tracking a single faces on any given brush can be very time consuming so here's little 'trick'. Simply draw out a block and then texture the whole thing in 'origin' (or whatever texture you think may be causing the problem). Once done, select a face and then press 'Shift+A'; this selects all brush objects that have the initially selected texture applied to it allowing you quick and easily visible reference points as to the location of likely offending brushwork.