Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Optimization of bits required for synchronization time insensitive parameters #832

Open
LNight121 opened this issue Apr 20, 2024 · 0 comments

Comments

@LNight121
Copy link

Firstly, the definition of time insensitive parameters: for some parameters, users often do not need to synchronize them in real-time with other users (such as parameters representing clothing or hairstyles, or parameters of some small toys on the model). For these parameters, users often do not need real-time synchronization, as long as they ensure synchronization within 5 seconds(This number was written by me casually) to have a good experience. When the required bits for these variables are greater than 16, the following method can be used for bit wise optimization.
My method requires two real-time synchronized int parameters, one representing the "address" of a time insensitive parameter (represented by Atri in the following text), and the other representing the value of the variable corresponding to the "address" represented by Atri (represented by Vtri in the following text). In the animation, for the party where IsLocal parameter is true, use an animation with a circular structure to update the value of Atri and vtri to let Atri loop within the range of "address", and the value of the time insensitive parameter represented by Atri's value should be copied to Vtri. In the animation, for the party whose IsLocal parameter is false, copy the Vtri value to the corresponding time insensitive parameter when the Atri changes(Due to the need to compare all 256 possible values, there may be performance issues here).
The above is the general idea. I couldn't implement this on my own because I didn't have enough time. It would be great if modular avatar could implement this feature. This can save a lot of bits from the official 256 bits.
The following are the possible issues with this method, as it has not been tested in practice. All of the following are my guesses. 1. Low fps caused by excessive animation. 2. If the official value synchronization is not one-time, it will cause fatal errors when Atri's value is updated but Vtri does not.
Finally, I have an optimization for these animations, which involves using a binary tree format to avoid the performance overhead of comparing each value (0-255) at once (although I have not tested the effectiveness of this method).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant