ValveResourceFormat

🔬 Valve's Source 2 resource file format parser, decompiler, and exporter.

MIT License

Stars
1.4K
Committers
35

Bot releases are visible (Hide)

ValveResourceFormat - 0.1.3

Published by xPaw over 4 years ago

View commits since 0.1.1

GUI

  • Implemented glTF exporting for models and meshes (see #232)
    • Models and meshes can be exported from vpk without opening it in the viewer
  • Improved rendering for HemiOct normals
  • Fixed GUI softlock when changing viewer background color
  • Fixed a crash on some HL: Alyx maps

CLI

  • Use invariant culture to fix exporting floats

Library

  • Added a lot more known entity keys for HL: Alyx
  • Added support for R32G32B32A32_FLOAT, R32_FLOAT, R16G16B16A16_SINT vertex attributes
  • Added support for LegacySource1InvertNormals
  • Fixed null bytes in closed captions
  • Fixed a crash when there are no frames in an animation
  • Removed MeshWriter
ValveResourceFormat - 0.1.2

Published by xPaw over 4 years ago

View commits since 0.1.1

GUI

  • Ported to .NET Core, now built standalone as a single file binary
  • Added root vpk node for easier extraction of entire vpk
  • Added RGBA16161616F opengl format
  • Added animation transform to error shader
  • Added checkbox to toggle the grid in model viewer
  • Implemented hemi-octohedron normal map projection
  • Fixed alpha test discarding pure blacks (patchy models in HLVR)
  • Fixed camera names crashing map viewer (uses targetname now)
  • Continue extracting on decompiler exception
  • Removed frustum culling in model viewer
  • Disabled VPK checksum checks in extractor and renderer

CLI

  • Allow opening binary KV3 files
  • File types are now detected by reading the 4-byte magic instead of using file extension

Library

  • Added NTRO marshalling for embedded physics and animation blocks
  • Added ToolsAssetInfo to parse readonly_tools_asset_info.bin
  • Added BC6H, BC7, ATI1N, and ATI2N textures decoding (thanks @lewa-j)
  • Added export of hemi-octohedron normalmaps for DXT5 and BC7 (thanks @lewa-j)
  • Added support for closed captions version 2
  • Added support for sound bits used in HLVR
  • Added R16G16_UNORM export
  • Fixed extracting cubemap textures
  • Fixed extracting particle data
ValveResourceFormat -

Published by xPaw over 4 years ago

View commits since 0.1.0

GUI

  • Added "decompile & export" context menu option
  • Improved map viewer
    • Added 3D skybox in the main map (HL:A enviroment city 17)
    • Added world camera controls
    • Batch opaque draw calls to further improve performance
    • No longer throw an exception for unsupported particles in world loader
  • Allow saving custom camera positions
  • Fixed animations not loading in model viewer
  • Fixed hobgen underlord model animations
  • Fixed water (and renderpasses in general) being broken
  • Fixed embedded meshes not being filtered by LoD

CLI

  • Added support for filtering by extension when collecting stats
  • Removed particle classes stats dump

Library

  • Handle entity properties that have string names included
  • Add support for newer sound stack scripts (vndstck)
  • Fixed sound "type 1" not working
  • Added KeyValuesOrNTRO resource type
ValveResourceFormat - 0.1.0

Published by xPaw over 4 years ago

View commits since 0.0.16

GUI

  • Rewritten renderer
    • Implemented octree based frustum culling in the map viewer (to improve performance)
    • Implemented basic draw call sorting for better transparency support
    • Each tab now contains its own OpenGL and cache contexts
    • When closing a renderer tab, memory should correctly clear out now
    • Added support for rendering embedded meshes in combined models (like void spirit)
    • Map viewer now supports model animations and particles
    • Map viewer now supports world layers
    • Model viewer now supports mesh groups
    • Removed overlay meshes from maps to fix z-fighting
    • Many fixes to our shaders (lighting, etc)
  • Moved particle shaders to the shader loader
  • Added an option to open file with the default Windows handler
  • Added more file type icons
  • Brought back support for rendering models with NTRO data blocks
  • Switched binds Ctrl+Q and Ctrl+W around
  • Console tab will now also show stderr messages

CLI

  • Enabled native single file builds
  • Fix dumping folders without --recursive (#177)

Library

  • Added support for duplicate block names (#175)
    • This allows loading combined model files (like void spirit)
    • Blocks is now List<Block>
  • Added decoding for R8G8B8A8_UNORM and R8G8B8A8_UINT (#181)
  • Added support for ATI1N textures
  • Moved MeshWriter.WriteObject from GUI to library code to dump VBIB
  • Added Add Entity.GetProperty helper
  • Added EntityLumpKeyLookup.Get (entity keys are murmur2 hashed with seed of 0x31415926)
  • Added a huge list of known entity property names (from all fgd files) to improve EntityLump.ToString()
ValveResourceFormat -

Published by xPaw about 5 years ago

View commits since 0.0.15

Library

  • Fixed mipmap size calculation
  • Fixed NullReferenceException in vphys_c files
  • Added fancier error texture
  • Added support for BGRA8888 textures
  • Added support for vsvg panorama files
  • Added ValveResourceFormat.IO for file dumping purposes

GUI

  • Fixed vr_standard vertex shader
  • Improved particle rendering
  • Reset audio position if its stopped

CLI

  • Fixed calling vrf_decompiler from another working directory
  • Added --version switch
ValveResourceFormat - 0.0.15

Published by xPaw over 5 years ago

View commits since 0.0.14

Library

  • Support for the new format of the bitpackedsoundinfo
  • Support for Closed-Captions (VCCD)
  • Support for reading new compressed binary keyvalues3 (KV3\x01)
  • Support for LZ4 compressed textures (COMPRESSED_MIP_SIZE)
  • Support for ETC2 textures
  • Support for meshoptimizer compressed vertex and index buffers (VBIB)
  • Support for new KV3 based models/materials/etc
  • Updated VTexFormat

GUI

  • Use managed mp3 decoder instead of relying on Windows codecs
  • Some basic particle rendering
  • Added console tab
  • Added hex and text viewers for unknown data
  • Added various tab management options (close tabs to left, close to right, close all tabs)
  • Added file export progress dialog when extracting folders
  • Combined top toolbars into one

CLI

  • Add simple stats dump for particle classes
ValveResourceFormat - 0.0.14

Published by xPaw over 5 years ago

View commits since 0.0.13

Library

  • Implemented new binary keyvalues3 types and lz4 encoding
  • Implemented support for new KV3 encoded models, skeletons, animations and maps
  • Implemented FourVectors2D (Matrix2x4) type in NTRO

GUI

  • Fixed model and map rendering for the latest Dota 2 updates

CLI

  • Replaced command line parser library
  • Added bat and linux scripts to launch dotnet
ValveResourceFormat - 0.0.13

Published by xPaw almost 6 years ago

View commits since 0.0.12

Library

  • Add support for AAC sounds
  • Output proper dimensions for FillToPowerOfTwo DXT1 / DXT5 textures
  • Perfect DXT5nm normalmaps output
  • Implement decoding for all known texture formats

GUI

  • Automatically open files that were opened with the app
  • Implement recursive folder extraction
  • Fix map renderer crashing
  • Fix multiple issues in animation decoding and rendering
  • New icon
ValveResourceFormat - 0.0.12

Published by xPaw over 6 years ago

View commits since 0.0.11

Library

  • Moved animation code from GUI
  • Use System.Numerics.Vectors instead of implementing these types ourselves

GUI

  • Refactored camera in model/map viewer
  • Added different render modes in model viewer
  • Smoothed out animations in model viewer
  • Open xxx_dir.vpk when opening numeric archives (like xxx_001.vpk)
  • Updated OpenTK to 3.0.0-pre
ValveResourceFormat - 0.0.11

Published by xPaw over 6 years ago

View commits since 0.0.10

Library

  • Ported to .NET Core
  • Replaced System.Drawing with SkiaSharp

GUI

  • Settings are now saved in settings.txt in keyvalues format
  • Open and save dialog paths are now remembered separately
  • Allow selecting vpks in content search paths
  • Fixed animations glitching out
  • Meshes now correctly write texcoords, normals and materials when exporting

Decompiler

  • Ported to .NET Core
  • Added --vpk_decompile, --vpk_extensions, --vpk_filepath for better filtering
ValveResourceFormat - 0.0.10

Published by xPaw over 7 years ago

View commits since 0.0.9

Library

  • Package (vpk) has been split into a separate library ValvePak
  • IndentedTextWriter is now self-implemented (preparing for .NET Core)
  • Some progress on parsing .vcs shader files
  • Unlock file writes on resources library opens

GUI

  • Model animations in the renderer, thanks @Perryvw!
  • Dropped 32-bit builds
  • CTRL+W now closes currently active tab
  • Partial folder extraction support
  • Mesh to .obj export support
  • Support for opening .vcs files

Decompiler

  • Dropped 32-bit builds
  • Dump .png and .jpg files from vpks
ValveResourceFormat - 0.0.9

Published by xPaw over 8 years ago

View commits since 0.0.6

Library

  • Added valve font (VFONT1) decryption
  • Initial shader parsing support (vcs)
  • Initial EntityLump support

GUI

  • Added map viewer
  • Added export support for texture and panorama files
  • Performance improvements

Known Bugs

  • Some models crash due to incorrect animation file parsing, will be fixed in the next release
ValveResourceFormat - 0.0.6

Published by xPaw over 8 years ago

  • Fixed nuget publishing
  • Fixed assembly versions
ValveResourceFormat - 0.0.5

Published by xPaw over 8 years ago

View commits since 0.0.3

Library

  • Added support for VBIB
  • Added a FindEntry() API for VPK's
  • VPK Signatures are now supported
  • VPK v2 headers are now correctly handled
  • Fixed BinaryKV3 reading after its block ended
  • Panorama files are now correctly identified
  • Speed improvements in converting DXT1 and DXT5 to bitmap

GUI

  • Added a Model Viewer
  • Added a Sound Player
  • Added an app-wide export button (currently only does sound exports)
  • Fixed a case where dragging multiple files of both SVF and non-SVF types could freeze the GUI
  • Speed improvements when opening VPKs

Decompiler

  • Added support for stat collection on VPK's
  • Now collects stats on Sounds
ValveResourceFormat - 0.0.3

Published by xPaw over 8 years ago

View commits since 0.0.2

Library

  • NTRO is now fully serialized
  • KV3 is now fully serialized
  • Now supports SoundEventScript
  • Now supports ParticleScript
  • Now partially supports Mesh

Decompiler

  • Can now dump SoundEventScript files

GUI

  • Can now save Texture images to Bitmap (BMP)
  • Now correctly saves to TIFF #43
ValveResourceFormat - 0.0.2

Published by xPaw almost 9 years ago

View commits since 0.0.1

Library

  • Read panorama name entries into a list
  • Read SmallData (preload bytes) in VPKs
  • Fixed multiple cases when calculations could underflow
  • Fixed reading pixel data in RGBA8888 texture format
  • Fixed colour issues in textures that use DXT5 compression (converted YCgCo to RGBA)
  • Partial support for texture formats 17, 18, 19
  • Initial work on parsing particles

Decompiler

  • Added --vpk_dir option to print vpk contents
  • Log exceptions to a file for easier debugging

GUI

  • Open non resource files in explorer on double click
  • Black background colour when viewing textures
  • Embedded asset type images
  • Ability to search in open VPKs
ValveResourceFormat - 0.0.1

Published by xPaw almost 9 years ago

This a preview of work in progress GUI to open Source 2 (Dota 2) resource files.

If anything breaks, please report an issue!