Repository navigation
Conversation
|
Game-copy check of
The other census figures in
This checks the parser and the census on a second copy, not the RNG port or the exported geometry: I did not run Counts only; nothing from the game leaves my machine. AI-assisted. |
|
Tested d8bfb82 on Windows, CPython 3.14.7, CPU only (no GPU, no game files). One non-blocking point about memory. I measured the Python allocation of
The control gives a byte-identical GLB in each row. The peak increases linearly with the candidate count (about 210 bytes for each candidate). This is temporary memory, not a leak. import gc, runpy, tracemalloc
from unittest.mock import patch
m = runpy.run_path("tests/test_smh_groom.py")
g = m["smh_groom"]
def measure(groom):
gc.collect()
tracemalloc.start()
data, stats = g.to_glb(groom, max_strands=1, classes=(0,), scalp=False, guides=False, geometry="curves")
peak = tracemalloc.get_traced_memory()[1]
tracemalloc.stop()
return data, stats["strandsShown"][0], peak
original = g.scatter
for density in (8, 64, 255):
groom = g.parse(*m["build_synthetic_groom_buffers"](triangles=[(0, 1, 2)] * 128, tri_count=[(density, 0, 0, 0)] * 128))
data, shown, peak = measure(groom)
with patch.object(g, "scatter", lambda groom, count, *args: original(groom, 1, *args)):
check, _, control = measure(groom)
assert check == data and shown == 1
print(128 * density, shown, len(data), peak, control)Possible correction: make candidates in order until the number of accepted strands is reached, and continue past rejected candidates. Keep the full AI-assisted. |
…er class semantics
Summary
Clean-room, standard-library-only (
python -I, nonumpy/Pillow) decoder, Class 0 RNG & barycentric strand generator, corpus census tool, and glTF 2.0 (.glb) exporter for RAGEsmhGPU strand grooms (hair, beards, brows, lashes, body hair, and animal fur).Deliverables
tools/smh_groom.py(pure Python stdlib, reusestools/glb_writer.pyframing & atomic write):smhgroom LOD resources (native 16-zero-prefixed zlib streams, raw zlib streams, standalone raw GPU asset buffers, and RPF9 archive scanning), including dedicatedparse_system_page()decodingTYPE_ID = 0x7d8f3db3, primary AABB (+0x30/+0x40), unset secondary bounds sentinel detection (+0x48..+0x70/+0x50..+0x6f+FLT_MAX/-FLT_MAXon child rigs and non-scalp grooms), buffer descriptor, skinning bone hashes (+0x98/+0xa0), region records (+0xa8/+0xb0), the+0xb8metadata hash table (slots0..3bone hashes, slot4+0xc8style preset hash, slot5+0xccpart class hash mapped viaPART_CLASS_NAMES), strand totals (+0xd0), and+0xe8..+0x10fIEEE 754float16style parameters (strand width, longest guide, braid parameter, and two 6-half-float curl/frizz blocks), plus the0xA0-byte GPU buffer offset table.smh_gen_1_CS_InterpolateStrandsClass 0 RNG (4-attempt triangle selection with 256-bit region mask and IEEE 754 float32 density thresholds,v_mad_u32_u24barycentric cascade, and PCG length variation) plus rest-pose barycentric guide blending and segment trimming.census(includingpartClassHistogram, distinct style preset counts, and unset rig-float counts)..glb) exporter supportingtubes(3-sided tapered tubes),ribbons(flat tapered strips),curves(LINES, mode 1), andline-strip(LINE_STRIP, mode 3), with RAGE Z-up to glTF Y-up conversion.inspect,census,export-glb.tests/test_smh_groom.py:+0xb8metadata hash slots &PART_CLASS_NAMES,+0x48..+0x70unset child-rig float sentinel detection,+0xe8..+0x110half-float style parameters (including NaN and short-page handling), GPU header/array/tail parsing, multi-chunk native resource scanning, contiguous & split LOD chain grouping, bit-exactmul24/pcg/scatterRNG against an independent scalar reference, region-0 non-culling, barycentric interpolation & tip-repeating length trimming, GLB validity across all 4 geometry modes viaglb_writer.read_glb_summary(), error handling on truncated/corrupt inputs, and end-to-endpython -ICLI execution.docs/strand_grooms.md:smh_pose_*,smh_sim_*,smh_gen_*,smh_draw_64/smh_draw_128,VS_HairStrandGeometry/PS_HairStrandVBuffer), clarifying class 0 vs. class 1 placement semantics, the0x150-byte per-instancet71record, thesmh_gen_Nvariant bitmask, system-page+0xb8metadata hashes,+0x50..+0x6funset float sentinels,+0xe8half-float style parameters, standing-height / head-sphere calibration, bone-based face/scalp discrimination, split-chain archive structure, Class 0 RNG algorithm, exact vs. modelled/open matrix, CLI reference, and aggregate corpus census.Corpus Verification (Read-Only, Local Package)
Verified read-only with
python -I tools/smh_groom.py censuson localpacks.rpfandpack/core_restofworld/core_restofworld.rpf:packs.rpf(5,741 assets) and 36 incore_restofworld.rpf(10 assets), totaling 5,751 logical groom assets and 902,456,856 bytes of GPU asset buffers.tri_count[:, 0]sum matches system+0xd0in 5,716 / 5,751 LOD 0 assets) and 35,365,208 class 1 strands (tri_count[:, 1]sum matches+0xd4in 3,158 / 5,751 LOD 0 assets).packs.rpfassets: 425 distinct+0xc8style preset hashes, 30 distinct+0xccpart class hashes (11 mapped across 9 named classes + 19 unmapped), and 2,457 assets with unset+0x50..+0x6fsecondary bounds floats.Tests Run (Windows, Python 3.14.7, CPU / stdlib only)
python -I scripts/check_no_game_data.py— PASSpython -I scripts/check_no_game_data.py tools/smh_groom.py tests/test_smh_groom.py docs/strand_grooms.md— PASSpython -m compileall -q make_game.py tools tests— PASSpython -I tests/test_smh_groom.py -v— 18/18 PASSpython -I tests/test_tool_startup.py— 2/2 PASSpython -I tests/test_tool_stdout_encoding.py— 4/4 PASSpython -I tests/test_docs_cli_flags.py— 3/3 PASSpython -I tests/test_docs_design_rows.py— 2/2 PASSpython -I tests/test_docs_links.py— 6/6 PASSpython -I tests/test_docs_list_items.py— 2/2 PASSpython -I tests/test_docs_python_deps.py— 3/3 PASSpython -I tests/test_docs_repo_paths.py— 2/2 PASSpython -I tests/test_docs_table_rows.py— 2/2 PASS