ChilloutCharles / BrainFlowsIntoVRChat

BrainFlow code that sends your brain's relaxation, focus metrics, and machine learned thought commands to vrchat avatar paramaters via OSC.
https://linktr.ee/ChilloutCharles
MIT License
209 stars 15 forks source link

Suggestions? Alternative boolean params to save space #3

Open Charmandrigo opened 5 months ago

Charmandrigo commented 5 months ago

Just a suggestion! Since it's not the first time I have dealt with running out of parameters memory, but I would like to suggest alternative osc parameters that use booleans instead of floats, which could be 4 per value

ex: the float osc_focus_left can be broken into 4 booleans to reduce the memory usage from 8 to just 4 bits. Booleans can go true for a certain threshold of a brain wave (10% > 25% > 50% > 85%). This in terms of usage on animators should make little to no difference since animations can smoothly transition with booleans going true.

Currently using all float values on this project takes 64 bits of the available custom parameters space, reducing it to 4 bools per metric, that would reduce its usage to 32 bits! Leaving enough space to add more parameters.

This is just a suggestion for those here who run multiple osc hardware! I also face track my avatars and gotta have all that sweet memory available to use all the hardware I have!

ChilloutCharles commented 5 months ago

It could be an idea, but right now its too early to implement this. Unlike with face and eye tracking, brain tracking is a lot more abstract, so its not ready to be put into a non human readable format. I also don't expect people to use all the provided parameters. Picking and choosing based on your needs, such as using focus left and right for ear movement will be best practice.

I do understand the need to compress this. As a face and eye track user, I too am running out of param space fast. But as it stands this project isn't ready to be compressed quite yet. I'll keep this issue open as a future enhancement.