Perf: move remaining avatar motion-controller work off the CPU #257

Open
opened 2026-10-03 02:34:27 +00:00 by sky_line · 2 comments
Owner

Measured at a Baltimare party (85 avatars, 4K, 5090, FSR native AA, RT shadows): ~47-54 FPS, GPU ~20 ms ≈ CPU main ~21 ms (balanced).

GPU anim (clean_anim.comp) already samples keyframes, blends and walks the hierarchy. What's still CPU per avatar per frame: LLMotionController::updateMotions bookkeeping (activation, ease in/out, priorities), LLPoseBlender::addMotion + exportAndClear to build the export (~10%), keyframe onUpdate/applyKeyframes, procedural motions (physics, eye, head/target), idleUpdateMisc map walks. Avatar idleUpdate = ~30% of the main thread (4-6 ms).

Ideas: export only when the motion set/weights change (cache the per-avatar export, patch weights); evaluate ease/priority weights on GPU from per-motion start/stop times; distance-based update rate for far avatars (avDistAnimSkip exists — tune); GPU avatar physics; worker-thread motion updates per avatar.

Measured at a Baltimare party (85 avatars, 4K, 5090, FSR native AA, RT shadows): ~47-54 FPS, GPU ~20 ms ≈ CPU main ~21 ms (balanced). GPU anim (clean_anim.comp) already samples keyframes, blends and walks the hierarchy. What's still CPU per avatar per frame: LLMotionController::updateMotions bookkeeping (activation, ease in/out, priorities), LLPoseBlender::addMotion + exportAndClear to build the export (~10%), keyframe onUpdate/applyKeyframes, procedural motions (physics, eye, head/target), idleUpdateMisc map walks. Avatar idleUpdate = ~30% of the main thread (4-6 ms). Ideas: export only when the motion set/weights change (cache the per-avatar export, patch weights); evaluate ease/priority weights on GPU from per-motion start/stop times; distance-based update rate for far avatars (avDistAnimSkip exists — tune); GPU avatar physics; worker-thread motion updates per avatar.
sky_line added this to the Slipstream project 2026-10-06 15:04:14 +00:00
Author
Owner

Status 2026-10-10: the main CPU costs from this ticket are addressed -- incremental pose export for GPU-animated avatars (b8505513c1, RenderVKAnimIncremental; live log: "1533 incremental (99%), avg 12 us/frame"), distance-based animation rate (8e0ce9e523, RenderVKAvatarDistanceAnimRate: 30 FPS / 15 FPS by distance), reduced-tier avatars at RenderVKReducedAvatarAnimFPS 5, cached attachment points + empty dead-list skip (768faf4d17), addMotion find-before-emplace (5e556f6279), avatar physics caching (#328) and motion-visit counting (#334). Not done (optional further ideas): ease / priority weights on the GPU, GPU avatar physics, worker-thread motion updates. Needs a re-measure at a busy party (avatar idleUpdate share of the main thread, was ~30% / 4-6 ms) to close.

Status 2026-10-10: the main CPU costs from this ticket are addressed -- incremental pose export for GPU-animated avatars (b8505513c1, RenderVKAnimIncremental; live log: "1533 incremental (99%), avg 12 us/frame"), distance-based animation rate (8e0ce9e523, RenderVKAvatarDistanceAnimRate: 30 FPS / 15 FPS by distance), reduced-tier avatars at RenderVKReducedAvatarAnimFPS 5, cached attachment points + empty dead-list skip (768faf4d17), addMotion find-before-emplace (5e556f6279), avatar physics caching (#328) and motion-visit counting (#334). Not done (optional further ideas): ease / priority weights on the GPU, GPU avatar physics, worker-thread motion updates. Needs a re-measure at a busy party (avatar idleUpdate share of the main thread, was ~30% / 4-6 ms) to close.
Author
Owner

The main costs from this ticket shipped in 1.0.0 Beta 1 (incremental pose export, distance-based animation rate, cached attachment points). What is left is a re-measure at a busy party and the optional ideas (GPU ease and priority weights, GPU avatar physics, worker-thread motion updates). Moving to the backlog until that is picked up.

The main costs from this ticket shipped in 1.0.0 Beta 1 (incremental pose export, distance-based animation rate, cached attachment points). What is left is a re-measure at a busy party and the optional ideas (GPU ease and priority weights, GPU avatar physics, worker-thread motion updates). Moving to the backlog until that is picked up.
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#257
No description provided.