User login

Navigation

Poll

I downloaded the ETQW demo and....
...I'm too busy playing for polls.
0%
...it's awesome.
60%
...it's okay, I expected better.
20%
...I'm lost in the valley, anyone have a map?
0%
...my machine won't run it. :-(
20%
Total votes: 5

Who's online

There are currently 0 users and 45 guests online.

Welcome to RUST | Gamedesign.net

Using the Nodraw Texture

Submitted by Andy on Fri, 2004-11-12 06:01.

The following tutorial has been republished with consent:
- By Adam "Phatsniper" Owen

One of the great features of Half-Life 2 is the ability to import highly detailed models from software such as XSI and 3D Studio Max to use in your levels.
Using these models is much more efficient than creating the detail with normal brushes, and because models don't split BSP geometry, you can intersect walls / floors etc. with them.
Unfortunately, the brush faces behind the model are still being drawn by the engine despite the player not seeing them.

This is where the nodraw texture comes into play.

If a face is textured with the "tools/toolsnodraw" texture the Source engine will not render them, thus lowering the face count and speeding up gameplay. You apply this texture just like any normal material, using the texture application tool and applying the nodraw texture to the faces you don't want the engine to draw.

The nodraw texture :

Nodraw 1

So, when will you want to use the nodraw texture?

There are many possible situations for this tool and I'll show you a couple of examples here.

The first use is on faces the player should never see, especially the roofs of buildings.

Nodraw 2

As you can see in the above image, there are a few faces that the player can't see during normal gameplay so we'll apply the nodraw texture to them.

Nodraw 3

We've saved the engine from drawing 14 faces here, and while that might not seem such a major difference, complex maps will highly benefit from not drawing roofs and other high objects.

One thing I must mention is balancing the nodraw texture. This example would be great for a single player level if there are no high windows to look out of. The main problem comes from multiplayer games, especially team based mods which make heavy use of the freelook spectator camera. Of course, when you are spectating graphics aren't a major issue, but it can look strange if lower faces such as the top of the bottom walls aren't there (you'll see straight through those faces). I leave this to your own discretion, but it's something to keep in mind.

The other example I mentioned earlier is applying the nodraw texture to faces hidden by models. Here is a doorway with the model prop, and without :

Nodraw 4Nodraw 5

The brush geometry roughs out the basic shape of the door, while the model contains the detail. After carefully placing the model and checking it from all angles to make sure there are no gaps you can apply the nodraw texture to the obstructed faces.

Nodraw 6

That's 4 faces saved for one doorway which otherwise would have just been sitting there eating up resources.

It doesn't stop at doorways, any face that is hidden by a model should have the nodraw texture applied to it.

Nodraw 7Nodraw 8

Finally, type +showbudget into the console while testing your map.
This is the new r_speeds command
.
Use the on screen information to narrow down problem areas and find out what is draining resources.

As you can see, the nodraw texture is an invaluable tool to combat the everlasting battle against low frame rates.

Thanks for reading and good luck! Don't hesitate to contact me with any questions or comments!

RUST | Gamedesign.net is your source for all the latest game-editing news and tutorials. If you are seeing this message, this means that you are using a browser that does not support CSS. Please upgrade your browser and enjoy your stay at RUST and if you have any questions, comments, or suggestions, please contact a site administrator.