Source 2 Viewer is a powerful tool that allows you to browse VPK archives, view, export, and decompile Source 2 assets, including maps, models, materials, textures, sounds, and more.

This open-source project is based entirely on a reverse engineered effort as there is no Source 2 SDK.

All Source 2 projects are supported including Counter-Strike 2 Counter-Strike 2, Dota 2 Dota 2, Deadlock Deadlock, Half-Life: Alyx Half-Life: Alyx, SteamVR SteamVR, and more…

Download Source 2 Viewer
Requirements: Windows 11, OpenGL 4.6
Having issues? Download dev build
Screenshot of Source 2 Viewer displaying a 3D rendered map of Inferno Night with detailed lighting and textures
Inferno Night by Angel, created by decompiling with Source 2 Viewer.

Command line utility

A cross-platform console application that can export and decompile Source 2 resources similar to the main application.

ValveResourceFormat

.NET library that powers Source 2 Viewer, also known as VRF. This library can be used to open and extract Source 2 resource files programmatically.

ValveResourceFormat.Renderer

.NET library providing an OpenGL-based rendering engine for Source 2 assets. Standalone rendering of models, maps, particles, animations, lighting, and materials with physically-based rendering (PBR).

ValvePak

.NET library to read Valve Pak (VPK) archives. VPK files are uncompressed archives used to package game content. This library allows you to read and extract files out of these paks.

ValveKeyValue

.NET library to read and write files in Valve key value format. This library aims to be fully compatible with Valve's various implementations of KeyValues format parsing.

C#
// Open package and read a file
using var package = new Package();
package.Read("pak01_dir.vpk");

var packageEntry = package.FindEntry("textures/debug.vtex_c");
package.ReadEntry(packageEntry, out var rawFile);

// Read file as a resource
using var ms = new MemoryStream(rawFile);
using var resource = new Resource();
resource.Read(ms);

Debug.Assert(resource.ResourceType == ResourceType.Texture);

// Get a png from the texture
var texture = (Texture)resource.DataBlock;
using var bitmap = texture.GenerateBitmap();
var png = TextureExtract.ToPngImage(bitmap);

File.WriteAllBytes("image.png", png);
View API documentation
Screenshot of the 3D renderer displaying a Counter-Strike 2 player model on a grid Screenshot showing the VPK package explorer interface with a file tree and a list view Screenshot of the animation graph viewer showing nodes Screenshot of the command line interface showing DATA block for an audio file

Features

3D Renderer

Texture Viewer

  • View textures and SVGs with isolated channel viewing
  • Export vtex_c to PNG, TGA, or other image formats
  • Color channels, depth layers, and mip levels
  • GPU or CPU decoding options
  • Cubemap and HDR texture support
  • Normal map visualization modes
  • Zoom and pan controls

VPK Viewer & Extractor

  • Open VPK files from CS2, Dota 2, Deadlock, Half-Life: Alyx, and more
  • Tree view and list view interfaces with file type icons
  • Advanced search system (name, path, regex, content, hex)
  • Sort files by size and other criteria
  • Extract individual files or entire VPK packages
  • Multi-threaded VPK extraction with progress tracking
  • Discover and recover deleted files from VPK archives
  • Create new VPK archives from folders with one click
  • Support all VPK versions (including Source 1)

glTF Export

  • Export maps, models, physics, and animations to glTF 2.0
  • Works with CS2, Dota 2, Deadlock, and all Source 2 games
  • Convert Source 2 materials to glTF PBR channels
  • Compatible with Blender, Unity, Unreal Engine, and more
  • Batch export with correctly split textures
  • Resource dependency tracking and validation

Source 2 Decompiler

  • Maps (vmap_c → vmap) for Hammer editor
  • Models (vmdl_c → vmdl) to ModelDoc format
  • Materials (vmat_c → vmat)
  • Produce editable assets for Source 2 Workshop Tools
  • Retain maximum data fidelity

Source 2 Resource Files

  • Open vtex_c, vmdl_c, vmat_c, vpcf_c, and all Source 2 file types
  • View Resource Blocks in separate tabs
  • Decode binary data to user-friendly text representation
  • Support for all resource file versions (as early as 2014)

Audio System

  • Built-in audio player with waveform visualization
  • Support for WAV, MP3, and Source 2 audio formats
  • Volume controls and stereo meters
  • Timeline scrubbing and playback controls
  • Auto-play in preview mode

Shader Packages

  • Inspect and analyze Source 2 shader files (vcs extension) with bytecode conversion
  • Read Source 2 shader packages
  • Compiled shader code viewer
  • Inspect shader metadata and bytecode
  • Tree view for static and dynamic combos
  • Convert Vulkan bytecode (SPIRV) to readable shading language
  • Support all publicly available file versions

User Interface

  • Tabbed document interface with advanced tab management
  • Dark and light theme support
  • Auto-detect installed Source 2 games on Steam
  • Recent files and bookmarks management
  • Drag and drop support for VPK and resource files
  • Keyboard shortcuts for quick navigation
  • Windows file association integration

Additional File Formats

  • NavigationMesh (.nav) and ToolsAssetInfo (.bin) files
  • World nodes (vwnod_c) for streaming world geometry
  • Particle systems (vpcf_c) and effects
  • Sound event files and audio definitions (vsnd_c)
  • Image formats including PNG, JPG, TGA, and GIF
  • Hex viewer for binary data inspection
  • Text and binary file viewing with syntax highlighting
  • Complete KeyValues support (KV1, KV2, KV3)
  • Convert binary keyvalues to text format
  • Closed captions file support

Release Notes

Trending workshop items. If you want to appear here, add a link to Source 2 Viewer in the item description: https://valveresourceformat.github.io