Half-Life 2 Map Editing Optimization Guide

The NODRAW-texture


This magical texture removes the brush-side which you stick in on. This can be very useful. You apply it as any other texture. You can find it searching for "nodraw" in the texture browser. When you use it on a face, the engine doesn't have to draw that face at all, meaning less load and faster maps. The effect for one face is minimal, but using it massively is a different matter.

NODRAW-brushes can seal the map, that is why you should use them behind entities and displacements to seal the map (you shouldn't use other textures on these brushes as they will be rendered even though you can't see them through the displacements/entities). The nodrawwed brushes are just as solid as with standard textures. So when do you use this magical texture? As much as possible. All brush-sides the player will never see, should have the NODRAW texture. Whenever you make a brush ask yourself: will the player see all brush-sides of this brush? If not, these never seen brush-sides may need to be nodrawwed. I say 'may', because certain non-visible brush-sides will be deleted in the compile process:

This means that a lot of brush-sides will be deleted anyways, so it's useless to give them the nodraw texture. However, please mind the following

Entities are considered to be movable at all times, so whatever brush is behind them gets rendered normally. If a brush-side is covered by a non-moving entity, including props, displacements, func_detail and normal entities, be sure to nodraw it. Don't nodraw brush-sides behind movable entities, as the void will be visible when the entity does move.

The void can have two appearances: Looking at it can either give a Hall Of Mirrors (HOM) effect or show you the skybox instead: "the hall of mirrors (HOM) effect is an effect in which a computer program attempts to draw an image of what is technically "nothing," and as a result of which, repeats whatever image is near to the null item, causing a shimmer or an endless repetition of an image, similar to the appearance of two mirrors reflecting each other, hence the name." - Wikipedia about the Hall of mirrors effect

Besides that, don't forget the entities themselves! Especially entities with a lot of detail ( like func_details ) have lots of brush-sides you can't see but are still rendered. Nodraw them!

The compile process doesn't determine where the player can or cannot get. If the player never gets on the flat roof of a house, or the other side of a wall, nodraw them. Also don't forget the small brushes! If you have a frame around a door that is sticking out of the wall, you may have a tiny bit of brush at the topside the player never sees.

Sometimes, especially if you are new to this practice, it can be quite hard to determine which brushes to nodraw. Usually you forget to do a lot of them, resulting in lower framerates than necessairy. It is a good practice to map with the nodraw-texture as default texture, and only texture the brush-sides with visible textures which you can see when the 3d-camera in the editor is at a place the player can get to. That way it isn't very likely you nodraw to little, but offcourse the problem of forgotten brush-sides allows players to see the void in some cases. Use whatever technique you desire, but most of all playtest! By playtesting you know exactly where the player can or cannot get to, and thus what they can or cannot see, and consequently which brush-sides should and shouldn't be nodrawwed.

nodraw in the editor
Nodraw in action: The player here will not be able to see the roofs here, so they were nodrawwed.

One thing to remember for Counterstrike is that players in spectator-mode can see every part of the level. If you want them to get a nice view of a building, don't nodraw the roofs, as nodrawwed roofs will cause spectators to not see these roofs. So much for a nice view...

Oh, and lastly, i'd like to point out that cutting up brushes to nodraw parts of them usually isn't a good idea. Unless the remaining brush-sides are much smaller/less than the before state, don't bother doing this. Also, some other textures that seem to do the same, "tools/toolsskip" and "tools/toolsinvisible", don't really do the same: the SKIP-texture should only be used on HINT-brushes, and invisible just makes the brush-side invisible, it still gets rendered ( I know it sounds odd the game can render something invisibile, but that's the way it is ).


«- Previous Chapter Next Chapter -»

© Webdesign Copyright by Kolezan, contents Copyright by Ralph 'zombie@computer' van Hoorn