vircadia / vircadia-native-core

Vircadia open source agent-based metaverse ecosystem.
https://vircadia.com/
Other
531 stars 175 forks source link

Add "loadPriority" property to entities. #1672

Closed digisomni closed 2 years ago

digisomni commented 2 years ago

This property is a number from 1-255 (or whatever a good max integer is for the packet). This property is utilized by a client to determine which asset should be downloaded and loaded first.

Note: later we will want to add an LOD and/or renderPriority property to determine which entities should be rendered first and at what detail over other entities.

AleziaKurdis commented 2 years ago

"loadPriority", this is a good idea.

daleglass commented 2 years ago

It's an interesting idea, but how is this supposed to be used? How does it interact with the avatar's position? And does it really need a bunch of priority levels?

There also used to be a loading screen, it could be an alternative.

AleziaKurdis commented 2 years ago

This only indicates which entities need to be started to load at first. (Nothing related to the avatar position) For example, your could set priority 1 to the model that is mainly used as the floor for a scene. (Of course you need to keep optimal your models, like keeping the texture non embedded to accelerate the availability of the geometry where you will stand on) The loading screen is not working fine in my opinion. Waiting long while the essential of a scene would be already there this is poor... Like the Hub that would takes an eternity to fully load... or the Overte hub that has that bridge that take 2 minutes to load while everthing else is all loaded.

Possible also that if this is built optimal, that such a priority is overkill. If there is any performance cost, I would not go ahead with it.

daleglass commented 2 years ago

I mean, what you want to load first might depend on where you are. Prioritizing the floor makes sense to me, but I'm not sure if having a large number of priorities will be very useful. I think just a single "priority bit" might do the trick.

AleziaKurdis commented 2 years ago

We have already many things to help optimization. I wonder if people simply use them or if those are not just too advanced for most of the users. Before add another one, maybe we can start by just explaining those tricks. If we don't have this documented, newbe might takes a lot of time before figure those good practices.

digisomni commented 2 years ago

A list of priorities is needed similar to z-index so that complex worlds can be layered appropriately. A simple toggle would mean that it's impossible to prioritize a scene with more than a handful of items as everything becomes either "important" and "unimportant".

digisomni commented 2 years ago

Closed in favor of https://github.com/vircadia/vircadia/issues/1709