[rendering] Rigged BLAS refit: importance-based cadence + skip refit on near-unchanged poses #1007

Open
opened 2026-10-24 01:23:22 +00:00 by sky_line · 0 comments
Owner

Busy party (RTX 5090, 65 avatars traced): q_rt_build ~3.7 ms/frame on the async queue ahead of the lighting chain; c_blas_refit 2.04 ms = 115 of 130 rigged groups refit every frame (10k faces, 831 MB rigged BLAS); c_preskin 0.91 (shared with raster), c_tlas 0.26. Existing gating already exists ("gated 13 (held + moving 0)", "no-self-shadow (throttled) 27") but almost everything refits every frame.

1. Refit cadence by importance

  • Every frame: avatars within ~20 m of the camera, or on screen and large (projected size threshold), or casting visible RT shadows near the camera, plus your own avatar.
  • Mid range every 2nd frame, far every 4th; staggered (group id / phase) so the per-frame cost stays flat, not spiky.
  • GI and RT reflections tolerate 1-3 frames of staleness; distant avatars' RT shadows lagging ~50 ms is not visible.
  • Teleport / region change / an avatar appearing or its geometry changing: refit (or build) at once.
  • The TLAS instance transform still updates every frame (only the BLAS contents lag); make sure a skipped refit never leaves the BLAS reading skinned positions that were overwritten in place for raster (double-buffer or snapshot as the existing rigPos design requires).

2. Skip refit when the pose barely changed

  • Compare the skin palette (bone matrices) against the palette used at the group's last refit; under a threshold (max bone translation delta in metres / rotation in degrees, scaled by distance) skip the refit this frame. Idle / standing loops benefit; dancing avatars mostly won't.
  • Hard cap on consecutive skips (staleness bound).

Settings (live): cadence on/off (A/B = every frame), distance bands, pose threshold, max staleness. Stats: refits/frame, skipped by cadence, skipped by pose, max staleness. Expected: ~2.0 -> 0.7-0.9 ms in this scene.

Busy party (RTX 5090, 65 avatars traced): `q_rt_build` ~3.7 ms/frame on the async queue ahead of the lighting chain; `c_blas_refit` **2.04 ms** = 115 of 130 rigged groups refit every frame (10k faces, 831 MB rigged BLAS); `c_preskin` 0.91 (shared with raster), `c_tlas` 0.26. Existing gating already exists ("gated 13 (held + moving 0)", "no-self-shadow (throttled) 27") but almost everything refits every frame. **1. Refit cadence by importance** - Every frame: avatars within ~20 m of the camera, or on screen and large (projected size threshold), or casting visible RT shadows near the camera, plus your own avatar. - Mid range every 2nd frame, far every 4th; **staggered** (group id / phase) so the per-frame cost stays flat, not spiky. - GI and RT reflections tolerate 1-3 frames of staleness; distant avatars' RT shadows lagging ~50 ms is not visible. - Teleport / region change / an avatar appearing or its geometry changing: refit (or build) at once. - The TLAS instance transform still updates every frame (only the BLAS contents lag); make sure a skipped refit never leaves the BLAS reading skinned positions that were overwritten in place for raster (double-buffer or snapshot as the existing rigPos design requires). **2. Skip refit when the pose barely changed** - Compare the skin palette (bone matrices) against the palette used at the group's last refit; under a threshold (max bone translation delta in metres / rotation in degrees, scaled by distance) skip the refit this frame. Idle / standing loops benefit; dancing avatars mostly won't. - Hard cap on consecutive skips (staleness bound). Settings (live): cadence on/off (A/B = every frame), distance bands, pose threshold, max staleness. Stats: refits/frame, skipped by cadence, skipped by pose, max staleness. Expected: ~2.0 -> 0.7-0.9 ms in this scene.
sky_line added this to the Slipstream project 2026-10-24 01:23:22 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#1007
No description provided.