A trimmed fork of d4rkAvatarOptimizer by d4rkpl4y3r that keeps only the parts that measurably made avatars run faster: FX layer merging and cleanup, plus a few small extras that also run on upload (unused component removal, phys bone auto disable and same ratio blend shape merging).
Standalone benchmarks (built through the real VRCFury upload pipeline and measured in a standalone player) showed:
So everything except the FX layer work is permanently off. This also removes most of the overlap with VRCFury (mesh lock-in, SPS, material rewriting).
Synthos FX Optimizer component to your avatar. This can be on any transform.Global settings are under Tools/Synthos/FX Optimizer Settings.
With VRCFury the optimizer also runs when you enter play mode, on every avatar in the scene. Each avatar adds its optimization time to entering play mode, so disable avatars you aren’t testing if that gets slow, or turn off Optimize in Play Mode in the global settings.
Add the Synthos VPM listing to VCC and add Synthos FX Optimizer to your project. It can be installed next to the original d4rkAvatarOptimizer, but don’t put both components on the same avatar.
Automatically applies the optimizer to the avatar before uploading it to VRChat. This is non destructive.
Deletes useless layers and merges toggle layers into a direct blend tree.
Toggles are layers that:
if & if not, int greater x & less x + 1 or float greater x & less x.A toggle on a bool that is only ever 0 or 1 (a bool expression parameter or none, nothing animates it and parameter drivers only set it to 0 or 1) whose off state is empty goes into the merged layer as just its on animation, weighted by the bool. While the bool is 0 the layers below show through, like they did through the empty state. That skips a 1D blend tree and an animation per toggle, which made the merged layer ~40% cheaper with 100 such toggles.
Layers are never merged when they are additive or have an avatar mask while animating transforms or muscles. Layers that animate transform rotations (rotations blend differently inside blend trees) are only merged when they have a single state whose animation never changes over time.
Layers that animate the same properties as other layers can be merged as long as the merged layer can be placed so that every shared property keeps the same winner. Two merged layers never animate the same property: of two candidates that do, the one that shares properties with more of the other candidates stays a normal layer (on a tie the later one). Curves on objects, components or blend shapes that don’t exist don’t count as shared.
Animations that don’t change over time get a length of 0 in the merged tree, so they don’t change its timing. Only one merged layer may have animations that change over time, so it keeps playing at its own speed.
Multi toggles are layers that:
State selectors are other layers whose state only depends on the current value of one parameter, like AnyState menus, layers where every state transitions to every other state, and Entry-Exit layers (Entry picks a state, every state goes to Exit when its condition stops being true). They become a 1D blend tree on that parameter when:
Conditions on constant parameters don’t count as a parameter: they are checked with the value the parameter always has. A parameter is constant when it isn’t an expression parameter or a VRChat parameter, and no animation, parameter driver, phys bone or contact sets it. VRCFury sliders use one as an always true value (Entry -> Off -> On while it isn’t 0), so they select their On state.
A state with motion time (a slider) can be merged when it’s the only state the layer selects and every curve of its clip is a straight line between its keys. It becomes a 1D blend tree on the motion time parameter with a sample at every key, which is exact. Clips with eased or stepped curves are kept, since a blend tree can only blend linearly between samples.
Removes parameters that aren’t used by any transition, blend tree, state, parameter driver or audio behaviour from the generated controller.
Adds curves that turn off phys bones that are used by only one SkinnedMeshRenderer whenever that renderer is toggled off.
Merges blend shapes that always get animated in the same ratio. For example if one animation sets A to 100 and B to 50 and another sets A to 50 and B to 25, A and B get merged in a 2:1 ratio.
Keeps blend shapes used by MMD animations and stops FX layers 0, 1 & 2 from being deleted or merged, as MMD worlds use them.
Any transform in this list (and everything below it) is left untouched.
Shows which FX layers can be deleted or merged, using the VRChat rank icons:
Show Detailed Errors lists why a layer was rejected. This preview can be wrong with VRCFury or Modular Avatar, since they change the avatar at build time.
After each upload the inspector shows what the optimizer actually did to the built avatar: FX layers, FX parameters and blend shapes before and after, how many phys bones got auto disabled and how many unused components were deleted. The same line is written to the log file. With VRCFury or Modular Avatar this is the number to trust, not the preview.
The optimizer runs after VRCFury and rewrites the FX controller VRCFury generated. The VRCFury developer does not support avatars that use d4rkAvatarOptimizer. If a toggle breaks, turn this optimizer off and test again before reporting it to VRCFury, and mention that you use it if the bug only happens with it on.
Open the settings on the component and click the open folder button. That opens the trash bin folder with a _TrashBin.zip that holds the generated controllers and the _SynthosFxOptimizer.log. Attach it to an issue on this repo’s issue tracker. Don’t report issues with this fork to d4rkpl4y3r.
Based on d4rkAvatarOptimizer by d4rkpl4y3r, licensed under MIT. This fork is also MIT; see LICENSE.
com.synthos.fx-optimizer
未設定
1.1.0 (変更履歴)
2022.3 以降
なし
なし
未設定
Synthos