secondlife / viewer

🖥️ Second Life's official client
GNU Lesser General Public License v2.1
211 stars 53 forks source link

Material with BoM textures on one avatar interferes with same Material on other avatars. #2570

Open canny[bot] opened 1 month ago

canny[bot] commented 1 month ago

Environment: Second Life 7.0.1.6894459864 - GLTF Material Import thru DeltaFPS - 7.1.10.10800445603 on Windows or Mac.

Repro:

  1. User A, Create a material. Edit the Base Color texture, in the texture picker change the source drop down from Inventory to Bake, then change the bake texture drop down to BAKED_HEAD.
  2. User A. Apply the material to a box, then give a copy of the box to User B.
  3. User A, wear the Gabriel outfit from the Library, then attach the box with the bake material to your head.
  4. User B, wear the Elizabeth outfit from the Library, then attach the box with the bake material to your head.
  5. Both users. Zoom in and out on both avatars.

Observed: Sometimes you will see your own head texture on the other avatar, and vice versa.

https://github.com/user-attachments/assets/70ca0c8d-9181-48b5-9587-8c785c815544

Expected: Should only see your face on your head, and their face on their head.


Original report follows: Been testing this and its a SEVERE bug you need to handle.

To reproduce

1 - Create a material. Put a ANY BAKED BOM TEXTURE (i.e. UPPER) on the BASE color slot.

2 - Create a box. Apply material to it.

3 - Pick up the box. Give it to other avatars.

4 - Avatars wear it.

Result

The attachment on AGENT A shows baked texture on AGENT B and vice versa. Keeps changing when zooming in and out, or if any of the agents rebakes his maps or reattaches anything.

Found this happening on my avatars after updating them to BoM. But after a simple test the bug is super easy to reproduce.

https://secondlife.canny.io/admin/board/bug-reports/p/material-with-bom-textures-on-one-avatar-interferes-with-same-material-on-other

canny[bot] commented 1 month ago

This issue has been linked to a Canny post: Material with BoM textures on one avatar interferes with same Material on other avatars. :tada:

akleshchev commented 1 month ago

Viewer gets materials by Id, if two avatars use same material, first avatar to load would initialize material with correct BoM, second avatar will just load the ready materials. Any ideas how to handle this? Store avatar specific materials in avatars as a copy?