Official Release v1.4.8 Integrated

Decompile Source Engine Maps Back to Editable VMF

BSPSource is the open-source map decompiler for Valve’s Source engine. Convert compiled .bsp map files into fully structured .vmf projects for Hammer Editor with precise geometry restoration, entity recovery, and embedded asset extraction.

Open Source (BSD-3)
Java 24+ & Bundled Runtimes
Cross-Platform Support
BSPSource Processing Node
MAP.BSP MAP.VMF
Input Format Valve BSP (v19 – v25)
Output Format Hammer VMF / MAP

Core Capabilities for Source Engine Reverse Engineering

BSPSource processes compiled binary map structures and reconstructs editable level assets with enhanced precision, fixing geometry loss and entity errors present in older decompilers like VMEX.

High-Precision Brush Reconstruction

Utilizes higher-precision floating-point math and up to 8 decimal rounding to reconstruct world and detail brush geometry with minimal floating-point inaccuracy in Hammer.

  • Brush plane calculation & vertex alignment
  • Optional nodraw texture application on non-rendered faces
  • Displacement surface restoration

Embedded Asset Extraction (Pakfile)

Automatically detects and extracts embedded custom materials, textures, models, sounds, and LZMA-compressed files packed inside the .bsp archive.

  • Integrated pakfile / ZIP lump reader
  • Support for CS:GO autocombine props
  • Direct extraction to mod/game directories

Entity Logic & Vis-Structure Recovery

Restores entity keyvalues, I/O connections, point entities, and complex optimization brushes such as Areaportals and Occluders.

  • func_areaportal & func_occluder reallocation
  • Restoration of prop_static properties
  • Optional func_viscluster reconstruction

Tool Texture & Cubemap Fixing

Intelligent texture remap algorithm that fixes corrupted tool textures (e.g. clip, origin, trigger, skybox) back to native Hammer system materials.

  • Game-tailored texture fixing rules
  • Support for L4D2 & Garry’s Mod specific tools
  • Automated cubemap reflection cleanup

Built-in BSPInfo Inspection Utility

Includes a dedicated inspection tool mode (bspinfo) to analyze map headers without performing full decompilation.

  • Inspect BSP version, lumps, and checksums
  • View AppID, compression status, & compile flags
  • Standalone GCFScape-style lump extractor

Batch Processing & CLI Interface

Supports both an intuitive Swing/FlatLaf GUI and a robust Command Line Interface (CLI) for bulk map conversion scripts.

  • Drag-and-drop batch directory decompilation
  • Full CLI flag control for headless build pipelines
  • Cross-platform batch launch scripts (.bat / .sh)

Supported Games & Engine Compatibility

BSPSource supports virtually all Source engine games out of the box (BSP versions 19 to 25). Below is the comprehensive compatibility list across official Valve titles and major third-party games.

Counter-Strike Series

Supported
  • Counter-Strike: Global Offensive (CS:GO)
  • Counter-Strike: Source (CS:S)

Community & Sandbox

Supported
  • Garry’s Mod (GMod)
  • Team Fortress 2 (TF2)

Half-Life & Portal

Supported
  • Half-Life 2 (HL2 / Ep1 / Ep2 / Deathmatch)
  • Portal & Portal 2
  • Portal: Revolution & Strata Source

Co-op & Other Titles

Supported
  • Left 4 Dead & Left 4 Dead 2 (L4D2)
  • Black Mesa & Alien Swarm
  • Vampire: The Masquerade – Bloodlines

Unsupported Engines & Formats

BSPSource does NOT support Source 2 maps (e.g. Counter-Strike 2, Dota 2, Half-Life: Alyx) or GoldSrc maps (e.g. Half-Life 1, CS 1.6). Their map structure differs fundamentally from Source.

How to Decompile BSP Maps in 4 Simple Steps

Follow this quick guide to convert compiled Source engine .bsp files back into editable Valve Hammer Editor .vmf map sources.

01

Load BSP Files

Launch BSPSource via bspsrc.bat or bspsrc.jar. Click “Add” or simply drag and drop your target .bsp map files into the main file list.

02

Configure Entities

Navigate to the Entities tab. Choose whether to import point entities, brush entities, or write instance files depending on your reconstruction needs.

03

Extract Assets

In the Other tab, check “Extract embedded files” to dump custom textures, sounds, and models stored inside the map’s Pakfile directory.

04

Decompile to VMF

Click the prominent “Decompile” button at the bottom right. Choose your export destination and open the resulting .vmf file in Valve Hammer Editor.

Advanced Controls & Decompiler Settings

BSPSource grants complete granular control over the decompilation process. Fine-tune geometry, entity parsing, and asset extraction tab-by-tab.

01

Entities & Logic

Control how target entities, inputs/outputs, and internal triggers are extracted into the target .vmf file.

  • Point & Brush Entities: Toggle specific entity categories during export.
  • Instance Writing: Reconstruct func_instance references automatically.
  • Entity Filtering: Strip ambient sounds, light entities, or custom logic outputs.
02

World Brushes & World geometry

Rebuild brush geometry, displacements, overlay structures, and tool texture assignments accurately.

  • Displacements: Restore terrain mesh heightmaps and alpha painting details.
  • Nodraw Face Application: Smartly apply nodraw textures to occluded interior faces.
  • Areaportals & Occluders: Preserve optimization brushes for Hammer compilation.
03

Pakfile & Asset Extraction

Extract custom content packed into the BSP archive by tools like Pakrat or VIDE.

  • Embedded Files Dump: Extract materials (.vmt/.vtf), models (.mdl), and soundscapes.
  • Subfolder Preservation: Maintain exact folder paths for direct game directory integration.
  • ZIP Lump Inspection: View embedded archive contents directly before extracting.

BSPSource vs. Legacy VMEX Decompiler

VMEX was the standard decompiler for early Half-Life 2 maps but has been unmaintained for years. BSPSource was engineered ground-up to fix missing brush geometry, broken entities, and modern BSP format support.

Feature / Capability BSPSource (Modern) VMEX (Legacy)
Supported BSP Versions BSP v19 to v25 (CS:GO, L4D2, Portal 2) Legacy Only (HL2, early CS:S)
Pakfile & Asset Extraction Native Automatic Extraction Not Supported (Requires Pakrat)
Displacement Geometry High Precision Reconstruction Prone to vertex distortion
VMEX Protection Bypass Automated Flag Bypassing Blocked by lock flags
Graphical User Interface (GUI) Modern Swing/Java GUI + Drag-and-Drop CLI / Outdated Java GUI
Batch Processing & CLI Full Multi-threading Batch Support Single-file command line only
Active Maintenance Active Open-Source Development Abandoned (Last update ~2009)

Decompilation Best Practices & Community Ethics

Map decompilation is a powerful tool for learning Source engine optimization, analyzing complex logic, and recovering lost work. Follow these community standards to respect original creators.

Educational & Research Use

Use BSPSource primarily as a learning tool. Studying how experienced level designers structure optimization brushes (func_viscluster, areaportal, hint/skip) or configure complex VScript logic is the best way to master Hammer Editor.

Respect Creator Rights

Do not re-upload decompiled custom maps to the Steam Workshop without permission from the original author. If you use custom textures, models, or sound assets extracted from a map’s Pakfile, always credit the original creators in your release notes.

Hammer Geometry Cleanup

Because decompilation reverses compiled BSP math, always perform a vertex grid snap and check for invalid brushes in Valve Hammer Editor (via Alt + P) before re-compiling a decompiled .vmf map file to avoid leak errors.

Frequently Asked Questions

Find detailed solutions for common map decompilation issues, texture errors, entity limitations, and engine compatibility queries.

Q. Why are textures missing or models displaying as ERROR in Hammer?

This occurs because custom assets were embedded inside the .bsp file (via Pakfile/ZIP lump) and do not exist in your base game directory. To fix this, enable “Extract embedded files” in BSPSource’s Other tab during decompilation, then copy the extracted materials/ and models/ folders directly into your target game directory.

Q. Does BSPSource accurately recreate the original .VMF file state?

Decompiling binary map files is a lossy reverse-engineering process. Due to how the Valve vbsp compiler optimizes maps, certain internal entities (such as func_instance, func_viscluster, and info_no_dynamic_shadow) are permanently consumed during compilation and cannot be 100% restored. Minor brush alignment or tool texture adjustments in Hammer may still be required.

Q. Can BSPSource decompile Counter-Strike 2 (CS2) or Source 2 maps?

No. BSPSource is explicitly engineered for Source 1 engine maps (BSP versions 19 through 25). Source 2 uses a completely different file architecture and rendering pipeline (.vpk / compiled mesh structures) that is fundamentally incompatible with BSPSource.

Q. How does BSPSource handle decompilation protection flags?

BSPSource bypasses legacy VMEX protection flags automatically and detects common anti-decompilation tricks. However, heavily obfuscated or modified BSP headers may still yield conversion errors or require manual entity cleanup after export.

Q. Is BSPSource completely free and open-source?

Yes. BSPSource is published as open-source software under the BSD 3-Clause License. It is free to download, use, distribute, and modify for both commercial and non-commercial purposes, provided original copyright notices are retained.

Q. What should I do if decompiled geometry has invalid brushes?

If Hammer fails to load certain brushes, try re-decompiling with adjusted settings in BSPSource: toggle the “Apply nodraw to face faces” option or disable “func_viscluster reconstruction” (which is disabled by default in v1.4.8 due to reconstruction inaccuracies).

Ready to Decompile Your Source Maps?

Download the latest stable release of BSPSource. Free, open-source, and pre-packaged for Windows, Linux, and macOS.

Disclaimer: BSPSource is a community-developed, open-source utility distributed under the BSD 3-Clause License. This website and tool are not affiliated with, endorsed by, or associated with Valve Corporation.

Source, Counter-Strike, Half-Life, Portal, Left 4 Dead, and Team Fortress are registered trademarks of Valve Corporation in the United States and other countries. All other trademarks are the property of their respective owners.