Garry's Mod Wiki

Revision Difference

Mapping_Resources#562798

<cat>Dev.Map</cat>⤶ <title>Mapping Resources</title>⤶ ⤶ Since this wiki aims to cover garry's mod specific content and mapping is more generic, instead of trying to rewrite already solid information here, I decided to compile a list of useful and relevant information since most of this information has started become lost due to its age.⤶ ⤶ Some of this information is source from the Quake era, the source engine and thus Garry's mod come from quake so the conceptual information can still be useful for understanding modern day source. ⤶ ⤶ These are links to externals 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 is journey to optimize the source engine. You can find his own roadmap of what to follow here:⤶ - [Will2k Source Engine Optimization Roadmap](https://www.mapcore.org/topic/20087-source-engine-optimization-roadmap/)⤶ ⤶ some links link to a gamebanana page which have a pdf download at the bottom.⤶ ⤶ ---⤶ ⤶ ## Binary Space Partitioning (BSP)⤶ Binary Space Partitioning is what the source engine uses to describe information about the level. During a map compile the compiler 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 subdivision's in memory as a tree.⤶ ⤶ Every plane that splits an area will create 2 new nodes in this tree representing the front and 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.⤶ ⤶ This is most notably important for two areas of the source engine. PVS and collision.⤶ ⤶ ### Relevant Resources⤶ - [Matt Ramblings: BSP Trees: The Magic Behind Collision Detection in Quake](https://www.youtube.com/watch?v=wLHXn8IlAiA)⤶ - [Will2k Man vs Engine](https://gamebanana.com/tuts/11178) ⤶ - [Valve Developer Wiki BSP Page](https://developer.valvesoftware.com/wiki/BSP_(Source))⤶ - [Flipcode Quake 2 BSP File Format](https://www.flipcode.com/archives/Quake_2_BSP_File_Format.shtml) *This covers how BSP is implemented in code but could potentially be useful to some*⤶ ⤶ ---⤶ ⤶ ## Potentially Visible Set (PVS)⤶ As mentioned above, The source engine uses BSP data to calculate its visuality. 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 compile times each leaf uses an algorithm to trace what it can see through "portals" (where each of these leaves touch) to other leaf's 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 saving on performance.⤶ ⤶ ### Relevant Resources⤶ - [Matt Ramblings: Quake's PVS: A hidden gem of rendering optimization](https://www.youtube.com/watch?v=IfCRHSIg6zo&t=288s)⤶ - [Will2k: Demystifying Source Engine Visleaves](https://gamebanana.com/articles/71)⤶ - [Will2k: Source Engine PVS - A Closer Look](https://gamebanana.com/articles/72)⤶ ⤶ ---⤶ ⤶ ## Optimizing Source Levels⤶ The techniques used for optimizing source maps includes a few different practices. First and foremost there is level layout and design, which should occur before launching hammer. Source is best at rending indoors environments, large open areas where there is limited things blocking visibility in where source really starts showing its age. However that does not mean such levels are impossible, with modern hardware these large open environments can be run well enough now that computers are faster. ⤶ ⤶ ⤶ Many of the below resources target multiple areas of optimization. Links listed under "layout" for example can include good tips for placing hint brushes as-well.⤶ ⤶ #### Relevant Resources: Layout⤶ - [Will2k: Optimizing An Open Map in Source Engine](https://www.mapcore.org/articles/development/optimizing-an-open-map-in-source-engine-r88/)⤶ - [Rick_D: Making Agency, the popular CS:GO map](https://www.mapcore.org/articles/development/making-agency-the-popular-csgo-map-r62/)⤶ - [FMPONE: Making a Map: CS_Museum](https://www.mapcore.org/articles/development/making-a-map-cs_museum-r25/)⤶ ⤶ #### Relevant Resources: Hint Brushes⤶ - [Will2k: Hints about Hints - Practical guide on hint brushes placement](https://gamebanana.com/articles/59)⤶ - [MangyCarface: Optimization in Source: A Practical Demonstration](https://nodraw.net/2009/12/optimization-in-source-a-practical-demonstration/)⤶ ⤶ #### Relevant Resources: Area Portals⤶ - [Will2k: Practical guide on areaportals placement](https://gamebanana.com/articles/64)⤶ ⤶ ⤶ #### Relevant Resources: Occluders⤶ - [Will2k: Practical Guide on Occluders Placement](https://gamebanana.com/articles/65)⤶ ⤶ #### Relevant Resources: Visclusters⤶ - ⤶ ⤶ #### Relevant Resources: Lighting⤶ - [leplubodeslapin: Source Lighting Technical Analysis: Part One](https://www.mapcore.org/articles/development/source-lighting-technical-analysis-part-one-r65/)⤶ - [leplubodeslapin: Source Lighting Technical Analysis: Part Two](https://www.mapcore.org/articles/development/source-lighting-technical-analysis-part-two-r66/)⤶ ⤶ ⤶ #### Relevant Resources: Optimizations⤶ - [Will2k: Comparative fps study in Source Engine Optimization System](https://gamebanana.com/articles/69)⤶ - [Will2k: Displacement Vs. Func_detail - A comparative fps study](https://www.mapcore.org/articles/development/displacement-vs-func_detail-a-comparative-fps-study-r73/)⤶ - [Will2k: Source FPS Cost of Cheap and Expensive Assets](https://www.mapcore.org/articles/development/source-fps-cost-of-cheap-and-expensive-assets-r76/)⤶ - [Will2k: Common Misconceptions in Source Engine Optimization](https://gamebanana.com/articles/68)⤶ ⤶ # Resource Banks⤶ This section Directs you to the homepage of other mapping centric communities.⤶ - [Interlopes.net](https://www.interlopers.net/forum/viewforum.php?f=11) - Links to the tutorials form section of the webpage where still many old useful articles can be found⤶ ⤶ - [MapCore Level Design Help Files](https://www.mapcore.org/topic/3598-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](https://www.philipk.net/tutorials.html) - Very old website in near pure HTML, Navigate through the images, Still has useful information about the creation of materials and modular sets. ⤶ ⤶ - [Nodraw.net](https://nodraw.net/category/articles/) - Tutorials are from 2010 but listed due to having niche articles that arnt covered in other places