Fix eye_unimpressed (arity 2; had only one JSON key)

- The "eye_unimpressed" morph had just one key in the emotion JSON, although the
  model has two morphs (left and right) for this. Now it has two, as it should.
- This change breaks backward compatibility for old emotion JSON files.
  - OTOH, not much of an issue, because in all versions prior to this one
    being developed, the emotion JSON system was underutilized (only a bunch
    of pre-made presets, only used internally by the live plugin).
  - Thus it is important to fix this now, before the next release, because the
    improved manual poser makes it easy to generate new emotion JSON files,
    so from the next release on we can assume those to exist in the wild.
This commit is contained in:
Juha Jeronen
2024-01-09 10:44:49 +02:00
parent 19b5c3c3d6
commit a794ad9dde
31 changed files with 95 additions and 73 deletions

View File

@@ -40,12 +40,6 @@
- Zigzag deformation
- Investigate if some particular emotions could use a small random per-frame oscillation applied to "iris_small",
for that anime "intense emotion" effect (since THA3 doesn't have a morph specifically for the specular reflections in the eyes).
- The "eye_unimpressed" morph has just one key in the emotion JSON, although the model has two morphs (left and right) for this.
- We should fix this, but it will break backward compatibility for old emotion JSON files.
- OTOH, maybe not much of an issue, because in all versions prior to this one being developed, the emotion JSON system
was underutilized anyway (only a bunch of pre-made presets, only used by the live plugin).
- All the more important to fix this now, before the next release, because the improved manual poser makes it easy to
generate new emotion JSON files, so from the next release on we can assume those to exist in the wild.
### Client-side bugs / missing features:

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.3585,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -66,7 +67,8 @@
"eye_surprised_right_index": 0.3585,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -112,7 +114,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 1.0,
"eye_raised_lower_eyelid_right_index": 1.0,
"iris_small_left_index": 0.698,
@@ -158,7 +161,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.3725,
"eye_raised_lower_eyelid_right_index": 0.401,
"iris_small_left_index": 0.6745,
@@ -333,7 +337,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.3585,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.3585,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 1.0,
"eye_raised_lower_eyelid_right_index": 1.0,
"iris_small_left_index": 0.698,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.3725,
"eye_raised_lower_eyelid_right_index": 0.401,
"iris_small_left_index": 0.6745,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.3945,
"eye_raised_lower_eyelid_right_index": 0.9,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.5475,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.5475,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.5475,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 1.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 1.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 1.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.216,
"eye_relaxed_right_index": 0.2315,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.3,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.0,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.284,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 0.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.6265,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -20,7 +20,8 @@
"eye_surprised_right_index": 1.0,
"eye_relaxed_left_index": 0.0,
"eye_relaxed_right_index": 0.0,
"eye_unimpressed": 0.0,
"eye_unimpressed_left_index": 0.0,
"eye_unimpressed_right_index": 0.0,
"eye_raised_lower_eyelid_left_index": 0.0,
"eye_raised_lower_eyelid_right_index": 0.0,
"iris_small_left_index": 0.6265,
@@ -45,4 +46,4 @@
"body_z_index": 0.0,
"breathing_index": 0.0
}
}
}

View File

@@ -25,10 +25,6 @@ logger = logging.getLogger(__name__)
# The keys for a pose in the emotion JSON files.
#
# TODO: "eye_unimpressed" is arity-2, but has only one entry in the JSON. The current implementation smashes both into one,
# letting the second one (right slider) win. Maybe the two values should be saved separately, but we have to avoid
# breaking the live mode served by `app.py`.
posedict_keys = ["eyebrow_troubled_left_index", "eyebrow_troubled_right_index",
"eyebrow_angry_left_index", "eyebrow_angry_right_index",
"eyebrow_lowered_left_index", "eyebrow_lowered_right_index",
@@ -39,7 +35,7 @@ posedict_keys = ["eyebrow_troubled_left_index", "eyebrow_troubled_right_index",
"eye_happy_wink_left_index", "eye_happy_wink_right_index",
"eye_surprised_left_index", "eye_surprised_right_index",
"eye_relaxed_left_index", "eye_relaxed_right_index",
"eye_unimpressed", "eye_unimpressed",
"eye_unimpressed_left_index", "eye_unimpressed_right_index",
"eye_raised_lower_eyelid_left_index", "eye_raised_lower_eyelid_right_index",
"iris_small_left_index", "iris_small_right_index",
"mouth_aaa_index",
@@ -59,7 +55,6 @@ posedict_keys = ["eyebrow_troubled_left_index", "eyebrow_troubled_right_index",
assert len(posedict_keys) == 45
# posedict_keys gives us index->key; make an inverse mapping.
# Note this doesn't work for "eye_unimpressed", because it's not unique. (All the more reason to fix that.)
posedict_key_to_index = {key: idx for idx, key in enumerate(posedict_keys)}