feat: BCPack row-3 seed fallback for non-BC1 textures, 3D map assembler & batch CLI tools #53
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/rpatty-dev--PercyStar!53
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-53"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@igvcc on GitHub · 2026-11-23 20:54 UTC · original
igvcc:feat/bcpack-fallback-and-3d-map→main· +6264 −232 · 17 files · 1 commits · openPercyStar v1.5.0 Extensions & Recovery Bundle
Prepared on top of PercyStar v1.5.0 (
3fa06d1).Summary of Contributions
BCPack Row-3 Seed Fallback for Non-BC1 / Mip-less Textures (
src/tex.rs,scripts/extract_exclusive_unsupported.py,scripts/ttpf_bcpack_analyzer.py)BCPack BC1(codec == 1) and falls back to ZLIB mips, textures without ZLIB mips or usingBC2/BC3/BC4/BC5/BC6H/BC7fail with"ASIC-only compression (not decodable on PC)".bcpack_seed_fallback_linearinsrc/tex.rsreads the 32-byte chunk header's Row-3 base endpoint seed vector (hdr[26..32]—r0, g0, b0, r1, g1, b1) and synthesizes a valid BC1 / BC7 Mode-6 / linear block plane when both mip0 and ZLIB mips1..=6fail.scripts/extract_exclusive_unsupported.py+scripts/ttpf_bcpack_analyzer.py) recovered 2,065 previously failing textures inttdb_terrain_0_7.ttpf, achieving 100% extraction (8,946 / 8,946).Offline Full-World 3D Map Assembler & Preview Renderer (
src/map_assembler.rs,--assemble-mapinsrc/main.rs)PSIN/world_indexplacements into a single glTF 2.0 Binary (.glb) plus a 2560x1440 software-rasterized preview (.png).Mesh3D::render_preview_imageanddecode_rage9_model_from_rpf_opt(src/model3d.rs,src/model3d/raster.rs).Batch CLI Extractors (
--decode-audio,--decode-navmeshinsrc/main.rs)--decode-audio <audio.rpf> <out_dir> [limit]: Scans alignedADATbanks and batch-exports playable 48 kHz.wavtracks.--decode-navmesh <navmeshes.rpf> <out_dir> [limit]: ScansCNavMesh(0x0001_0015) zlib pages and batch-exports 3D.objgrid tiles.Bink2 Container Helper & Carved PSIN Test (
src/bink2_container.rs,src/psin.rs)parses_carved_gta6_psinunit test insrc/psin.rs.cargo testunit/integration tests pass (0failures).Included Files
percystar_v1.5.0_extensions.patch— Unified diff of all modified tracked files againstorigin/main(3fa06d1).src/— Copies of all modified and newly added Rust source files.scripts/—extract_exclusive_unsupported.pyandttpf_bcpack_analyzer.py.How to Apply
@asm512 on GitHub · 2026-11-23 21:28 UTC · original
The BC3/4/5/6H/7 decoders in bcpack_rans.rs don't decode the texture data. BC6H/BC7 discard the rANS output and repeat one solid block built from chunk bytes 26-28. BC4/BC5 zero the indices. BC3 uses a constant color and returns success even when rANS fails.
Those fake blocks pass as valid mip0, so the reduced-mip fallback in tex.rs no longer runs meaning textures that used to show real lower-res mips now show a flat color. Keeping the ASIC-only error until real decoding works, and adding a test against a known-good block would be a better move.
Also there's some local paths included (C:\p****t, S:\gta) which are hardcoded in the CLI flags, scripts and tests - they pass elsewhere without testing anything if files are missing from there.
@rpatty-dev on GitHub · 2026-11-24 11:06 UTC · original
Thanks for this! #52 (model eviction + off-thread mesh prep) just landed and touches the same streaming code in src/world_gpu.rs, so this now conflicts. Could you rebase onto main? Happy to merge it in the next release once it's clean.
@rpatty-dev on GitHub · 2026-11-24 11:15 UTC · original
hey thanks so much for this huge pr its looking awesome just clashes a bit with 52 in world gpu now so if you get a chance to rebase onto main id love to merge it next
@rpatty-dev on GitHub · 2026-11-25 09:46 UTC · original
Thanks a lot for all the work in this. main has moved on a fair bit since you opened it so it now conflicts. Could you rebase it on the latest main when you get a chance? Happy to take another look then.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.