Skip to content

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

License

Notifications You must be signed in to change notification settings

ValveResourceFormat/ValveResourceFormat

Repository files navigation

Source 2 Viewer

GitHub Workflow Status

* The library component of Source 2 Viewer is called ValveResourceFormat (VRF).

Valve's Source 2 resource file format parser, decompiler, and exporter. Source 2 files usually end with _c, for example .vmdl_c.

This repository is split into four components:

  • Command-line utility - File data viewer, decompiler and a playground for testing new formats and features.
  • GUI Viewer - A vpk archive viewer and extractor. Also supports viewing resources such as sounds, textures, models, maps, and much more.
  • Renderer - OpenGL-based rendering engine for Source 2 game assets.
  • Library - Provides public API to parse resource files and some helpers.

βš’ View the official website for downloads. ℹ️ View the library documentation here.

Join our Discord

Join our Discord

Eye catchy screenshots

What's supported?

  • VPK viewer which supports opening and exporting files
  • Creating new vpk archives
  • Model viewer and decompiler to glTF and modeldoc
  • Map viewer and decompiler to glTF and vmap
  • Material decompiler to vmat
  • Sound player
  • Binary KeyValues3 parser
  • NTRO support

Limitations

This tool is based entirely on a reverse engineered effort because Valve does not provide any documentation or Source 2 code (SDK or engine code), while the Source 1 SDK and leaked engine code are helpful, a lot of systems and formats have changed.

The code contained in this repository is based on countless hours of reverse engineering Source 2 games and not all intricate details have been figured out.

If you are interested in helping, take a look at the open issues and join our Discord.

Not all formats are 100% supported, some parameters are still unknown and not fully understood.

Supported resource types

Ext Name Support
vagrp Animation Group πŸ‘
vanim Animation πŸ‘
vanmgrph Animation Graph πŸ‘
vcd Choreo πŸ‘
vcdlist Choreo Scene File Data πŸ‘
vcompmat Composite Material πŸ‘
vcss Panorama Style πŸ‘
vdata Data πŸ‘
vents EntityLump πŸ‘
vjs Panorama Script πŸ‘
vmap Map πŸ‘
vmat Material πŸ‘
vmdl Model πŸ‘
vmesh Mesh πŸ‘
vmix VMix πŸ‘
vmorf MorphSet πŸ‘
vnmclip NmClip πŸ‘
vnmgrph NmGraph πŸ‘
vnmskel NmSkeleton πŸ‘
vnmvar NmGraph Variation πŸ‘
vpcf Particle System πŸ‘
vpdi Panorama Dynamic Images No
vphys Physics Collision Mesh πŸ‘
vpost Postprocessing Settings πŸ‘
vpram Processing Graph Instance πŸ‘
vpsf Particle Snapshot πŸ‘
vpulse Pulse Graph Definition πŸ‘
vrman ResourceManifest πŸ‘
vrmap Resource Remap Table No
vrr Response Rules πŸ‘
vseq Sequence Group No
vsmart Smart Prop Partially
vsnap Particle Snapshot πŸ‘
vsnd Sound πŸ‘
vsndevts Sound Event Script πŸ‘
vsndstck Sound Stack Script πŸ‘
vsurf Surface Properties No
vsvg Panorama Vector Graphic πŸ‘
vtex Compiled Texture πŸ‘
vts Panorama TypeScript πŸ‘
vvis World Visibility No
vwnod World Node πŸ‘
vwrld World πŸ‘
vxml Panorama Layout πŸ‘
Β  Β  Β 
csgoitem CSGO Item πŸ‘
econitem CSGO Economy Item πŸ‘
herolist Dota Hero List πŸ‘
item Artifact Item πŸ‘
vdpn Dota Patch Notes πŸ‘
vdvn Dota Visual Novels πŸ‘
Β  Β  Β 
bin Tools Asset Info πŸ‘ Handled by ToolsAssetInfo
dat Closed Captions πŸ‘ Handled by ClosedCaptions
vcs Compiled Shader πŸ‘ Handled by CompiledShader
vdacdefs DAC Game Defs Data No
vfe Flex Scene File πŸ‘ Handled by FlexSceneFile
vfont Bitmap Font πŸ‘ Decrypts VFONT1, supported in Source 1 and Source 2.
vpk Pak (package) πŸ‘ Handled by ValvePak

List of supported magics

Magic Description
0x03564B56 VKV\x03 - First binary keyvalues 3 encoding with custom block compression
0x4B563301 KV3\x01 - Binary keyvalues 3 (version 1)
0x4B563302 KV3\x02 - Binary keyvalues 3 (version 2)
0x4B563303 KV3\x03 - Binary keyvalues 3 (version 3)
0x4B563304 KV3\x04 - Binary keyvalues 3 (version 4)
0x4B563305 KV3\x05 - Binary keyvalues 3 (version 5)
0x564B4256 VBKV - binary keyvalues 1 (handled by ValveKeyvalue)
0x55AA1234 VPK - valve package (handled by ValvePak)
0x44434356 VCCD - closed captions
0xC4CCACE8 tools asset info
0xC4CCACE9 tools asset info (newer version)
0x32736376 vcs2 - compiled shader
0x31415926 murmurhash2 seed used by StringToken
0xEDABCDEF murmurhash64 seed used to encode resource IDs
VFONT1 "encrypted" font file
0x00564645 VFE - flex scene file

GUI

Source 2 Viewer keeps its settings in %LocalAppData%/Source2Viewer/settings.vdf.

Misc

License

Contents of this repository are available under MIT license, except for Tests/Files folder contains files which have likely come from Valve's games.

Code signing policy

Free code signing provided by SignPath.io, certificate by SignPath Foundation.

About

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

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

  •  
  •