Restrict Mipmap Streaming Priority for Worlds as well
DarkSwordsman
There is a new beta feature that introduces mipmap streaming. This allows Unity to unload higher resolutions of textures incase you run out of VRAM (or if you exceed the configured budget).
This is beneficial, since it allows it to unload textures it doesn't need, similar to how LODs work for meshes.
The "priority" feature allows you to override the mipmap level. For example, if you set the priority to "1", it will prioritize those textures and lower others until the budget is met. For Avatars, this is disabled and defaults to "0" to prevent abuse.
From the Unity documentation:
> Unity removes a mipmap level of a lower-priority texture every time it considers textures at that priority or higher. For example, if you set one texture to a Priority of 1 and another texture to a Priority of 5, Unity might remove four mipmap levels [of a lower-priority texture] before it considers the second texture.
Earlier today, I found that someone made a script that not only allows you to automatically enable mipmap streaming on all of your world's textures (good), it also sets their priority to
1
(not good). I hope I don't really need to explain why that's a bad thing. But basically: If the World is set to priority 1, it will bias ALL world textures before it makes adjustments to avatars.
As an extreme example: If you have 6 GB of VRAM and the world uses 3 GB, that means you have a 3 GB budget for avatars. If you have 80 avatars at 100 MB each, that means it will drop all those avatars down until it fits into the budget. Given the rule of 1/4 (where each drop in resolution is 1/4 the size of the previous higher res), it means we'd need to drop the avatars down by 1 resolution step from where they are intended to be. Now imagine all of the unoptimized avatars that have 200-500 MB+ of texture memory, not including mesh memory or other VRAM usage.
If all of the priorities were set to "0", mipmap streaming would work as intended, regardless of the scenario or context. It would load the higher resolutions if you are closer to an object, and unload further away ones.
Please consider disabling priority to be managed by creators for worlds as well, and set the default of all to 0.
Log In
Ivaj15
As a world creator, I prioritize optimizing textures and managing their size to maintain high-quality visuals. I’m concerned about the potential impact of resource-heavy avatars lowering the overall resolution of the environment. Instead of enforcing strict limits on world design, creators should have the freedom to determine the appearance and performance of their maps.
I’ve always been mindful of memory usage and appreciate having the flexibility to set priorities for better optimization. Including a clear notice in the SDK explaining how mip streaming works could help creators make more informed decisions.
Honzackcz
Perhaps SDK could have some component were world creator can put some textures, so VRC knows that these are more important and try to assign priory more consistently across worlds based on more factors like VRAM budget, texture sizes, etc. This way worlds can be forced to 0 priority as well.
DarkSwordsman
I guess I didn't really explain another concept:
If someone were to set that number to 5, 10, or the max of 128, it means that avatars get
that many more steps
lower quality, multiplied by however many textures there are in that world. So this really has a significant opportunity for unintentional abuse.I think a compromise could be to only allow "0 or 1" as values so people can still use the priority for artistic intent. But otherwise, I see no point in allowing people to change the priority of textures.