Post tutorial Report RSS Optimizing your Source map

Ok, so you (hopefully) have a well designed map with some stunning architecture and awesome effects... now it is time to make it all run well. This tutorial will help your map run a little faster.

Posted by on - Basic Mapping/Technical

Ok, so you (hopefully) have a well designed map with some stunning architecture and awesome effects... now it is time to make it all run well. This tutorial will help your map run a little faster. However, I must point out that while all mappers should do it, it won't automatically make the map super playable. It should help though, to say the least.

[page=Tools of the Trade]
First of all, for Source compiling, you should get Zoner's Custom Compile Tools (CST). They compile maps a lot faster than Valve tools do. Don't worry, there are no extra things you need to do to compile a map after you install these things. Once you have CST, unzip it all to your sourcesdk/bin folder, as shown:

Tutorial Image

Now open up Source SDK, and then open Hammer. Go to Tools --> Options, then go to the Build Programs tab (make sure that in the textbox titled "BSP executable", it points to cstbsp.exe in the directory). Next do the same thing for the textbox entitled "VIS executable", except ensure it points to cstvis.exe in the directory. Finally, do the same for the textbox titled "RAD executable", and make it point to cstrad.exe in the directory. Here is how it should look after you are done (Note that you don't have to be using $SteamUserDir):

Tutorial Image

Congratulations, you have set up Zoner's Custom Source tools! Now let's move on to the next part of this tutorial: The nodraw texture.

[page= The Nodraw texture]
The nodraw texture's purpose is very simple: Any face that it is applied to isn't rendered by Source! This lets the render tool take care of other things. So apply the nodraw texture to any face that the player should not see while playing. Note, however, that any faces that can be seen in Spectator mode, but not when the player is actually ingame, should have the Nodraw texture applied. However, this does not apply to your skybox! Never use nodraw on your skybox brushes, or the sky won't be rendered! The little chicken would go nuts! Here is an example of the Nodraw texture:

Tutorial Image

Note that I applied the nodraw texture to the out sides of the hollow cube with an
info_ playerstart and an info_player_deathmatch in places where the player should not be able to see, except while in spectator mode. Next up in this tutorial is skybox optimization!

Ok, first let me show you how NOT to do a skybox:

Tutorial Image

Whatever you do, do not make a hollow cube with the sky texture applied to it, and put a sky_camera entity in the middle!

Here is a very good tutorial on skyboxes
There is one simple rule for water optimization: Use as little as possible. And use a water_LOD enity near it so the detail decreases as you get farther away.

Next up in optimization, clipping vs. carving – something I am rather passionate about!

[page=Clipping vs. Carving]
Let me put this as straight as I can for you, (I apologize for the caps, but I want to get a point across):


Now, allow me to justify myself, and explain why you should use clipping instead. You see when you carve, you make the hole you want... but it leaves a ton of brushes left over. For example if you were to carve a cylinder into a block, you will have so many extra brushes, which brings me to another optimization point (try to have as few brushes as possible!

This could be done better by using clipping along each vertices edge, however I am not good with the clip tool, so it will be a while before I have an image. Just make sure it sticks, remember:

CARVING IS EVIL!!!!!! DON'T DO IT!!!!!!!!!!!!!!!!!!!!!!!

Hopefully I have gotten my point across! That concludes this tutorial - expect more tips shortly


i am using a batch file to compile source maps. it works fine if i use 'vbsp' 'vrad' etc. but it refuses to compile if i use cst compilers instead!! could u just help me out??

herez the batch file....

@echo off
"D:\Steam\SteamApps\steamid\sourcesdk\bin\vbsp.exe" "D:\Steam\SteamApps\steamid\sourcesdk_content\hl2\mapsrc\mapname.vmf"
"D:\Steam\SteamApps\steamid\sourcesdk\bin\vvis.exe" "D:\Steam\SteamApps\steamid\sourcesdk_content\hl2\mapsrc\mapname.vmf"
"D:\Steam\SteamApps\steamid\sourcesdk\bin\vrad.exe" "D:\Steam\SteamApps\steamid\sourcesdk_content\hl2\mapsrc\mapname.vmf"
copy "D:\Steam\SteamApps\steamid\sourcesdk_content\hl2\mapsrc\mapname.bsp" "D:\Steam\SteamApps\steamid\half-life 2\hl2\maps"

D:\Steam\Steam.exe -applaunch 220 -heapsize 256000 -console -novid +map mapname

Reply Good karma Bad karma+1 vote

This isn't much of a tutorial...

Reply Good karma Bad karma+2 votes

its more of tips section. but the author is right in 30 different ways and steps so don't try to correct em! :D

Reply Good karma Bad karma+1 vote

its a grate tip for beginers. ty for the tutorial :p

Reply Good karma Bad karma0 votes

ok there is soooo many thing wrong here i dunno where to start..........

there is no need to use the nodraw texture on the outside of your map .... providing you have no leaks it is never rendered as is also in your no draw picture your brush work is exstremly messy. you shouldnt make the sides of that cube as large as you have ... you only need the brushes to be as big as the inside (not outside) .............

basicly in short dont use this tutorial as it is incorect i reccomend
as its far more detailed and complete (and correct) than this abomination........

ps sorry to the author however you are not helping the modding community in releaseing uncoplete and inacurate tutorials

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Related Games
Half-Life 2
Half-Life 2 First Person Shooter
Related Engines
Source Commercial
Related Groups
Valve Developer & Publisher
Got it!

We have recently updated our privacy policy and terms of use in-line with GDPR requirements. More Info?