Skip to content

Conference: you look the same to yourself as to everyone; pick a look from the relay's catalog - #955

Merged
transfix merged 3 commits into
masterfrom
feat/conf-avatar-looks
Nov 1, 2026
Merged

transfix merged 3 commits into
masterfrom
feat/conf-avatar-looks

Conversation

@transfix

@transfix transfix commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Everyone now sees an avatar the same way, its owner included, and the look can be picked from a catalog the relay supplies.

Before: a client drew its own avatar gold and everyone else in a hue derived from their pid, so nobody saw themselves as others did.

What changes

Catalog (room_avatar.h).

  • The relay seeds conf.rooms.<room>.avatars:
    • Colours: Automatic (the pid's hue, the default) and ten named ones.
    • Accessories: None (the default), Cap, Top hat, Antenna, Crest, Halo, Backpack. Each is a few box or sphere parts posed from the feet and tinted like the body, the visor, or a fixed colour.
  • Only the relay writes the catalog.

Choice.

  • A participant writes its pick to its own participants.<pid>.avatar.{color, accessory}. The write gate already allows that path, and nothing else may write it.
  • resolve_avatar_look turns a pick into what is drawn. A pick the catalog lacks draws as the default.

Cosmetic only.

  • Parts must fit an envelope: the 0.5 x 0.5 x 1.7 m body grown 0.15 m sideways and 0.3 m up, at most six parts. Others are dropped.
  • The physics body is unchanged and the same for everyone.

Rendering (room_view).

  • Every pid's look is resolved the same way, including the viewer's own.
  • Choices are re-read a few times a second, as names are, and a changed look rebuilds the marker.
  • avatar_look() reports what a marker was built with.

Verbs.

  • (room-avatar-options ROOM KIND): the labels on offer.
  • (room-avatar HANDLE): my current look.
  • (room-set-avatar HANDLE COLOR ACCESSORY): takes ids or labels, and refuses what the catalog lacks.

Document. conference_roster.ari gets a My Avatar window (Colour and Wear pickers, also on the View menu). Its on_tick fills the pickers once the catalog arrives and writes a changed pick.

  • Trap found while testing: state-get returns nil for an unset key, which compares unequal to "". The pickers' state is now seeded to "" at join.

arisrv seeds the catalog beside the scene and logs: seeded the avatar catalog for room 'standup' (11 colours, 7 accessories).

Testing

  • room_avatar_test (new, 5 tests): the catalog round trip, seeding once, resolution, the envelope, replication across three nodes, and the write gate.
  • cvcgl_room_view: two viewers draw A identically before and after A picks. The top hat sits on the body and goes when taken off.
  • room_intrinsics_test 15 and room_scene_test 15 pass.
  • End to end, native (Windows): a local arisrv and two arigl clients.
    • Alice picks Crimson + Top hat through the document's own on_tick.
    • Her own snapshot and Bob's both show her in crimson with the hat, and Bob in his automatic colour.
    • A probe over gRPC confirmed the catalog arrives, room-avatar reports the defaults, and room-set-avatar accepts labels and reads back.
  • room_avatar.cpp, room_intrinsics.cpp and room_view.cpp compile under emcc with the browser build's flags.
  • Not run in a browser yet.

Deploying

Deploying needs both a new relay (it supplies the catalog) and the new page. Against an old relay, the pickers stay empty and everyone draws in their automatic colour.

Next

User-supplied avatars with their own physics, bounded by size and an energy budget. The design is under discussion.

Fix (20a07e7)

The Colour and Wear pickers' options were empty.

  • Why: a widget's expression may only call pure functions, so options: (room-avatar-options ...) never evaluated. The end-to-end test picked through on_tick and missed it.
  • Fix: on_tick now publishes the catalog's labels newline-joined, and the combos split them, as the device pickers do.
  • Checked: a native snapshot shows both pickers filled ("Automatic", "None"), with no document warnings.

… from the relay's catalog

A client used to draw its own avatar gold and everyone else in a hue derived from their pid, so
nobody saw themselves as others saw them. Every avatar is now drawn from the room tree, the
viewer's own included, and the look can be picked.

- room_avatar.h: the relay seeds conf.rooms.<room>.avatars, a catalog of what avatars may look
  like:
  - colours: Automatic (the pid's hue, the default) and ten named ones;
  - accessories: None (the default), Cap, Top hat, Antenna, Crest, Halo, Backpack, each a few box
    or sphere parts posed from the feet and tinted like the body, the visor, or a fixed colour.
- A participant writes its pick to its own participant.<pid>.avatar.{color, accessory}. The write
  gate already allows that path and nothing else may write it; only the relay writes the catalog.
- resolve_avatar_look turns a pick into what is drawn. A pick the catalog does not offer draws as
  the default. Parts reaching outside an envelope (the 0.5 x 0.5 x 1.7 m body grown 0.15 m
  sideways and 0.3 m up), and parts past six, are dropped: what an avatar wears is cosmetic, and
  the physics body is the same for everyone.
- room_view resolves every pid's look the same way, re-reads choices a few times a second (as it
  does names), and rebuilds a marker when its look changes. avatar_look() reports what a marker
  was built with.
- New verbs: (room-avatar-options ROOM KIND), (room-avatar HANDLE) and
  (room-set-avatar HANDLE COLOR ACCESSORY), the last refusing what the catalog lacks.
- conference_roster.ari: a My Avatar window (Colour and Wear pickers, also on the View menu). Its
  on_tick shows the current look once the catalog arrives and writes a changed pick.
- arisrv seeds the catalog beside the scene.

Tests:
- room_avatar_test: the catalog round trip, seeding once, resolution, the envelope, replication
  across three nodes, and the write gate.
- cvcgl_room_view: two viewers draw A identically before and after A picks; the hat sits on the
  body and goes when taken off.
A widget's expression may only call pure functions, so the combos' options
(room-avatar-options) never evaluated and the Colour and Wear lists were empty; the earlier test
picked through on_tick and did not see it. on_tick now publishes the catalog's labels
newline-joined (avatar.colors, avatar.accessories) and the combos split them, as the device
pickers do; each picker shows once its list has arrived.
on_tick rewrote avatar.colors and avatar.accessories every tick. A list rewritten each tick is
re-read every frame, and a picker that drops out for a frame closes its open popup: in the
browser the Colour and Wear popups did not open, while the device pickers, written once, did.
Compare and write on change, which also spares the per-tick write.
@transfix
transfix enabled auto-merge (squash) November 1, 2026 06:33
@transfix
transfix merged commit ae58f68 into master Nov 1, 2026
27 checks passed
@transfix
transfix deleted the feat/conf-avatar-looks branch November 1, 2026 07:07
transfix added a commit that referenced this pull request Nov 1, 2026
#955 landed as a squash, so this branch's copy of it (through 4f3731d) is merged with master taking
4f3731d as the base: master brings #953 and #954, and the branch keeps the energy budget and the
Avatar window on top.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant