#1131 System avatar bodies: keep the shown bake and the grey stand-in whatever the loading setting; log why parts are skipped #1169

Closed
TheSlowly wants to merge 2 commits from TheSlowly/Slipstream:sysavatar-body-1131 into main
Collaborator

Refs #1131: avatars in system bodies showed only their attachments with "Show system avatar bodies" on.

Rebased onto main's loading stand-ins (#1206), which stay as they are. The whole-avatar gate is main's.

  • Keeping the bake a part already shows no longer depends on RenderVKDrawLoadingAvatars. With that setting off, an outfit change made the body blink.
  • Grey for no bake: a fully loaded avatar with no bake pixels gets main's grey on its opaque parts. A failed fetch goes grey at once, otherwise after 10 s. A part that was grey while loading no longer drops out when loading finishes. Hair, eyelashes, the skirt and alpha / BOM-hidden parts stay hidden.
  • Logging: every skip path has a reason, and the stand-in counts as its own state. Other avatars with a part missing for no known reason get a rate-limited #1131 VKSysAvatar line, including the bake's fetch state.

Left as Refs: the reporter's log (every part on all three avatars, no bodies drawn all session) may point at a whole-avatar cause, and the new lines will name it.

Refs #1131: avatars in system bodies showed only their attachments with "Show system avatar bodies" on. Rebased onto main's loading stand-ins (#1206), which stay as they are. The whole-avatar gate is main's. - **Keeping the bake a part already shows** no longer depends on RenderVKDrawLoadingAvatars. With that setting off, an outfit change made the body blink. - **Grey for no bake:** a fully loaded avatar with no bake pixels gets main's grey on its opaque parts. A failed fetch goes grey at once, otherwise after 10 s. A part that was grey while loading no longer drops out when loading finishes. Hair, eyelashes, the skirt and alpha / BOM-hidden parts stay hidden. - **Logging:** every skip path has a reason, and the stand-in counts as its own state. Other avatars with a part missing for no known reason get a rate-limited `#1131` VKSysAvatar line, including the bake's fetch state. Left as Refs: the reporter's log (every part on all three avatars, no bodies drawn all session) may point at a whole-avatar cause, and the new lines will name it.
The #461 per-part reasons were logged for self only, so a report of another
avatar's system body not rezzing said nothing about why. Now:

- Every skip path has its own reason: no LOD mesh, shared geometry not
  captured, no reference mesh, morph stream not uploaded, no skin (buildSkin
  failing used to hide every part silently) and bake undefined (split from
  bake invisible).
- VKSysAvatar "#1131" lines for other avatars: a part skipped for a reason
  the avatar's own data doesn't explain (not alpha / BOM / no skirt) for 30 s,
  each part's reason and, for a bake not ready, its fetch state; an avatar in
  view that is still not fully loaded after 120 s; and when such a state
  clears. Once per avatar and state, at most 8 lines every 10 s.
  RenderVKBakeDiag also lists avatars hidden entirely by alpha / BOM.
LL's avatar code keeps the previous bake on the body meshes until a new one is decoded
(updateMeshTextures / useBakedTexture), and for good if its fetch fails; the GL renderer
drew that. The VK system body read the avatar's current bake slot instead and hid the part
until it had pixels: an outfit change, a bake only fetched once the avatar is in view, or a
failed bake fetch left the avatar with its attachments only.

When the current bake isn't drawable (and not in appearance editing), use the body mesh's
texture (LLAvatarJointMesh::getTexture, new) if it is a real, decoded bake. Hitch counter
avSysPartsLastGoodBake.
The first bake failed or never arrived and there is no last good one: LL's drawShape bound
its default texture (the "grey avatar"); the VK body hid the part, attachments only. Opaque
parts (head, body, eyes) now draw untextured in grey -- at once for a failed fetch, after
10 s otherwise so a late bake doesn't flash. Hair / eyelashes / skirt stay hidden (alpha
cards). Logged as "drawn grey" (#1131 lines, with the bake's fetch state); hitch counter
avSysPartsGrey.
Owner

Review (Sky + Claude): changes requested — needs a rebase onto current main before it can merge.

Blocker: main has since gained the loading-avatar stand-ins and a last-material fallback (#1206; 1b880b8532, 77acda07b4, 0eafe909ee). The first commit conflicts in llcleansysavatar.cpp, and the PR's whole-avatar gate (:661) still requires isFullyLoaded() and hides every part otherwise, so taking it as is would discard the shipped stand-in behaviour.

What it needs: rebase while keeping RenderVKDrawLoadingAvatars, the loading visibility, per-part stand-in policy/tint, the retained material/instance lifetimes, alpha/BOM visibility and the soft store-failure paths. Then decide whether LL's retained joint texture adds coverage beyond main's retained material id; keep your new reason diagnostics either way (they're useful). Don't bypass isTextureVisible / hidden-part rules.

The GPU-side approach itself looks fine (no new per-part CPU draws; the diagnostic map is bounded). No naming issues.

Review (Sky + Claude): **changes requested** — needs a rebase onto current main before it can merge. **Blocker:** main has since gained the loading-avatar stand-ins and a last-material fallback (#1206; `1b880b8532`, `77acda07b4`, `0eafe909ee`). The first commit conflicts in `llcleansysavatar.cpp`, and the PR's whole-avatar gate (`:661`) still requires `isFullyLoaded()` and hides every part otherwise, so taking it as is would discard the shipped stand-in behaviour. **What it needs:** rebase while keeping `RenderVKDrawLoadingAvatars`, the loading visibility, per-part stand-in policy/tint, the retained material/instance lifetimes, alpha/BOM visibility and the soft store-failure paths. Then decide whether LL's retained joint texture adds coverage beyond main's retained material id; keep your new reason diagnostics either way (they're useful). Don't bypass `isTextureVisible` / hidden-part rules. The GPU-side approach itself looks fine (no new per-part CPU draws; the diagnostic map is bounded). No naming issues.
TheSlowly force-pushed sysavatar-body-1131 from afeaf93018 to 65de9fd472 2026-10-29 03:18:19 +00:00 Compare
TheSlowly changed title from #1131 System avatar bodies: draw the last good bake, or grey, instead of hiding; log why parts are skipped to #1131 System avatar bodies: keep the shown bake and the grey stand-in whatever the loading setting; log why parts are skipped 2026-10-29 03:18:39 +00:00
Author
Collaborator

Rebased onto current main as two commits (65de9fd472), and the description is updated.

  • #1206's stand-ins, the loading setting and its checkbox are untouched; the whole-avatar gate is main's.
  • 1/2 keeps the reason diagnostics, now aware of the stand-in: a grey part is its own state, and its fetch state is logged.
  • 2/2: keeping the bake a part already shows no longer depends on RenderVKDrawLoadingAvatars (an outfit change blinked with it off). A fully loaded avatar with no bake pixels gets the same grey, at once for a failed fetch or after 10 s, so the stand-in no longer drops out between loading and loaded.
  • Dropped: the joint-mesh texture fallback. With main's retained material it only covered parts that were hidden while their new bake was pending.

The rebased version isn't tested in-world yet; I'll confirm here.

Rebased onto current main as two commits (65de9fd472), and the description is updated. - #1206's stand-ins, the loading setting and its checkbox are untouched; the whole-avatar gate is main's. - **1/2** keeps the reason diagnostics, now aware of the stand-in: a grey part is its own state, and its fetch state is logged. - **2/2:** keeping the bake a part already shows no longer depends on RenderVKDrawLoadingAvatars (an outfit change blinked with it off). A fully loaded avatar with no bake pixels gets the same grey, at once for a failed fetch or after 10 s, so the stand-in no longer drops out between loading and loaded. - **Dropped:** the joint-mesh texture fallback. With main's retained material it only covered parts that were hidden while their new bake was pending. The rebased version isn't tested in-world yet; I'll confirm here.
Author
Collaborator

On main by cherry-pick as ff5630e063, 8292d426e1. Closing.

On main by cherry-pick as ff5630e063, 8292d426e1. Closing.
TheSlowly closed this pull request 2026-10-29 17:36:29 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!1169
No description provided.