Repository navigation
Conference: you look the same to yourself as to everyone; pick a look from the relay's catalog - #955
Merged
Merged
Conversation
… 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
enabled auto-merge (squash)
November 1, 2026 06:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).conf.rooms.<room>.avatars:Choice.
participants.<pid>.avatar.{color, accessory}. The write gate already allows that path, and nothing else may write it.resolve_avatar_lookturns a pick into what is drawn. A pick the catalog lacks draws as the default.Cosmetic only.
Rendering (
room_view).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.arigets a My Avatar window (Colour and Wear pickers, also on the View menu). Itson_tickfills the pickers once the catalog arrives and writes a changed pick.state-getreturns 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_test15 androom_scene_test15 pass.on_tick.room-avatarreports the defaults, androom-set-avataraccepts labels and reads back.room_avatar.cpp,room_intrinsics.cppandroom_view.cppcompile under emcc with the browser build's flags.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.
options: (room-avatar-options ...)never evaluated. The end-to-end test picked throughon_tickand missed it.on_ticknow publishes the catalog's labels newline-joined, and the combos split them, as the device pickers do.