diff options
| author | yum <yum.food.vr@gmail.com> | 2023-05-09 00:06:46 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-05-09 00:06:46 -0700 |
| commit | aec43ecd11e8ef84fe4f5f5fcca9578dbde59469 (patch) | |
| tree | a3f4d07fe96195fbc1b391148b8fa90375378b36 | |
| parent | 1f2e5c6cf16e7e7a8d7d737ff86fdd7d89c2d9d9 (diff) | |
Fix noop animations on current creator companion buildv0.11.3
See comment for details.
* Update README
| -rw-r--r-- | README.md | 26 | ||||
| -rw-r--r-- | Scripts/libunity.py | 35 |
2 files changed, 38 insertions, 23 deletions
@@ -35,6 +35,17 @@ Basic controls: * Long click to hide the text box. * Scale it up/down in the radial menu. +## Design philosophy + +* All language services are performed on the client. No network hops in the + critical path. +* Priorities (descending order): reliability, latency, accuracy, performance, + aesthetics. +* No telemetry of any kind in the app. github and discord are the only means I + have to estimate usage and triage bugs. +* Permissive licensing. Users should be legally entitled to hack, extend, + relicense, and profit from this codebase. + ## Features * Works with the built-in chatbox (usable with public avatars!) @@ -73,25 +84,14 @@ Basic controls: System requirements: -* ~8GB disk space - * I apologize that this is so big. The libraries used to perform - GPU-accelerated transcription (pytorch and whisper) are really, - really big. There is no performant implementation of Whisper or a - any other comparable algorithm available in a systems programming - language, so for now we're stuck with this. You only need to - download this stuff once! +* ~2GB disk space * NVIDIA GPU with at least 2GB of spare VRAM. * You *can* run it in CPU mode, but it's really slow and lags you a lot more, so I wouldn't recommend it. - * I've tested on a 1080 Ti and a 3090 and saw comparable performance. + * I've tested on a 1080 Ti and a 3090 and saw comparable latency. * SteamVR. - * No Oculus support, yet. -* Left joystick click must not be bound to anything else. * No write defaults on your avatar if you're using the custom text box. -For the last 3 bullets: please let me know in the Discord if these are -deal breakers. I'd be happy to fix them! - Avatar resources used: * Tris: 4 diff --git a/Scripts/libunity.py b/Scripts/libunity.py index 9ab0f19..e94765d 100644 --- a/Scripts/libunity.py +++ b/Scripts/libunity.py @@ -962,17 +962,32 @@ class UnityAnimator(): motion = node.mapping['AnimatorState'].mapping['m_Motion'] replace = False - if "fileID" in motion.mapping.keys() and \ - motion.mapping["fileID"] != "0": - continue - - if "guid" in motion.mapping.keys() and \ - motion.mapping["guid"] in guid_map: - continue + name = node.mapping['AnimatorState'].mapping['m_Name'] + anchor = node.anchor - motion.mapping["fileID"] = "7400000" - motion.mapping["guid"] = noop_anim_meta.guid - motion.mapping["type"] = "2" + # As of 8 May 2023, idle states look like this: + # m_Motion: {fileID: 7400000, guid: e5881c5b0c09be854b0fd6fd8144333f, type: 2} + # Before that, they looked like this: + # m_Motion: {fileID: 0} + # The first predicate looks for the new pattern. + # The second predicate looks for the second pattern. + if "fileID" in motion.mapping.keys() and \ + "guid" in motion.mapping.keys() and \ + not motion.mapping["guid"] in guid_map: + motion.mapping["fileID"] = "7400000" + print(f"Set noop animation to guid {noop_anim_meta.guid} in state {node.anchor}") + motion.mapping["guid"] = noop_anim_meta.guid + motion.mapping["type"] = "2" + elif not ("fileID" in motion.mapping.keys() and + motion.mapping["fileID"] != "0") and not ("guid" in + motion.mapping.keys() and motion.mapping["guid"] in + guid_map): + motion.mapping["fileID"] = "7400000" + print(f"Set noop animation to guid {noop_anim_meta.guid} in state {node.anchor}") + motion.mapping["guid"] = noop_anim_meta.guid + motion.mapping["type"] = "2" + else: + print(f"Skipping state {anchor} / {name}") def unityYamlToString(nodes): lines = [] |
