Garry's Mod Wiki

Mapping Resources

Since this wiki focuses on Garry's Mod-specific content and mapping is a more general topic, we have compiled a list of useful and relevant resources for up-and-coming mappers to dig into since much of this knowledge has become rather obscure due to its old age.

Some of the information you will encounter on this page dates back to the Quake era of the Source engine. As you may know, the Source engine - and by extension, Garry's Mod - traces its roots, directly or indirectly, to the Quake engine. As such, the following conceptual information can still be useful for those trying to understand the modern-day Source engine.

All of the following links lead to external sites. Use caution.

Mapping Articles

Will2k Collection

Will2k is an older mapper who doesn't appear to be active anymore, but has left behind some invaluable documentation on just about everything about the Source engine through his journey to optimize it. You can find his own roadmap of what to follow here:


Binary Space Partitioning (BSP)

Binary Space Partitioning is what the Source engine uses to describe information about levels. During a map compile, one of the compilers will recursively subdivide a space into sets of convex shapes (called leaves), which will either be entirely solid or entirely empty, and then stores these subdivisions in memory as a tree.

Every plane that splits an area will create 2 new nodes in this tree, one representing the front and the other representing backside of the split area. The backside of this area will be the first node and the front side will be the second. This subdivision is done recursively until every area is solid or empty.

BSP is most notably important for two areas of the Source engine: PVS and collision.

Relevant Resources


Potentially Visible Set (PVS)

As mentioned above, the Source engine uses BSP data to calculate its visibility. Each time the area is subdivided into a convex shape this shape is now called a "leaf". Each leaf then has a set of triangles associated with it, which will render if that leaf can be seen. This is determined by the "Precomputed Visibility List" for the players current leaf.

During compilation, each leaf uses an algorithm to trace what it can see through "portals" (where each of these leaves touch) to other leaves and then associates them with that leaf into the "Potentially Visible Set". This means that as the player moves from leaf to leaf, the engine only needs to worry about rendering what's in the PVS and leave the rest unrendered, thus saving on performance.

Relevant Resources


Optimizing Source Levels

The techniques used for optimizing Source maps include a few different practices. First and foremost, there is level layout and design, which should occur before launching Hammer. Source is best at rendering indoor environments, whereas in large open areas that don't have many things blocking visibility Source really starts showing its age. However, that does not mean such levels are impossible, as with modern hardware these large open environments can be ran well enough.

Many of the below resources target multiple areas of optimization. Links listed under "layout" for example can as well include good tips for placing hint brushes.

Relevant Resources: Layout

Relevant Resources: Hint Brushes

Relevant Resources: Area Portals

Relevant Resources: Occluders

Relevant Resources: Visclusters

Relevant Resources: Lighting

Relevant Resources: Optimizations

Resource Banks

This section directs you to the homepages of other mapping-centered communities.

  • Interlopers.net - Links to the tutorials form section of the webpage where many old useful articles can still be found

  • MapCore Level Design Help Files - Mapcore as a whole is a good mapping community, however I wanted to link directly to this post as itself links to MANY very useful mapping articles

  • PHILIPK.NET - Very old website in near pure HTML. Navigate using the images. This website has useful information about the creation of materials and modular sets.

  • Nodraw.net - The tutorials are from 2010, but the website is listed due to having articles on niche topics that aren't covered elsewhere.

  • Valve Developer Community - Valve's official developer wiki that covers pretty much everything from GoldSrc to Source 2. There are lots of tutorials available there, but their quality and age may vary.