[1332] [BUG] VRCExpressionParameters fail to load correctly with more than 256 parameters
available in future release
HOBaRT
Recently, the SDK added the ability to add local parameters to an avatar's VRCExpressionParameters component. The SDK UI currently lets you place down more than 256 parameters, and is satisfied so long as you have at most 256 synced parameters.
I am making an avatar with 256 synced parameters, and 2 local parameters. So long as there are more than 256 parameters, the two local parameters do not respond on the radial menu, nor do they show up in the parameter list in the avatar debug overlay.
Additionally, I am doing bool->float casting in my FX animator (although I don't think this affects the behavior I'm seeing).
When things are loaded properly, the ExpressionParameters show up correctly as bools in the avatar debug overlay, but when they do not load correctly, they show up as floats like they are defined in the FX controller.
Log In
This post was marked as
available in future release
StormRel
tracked
StormRel
needs more information
StormRel
Hello! Thanks for reporting this.
Does this still occur in the latest beta (1433)?
Can you provide an example avatar and repro steps (which toggles aren't working)?
HOBaRT
StormRel Yes, I've checked on 1433 and it still happens.
I've made two avatars as an example. Both are the same, just a cube and a sphere.
This avatar has 256 parameters (254 synced bools, and 2 local bools): https://vrchat.com/home/avatar/avtr_0cd50cfc-1218-47b3-9d7c-43eabe06b1b8
The 255th bool toggles the cube, and the 256th bool toggles the sphere. They both work, and all the parameters show up in the ===Parameters=== section of the avatar debug overlay.
This avatar has 257 parameters (255 synced bools, and 2 local bools): https://vrchat.com/home/avatar/avtr_08f07e71-ea23-4840-9954-d749c5e6d131
The 256th bool is supposed to toggle the cube, and the 257th bool is supposed to toggle the sphere. Neither of them work, and none of the parameters show up in the the debug overlay.
Big Soulja
StormRel I can also confirm that this is still an issue and it defeats the whole purpose of having local only parameters.
Big Soulja
StormRel on open beta 1434 this issue still happens. the exact error in the VRChat log is "Error - [Behaviour] Unable to initialize stage parameters, defined parameters use more memory then allowed." It happens if there are more than 256 bits of parameters regardless of whether they are synced or not. This error appears in the log when loading into the avatar.
Big Soulja
Man this needs to get fixed
Dor․
Ran into this issue while making a "save" system without requiring OSC, by creating duplicate, saved but unsynced parameters and copying values to or from the duplicates I'd like to offer the option to save different clothing options, colors, etc, the goal was to have 3 of these save slots (60 parameters each), there are some parameters not included with the save but in total that brought me up to 278 parameters, testing with Av3Emulator everything works just fine, testing in game, whichever parameters happen to be sorted beyond 255 (or 256, I have not spent the time testing for the exact value) will not respond to menu toggles, in my case among those were the 2 unsaved, unsynced int parameters dictating which slot to save or load, meaning the system was completely nonfunctional in-game until I removed enough parameters, it also broke default value assignments for ALL parameters defined as expression parameters, using the default values defined in the animator instead.
This is likely caused by a fixed array size assignment of 255 (or byte.MaxValue) a fix should be as simple as changing that value or using a List type.
~EmberVR~
Dor․: whoa, did a smaller version of this exact thing on a recent avatar of mine and had plans to make a setup script to generalize/scale. I'm glad I didn't now cause this bug would've ruined my week...
Dor․
~EmberVR~: Yup, working on automating this with a tool as well, one of a few systems that will be part of that tool.
HOBaRT
With a little more testing, the limit for the ExpressionParameters loading correctly does indeed appear to be 256
parameters
.256
synced bits
plus some local parameters is ok, until you have more than 256 parameters
total. E.g. 249 synced parameters+8 local parameters is too much, but 249 synced parameters+7 local parameters is fine.(while theoretically I could get around this by using 16 synced integers instead of 256 synced bools, it would be much less performant and require a lot more work on the animator side.)
I hope this can be supported in the client, as again, the SDK currently lets you add more than 256 parameters just fine.