Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
135 stars 2 forks source link

In-Depth Avatar Culling #2278

Open Dusty-Sprinkles opened 4 months ago

Dusty-Sprinkles commented 4 months ago

Is your feature request related to a problem? Please describe.

Currently and probably for a very long time to come avatars will be a very large source of lag just because of UGC being UGC, so it would be nice to have some more meaningful culling options than the current user-created ones that simply hide the slot of the avatar so that resources can be saved on by not loading avatars entirely when they are culled.

As well as wanting to use less resources with more people most of the user-made culling systems fundamentally break things specific users may be doing if they happen to interact with components in their head proxy or similar so not having to use those would be nice.

Describe the solution you'd like

Some official way to hide avatars and not actually load them into memory until some condition is met (usually distance/player cap) based for other platforms) that actually doesn't load the users avatar until then and can un-load it as well if they go out of range.

Describe alternatives you've considered

Using the existing culling systems

Additional Context

This may be a duplicate of #428, but I noticed it was slightly more than just avatar culling which might have made it get passed over, so I wanted to break that part off for consideration under the performance updates

Requesters

Venport, GrayBoltWolf (technically), probably anyone else who ever used the user made culling systems

shiftyscales commented 4 months ago

not actually load them into memory until some condition is met

This is in of itself a substantially larger request, as currently Resonite has no means of dynamically streaming assets into and out of memory, @Dusty-Sprinkles.

Likewise- it's not as simple as just not loading the avatar at all- because that avatar and its contents could be making adjustments to the datamodel/world around it, even if you are not directly in its proximity.

There are also other types of optimizations that could be considered, e.g. occlusion culling- which Resonite also currently has no native way of doing- this would ensure that mesh renderers that are occluded aren't being drawn. Currently Resonite only has frustum culling- meaning only objects that are not in the direction of the camera are not rendered.

Rate limiting for components would also help in that regard, e.g. users that are far away do not necessarily need their IK / other values updated at full fidelity/framerate.

Based on the solution you requested- it sounds like what you are asking for with this issue is asset streaming- as that seemed to be the primary focus of your request.

gameboycjp commented 4 months ago

A method for dynamic asset loading/asset streaming is something I'd also like to have. Could there be a general issue opened for it?