Repository navigation
Conversation
…r with per-map fallback
Maps compiled before the Orange Box store one bare ambient cube per leaf and write no index lump, so reading the lump through the index gave every leaf zero samples and left props and the world unlit. The layout has to be recognised by size, because those maps write the lump length into its version field. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A prop whose origin lands inside a solid brush resolves to a leaf with no samples. Using it anyway asked for an ambient cube that never arrives, so the prop stayed unlit forever. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Returning null writes no response body at all, which drops the connection and has the exporter record the file as failed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Named lights get their own switchable style, and VRAD writes their samples in pages after style 0 rather than into it. Only the first page was being read, so every named light was missing from the exported lightmap. Styles are summed in linear space, and a style is left out when every light using it starts dark. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
StaticPropV10Bsp20 declared ColorModulation at byte 64, but in that layout those bytes are a widened copy of the flags field. The exporter wrote the value out as albedoModulation and the shader multiplies prop albedo by it, so 0x100 decoded to R=0, G=1, B=0 and rendered every prop black. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both threw from the size and conversion switches. A8 widens to white with the stored alpha, BGRA4444 widens each 4 bit channel so 0xf becomes 0xff. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Some maps pack unrelated files under .vhv names, so a header's mesh and vertex counts can point far outside the file. Placeholder files holding no meshes at all are treated as having no vertex lighting, and a model packed without its .vvd or .vtx is skipped with a warning instead of throwing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Plenty of maps name an hdrcompressedtexture without packing it, and skies built from an environment cubemap have no base texture either. Each candidate now has to resolve before it is used, and a sky with nothing to draw with is dropped. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Material pages kept rewriting texture urls into per-map indices, which pulled every frame and mip level of a shared texture into each map that used it. Urls into the hash addressed materials folder are now left alone, so a texture is fetched and exported once. Hash addressed urls also skip the timestamp query and, once exported, are not requested again: they cannot go stale while their file exists, and neither can anything below them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Re-exporting a map meant re-exporting every texture it touches, and picking up a change to how textures are converted meant re-exporting every map. The content hash of a source .vtf cannot see a change in the converter, so overwriting materials stays a deliberate choice. --overwrite still implies both, and static viewer files are always replaced. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verified with a sample of ~50 maps partially sharing textures.
Additions:
\materials\<map_name>\<texture>.vtf\<hash>\mip0.pngto deduplicate exact shared materialsFixes: