v21.2 is outSee what's new
Source 2 Viewer
Browse VPK archives, view, export, and decompile Source 2 assets, including maps, models, materials, textures, sounds.
Fully open-source and reverse-engineered.
Supports all Source 2 games


Render, inspect, extract, and decompile files from CS2, Dota 2, Deadlock, Half-Life: Alyx, and every other Source 2 game.



Use the same .NET libraries as Source 2 Viewer in your own projects, or export files from scripts with the command line tool.

// 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);OpenGL-based rendering engine for Source 2 assets. Standalone rendering of models, maps, particles, animations, lighting, and materials with physically-based rendering (PBR).
Reads Valve Pak (VPK) archives, the uncompressed archives used to package game content, and extracts files out of them.