Counter-Strike 2 Workshop Tools/Level Design/Compiling

From Valve Developer Community
Jump to navigation Jump to search
Note.pngNote:Placeholder page right now, plan on going over the different compile settings featured in the new toolset and going into detail on things to check post-compile as well as ways other useful information on things to ensure a good looking compile. Not all pages are fully created yet.

Different types of compiling

There are 4 different types of compiling in the Source 2 Hammer Editor.

Full Compile

This compiles builds world, generates lighting, physics, vis, nav, and steam audio by default. Cubemaps will be built after the compile is finished.

The lightmap resolution used by this compile setting is only 1024 and quality is set to Standard. These compile settings are not recommended for final release.

Fast Compile

This compiles builds world, physics, and nav but does NOT generate lighting, vis, or steam audio by default.

This setting is useful for quick layout changes and quickly seeing something in game for scale or general "feel" when lighting is not needed.

Final Compile

This compiles builds world, generates lighting, physics, vis, nav, and steam audio by default. Cubemaps will be built after the compile is finished.

The lightmap resolution used by this compile setting is only 2048 and quality is set to Final. These compile settings are okay for final release but it is preferred that an 8192 resolution compile is done instead for Final Release.

Note.pngNote:In some cases, a 2048 resolution compile will NOT be large enough for a completed map and would therefore require higher resolutions such as 4096 or 8192 to ensure no lighting artifacts or to prevent a complete VRAD compile failure.
Entities Only

Compiles Only World. This compile setting is COMPLETELY SAFE to do after a full VRAD compile and will NOT overwrite any lightmap information if done. Extremely useful when used in conjunction with Build Physics to fix map clipping or out of bounds exploits without having to do a full recompile.

Note.pngNote:Lightmap information will also NOT be generated in this compile mode so be careful with adding random new non-tool related geometry which could result in meshes that are fullbright or not lit properly as a result
Custom Settings

This allows you to customise all of the settings to compile. Adjusting any settings of a preconfigured compiled like the ones above will result in the compile becoming "Custom".

Command Line

Command Line gets updated with all of the settings you select in the "Build Map" window instantly. You can copy and paste these settings into a .bat file placed inside of your 🖿\game\bin\win64 and run it to compile a map without having CS2 Tools open.

This can be useful if your computer is low on certain resources such as VRAM which may get eaten up by the Tools being open even if they're only running in the background.

Note.pngNote:Remove the -html command from your pasted settings to make the compile more readable in Windows Command Line.

Helpful Tips

Some helpful things to look at after running a compile

  • Lightmap - A lightmap.exr file is created in the 🖿\game\csgo_addons\addon_name\_vrad3 folder after a successful VRAD compile that shows exactly how the lightmapper packed your map's face's lighting. This can be extremely helpful in seeing if you have any egregiously large mesh faces eating up precious lightmap space or if you are having weird lighting issues it's a good place to start for figuring out what the problem might be.
  • Visibility - After a successful VIS compile a .los file is created in your 🖿\game\csgo_addons\addon_name\maps folder, this file lets you Load Compiled Vis Data (Map>View Compiled Vis Data) and view the voxels created by VIS during the compile. From here you can look around and make sure there arent any rogue voxels or any other possible VIS related issues. It's also helpful to make sure and verify there are no VIS related issues in game. Further information on this topic and other VIS related topics can be found here
  • Packing - Before publishing a map it is useful to look at the file size usage your map is taken up. Thankfully, the CS2 Workshop Publishing Tool shows you a colorful, helpful bar which will show you exactly what is eating the most of your maps file size. Each individual colored section represents a different content type (.vpk, .vtex_c, .vmat_c, etc) and clicking on Contents will show you a preview of each files size, extension, and path so you can quickly and easily know when a random 8k file has eaten up resources. Another helpful tip, delete or move the .los file from your maps folder. The Workshop Publisher tool will pick up the .los file and add it to your published map which can add hundreds of Mbs when a map is fully finished and ready for release.
CS2 Workshop Publisher.png