Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(verse): the cloak swings from under the cowl's gold hem (#991)

Ruben Lütkecb311af03a84
diff --git a/art/verse/characters/sovereign.py b/art/verse/characters/sovereign.py
index 889e284345..e2c165a21e 100644
--- a/art/verse/characters/sovereign.py
+++ b/art/verse/characters/sovereign.py
@@ -523,7 +523,7 @@ def _line_inside(ob, cy):
p.material_index = li
-def add_cloak_bones(arm_ob, cy, z_top, z_hem, belt_z, s):
+def add_cloak_bones(arm_ob, cy, z_pivot, z_hem, belt_z, s):
"""Six bones the cloak hangs on: three columns (right, centre, left) of two segments."""
C.set_active(arm_ob)
bpy.ops.object.mode_set(mode="EDIT")
@@ -534,7 +534,7 @@ def add_cloak_bones(arm_ob, cy, z_top, z_hem, belt_z, s):
rx, ry = 0.3 * s, 0.22 * s
x = rx * math.sin(a)
y = cy + ry * math.cos(a)
- top = Vector((x * 0.85, y, z_top - 0.02))
+ top = Vector((x * 0.85, y, z_pivot))
mid = Vector((x, y + 0.03, belt_z))
low = Vector((x * 1.15, y + 0.07, z_hem + 0.05))
b1 = eb.new(f"Cloak_{col}1")
@@ -553,8 +553,10 @@ def add_cloak_bones(arm_ob, cy, z_top, z_hem, belt_z, s):
return heads
-def skin_cloak(ob, bones, sh_z, belt_z, s):
- top0, top1 = sh_z - 0.15, sh_z - 0.01
+def skin_cloak(ob, bones, z_pivot, belt_z, s):
+ # Rigid on the chest down to the pivot (just under the cowl's gold hem), so a swing never
+ # lifts the cloak's top out over that hem; free below it.
+ top0, top1 = z_pivot - 0.12, z_pivot
ca = CLOAK_COLUMN_ANGLE
def w(co):
@@ -656,10 +658,12 @@ def build_sovereign(ctx: O.Ctx):
arm.name = "SK_Sovereign_Rig"
arm.data.name = "SK_Sovereign_Rig"
C.link(arm)
- cl, cy, z_top, z_hem, _back = cloak(ctx, belt_z)
- add_cloak_bones(arm, cy, z_top, z_hem, belt_z, s)
+ cl, cy, _z_top, z_hem, _back = cloak(ctx, belt_z)
+ # the cloak swings from just under the cowl's hem at the back
+ z_pivot = neck_z - 0.30 * s
+ add_cloak_bones(arm, cy, z_pivot, z_hem, belt_z, s)
bones = [b.name for b in arm.data.bones]
- skin_cloak(cl, bones, ctx.L["shoulder"].z, belt_z, s)
+ skin_cloak(cl, bones, z_pivot, belt_z, s)
extra = [cl]
for o in extra:
O.bake_vertex_ao(o)
diff --git a/art/verse/characters/sovereign_qa.py b/art/verse/characters/sovereign_qa.py
index 96daa7026a..ea3c5f6c7d 100644
--- a/art/verse/characters/sovereign_qa.py
+++ b/art/verse/characters/sovereign_qa.py
@@ -122,6 +122,17 @@ def main(argv):
bpy.context.view_layer.update()
camera(mid, 60, 4.2)
render(f"sov_walk{f}")
+ if which in ("all", "swing"):
+ # the cloak as the game swings it at a brisk walk: lifted back about 0.45 rad
+ pose(A.clip_walk(body)[8])
+ for col in ("R", "C", "L"):
+ pb = arm.pose.bones[f"Cloak_{col}1"]
+ pb.rotation_mode = "XYZ"
+ pb.rotation_euler = (-0.45, 0, 0)
+ bpy.context.view_layer.update()
+ for yaw in (150, 90):
+ camera(mid, yaw, 4.2, height=1.7)
+ render(f"sov_swing{yaw}")
if __name__ == "__main__":
diff --git a/dodaios/ui/web/frontend/public/verse/characters/SK_Sovereign.glb b/dodaios/ui/web/frontend/public/verse/characters/SK_Sovereign.glb
index 2eadb8f07e..1792c9abb7 100644
Binary files a/dodaios/ui/web/frontend/public/verse/characters/SK_Sovereign.glb and b/dodaios/ui/web/frontend/public/verse/characters/SK_Sovereign.glb differ
diff --git a/dodaios/ui/web/frontend/public/verse/characters/characters.json b/dodaios/ui/web/frontend/public/verse/characters/characters.json
index bec8e35c2c..96b4178487 100644
--- a/dodaios/ui/web/frontend/public/verse/characters/characters.json
+++ b/dodaios/ui/web/frontend/public/verse/characters/characters.json
@@ -359,7 +359,7 @@
],
"height": 1.78,
"triangles": 32456,
- "bytes": 1851112,
+ "bytes": 1851168,
"defaults": {
"M_Skin": "#b9a99c"
},