Zones
This is a suggestion for performance optimization. It's a fairly big addition, but it would let you have a lot more users in the same room while keeping performance acceptable. It would mostly be useful for things like conferences.
Allow a Hubs "room" to be broken up into zones. These zones would typically (though not necessarily) be based on the architecture of the space. For example, if you have a house where you can see the garage from the kitchen, and the kitchen from the living room, but not the garage from the living room, you would have three zones (all in the same Hubs "room"), and you would keep track of visibility between them.
Each zone could be required to be rectangular, or perhaps a convex polyhedron. That would allow you to do simple lightweight checks to quickly determine what zone a user is in. You would have a list of zone-to-zone visibility, and only render avatars and objects that are in a zone that is visible from the zone the user is currently in.
You could also use this as a basis for not sending audio to certain clients, which would reduce bandwidth and CPU usage. Clients would only receive audio for the zone they are in, or possibly from the zones that are visible from their current zone.
You could have zones that are not related to visibility, and are only used for culling the audio.
┆Issue is synchronized with this Jira Task
If you're aiming to keep the servers thin, most of the logic can be done in the client. It's easy enough for each client to figure out what zone it's in and what zone each of the other avatars is in, and consult a fixed table of zone-to-zone visibility to figure out which avatars to skip rendering.
For audio, the client can send a message to the audio server specifying which avatars they want to hear audio from. That eliminates the need for the audio server to do those calculations, and it would also make it easy to disable audio from far-away avatars.
The client wouldn't have to do this on every frame -- once every couple of seconds would be fine, and the actual calculations wouldn't be too bad (especially if each zone was just a bounding box).
This is an interesting concept that aligns with larger-scale virtual world system design. We've intentionally designed Hubs around the idea that rooms would be relatively small groups of people, but have reserved the concepts of a "hub" that can link rooms together in an efficient manner. I've changed this to a discussion since I think there are a lot of interesting considerations here. Thanks for kicking it off.