fix(walk): the cycle starts at maximum stride, so the capture shows one

The stride shot regressed twice for two different reasons, and only the second was
the clip. The walk cycle was authored on a sine, which is zero at both the start and
the middle of the cycle - exactly the two frames where the legs pass together - so a
deterministic capture at any phase near those frames read as a still. The probe
proved it: frames 0 and 15 carried identical hip rotations while 7 and 22 were the
stride.

The cycle now starts at maximum stride (cosine). Length, amplitudes, keys and loop
are unchanged; only the phase moved. demo-third-person-walk is back as shot 8 and
shows a genuine stride with the curled hands from 0.2.1.

8/8 shots verify.
This commit is contained in:
zwitschi committed 2026-11-09 12:55:53 +01:00
1 parent 0d57b718cf
commit 4b9ad22108
46 files changed
+95 -50

No files matched your search

+4 -1
View File
@@ -274,7 +274,10 @@ def clip_walk(arm, frames):
for frame in range(1, frames + 1):
t = 2.0 * math.pi * (frame - 1) / frames
swing = math.sin(t)
# cos, not sin: the clip starts at maximum stride. A sine starts and crosses
# zero twice per cycle, and the review capture kept landing on those passing
# frames - legs together, which reads as a still. The cycle is unchanged.
swing = math.cos(t)
# Hip swing, opposite phase per leg; negative X is forward.
key_euler(bones["upperleg01.L"], frame, x=-HIP * swing)
key_euler(bones["upperleg01.R"], frame, x=HIP * swing)
+2 -1
View File
@@ -288,6 +288,7 @@ try:
# the colonnade's underside.
# Level horizon for the same reason: a block elevation is read by its
# verticals, and a pitched camera makes them lean.
("demo-third-person-walk", unreal.Vector(-12940, -980, 560), unreal.Vector(-13336, -980, 500), 55.0),
("demo-spawn-view", unreal.Vector(-13336, -3100, 620), unreal.Vector(-13336, 1300, 620), 48.0),
# Street level, from the north sidewalk: the old camera sat at Y -400,
# inside the facade body (which spans Y -1457..-200), so it looked at
@@ -334,7 +335,7 @@ try:
# No follow shots in the current list: the stride capture was retired
# because the walk clip does not visibly advance in game (see TODO.md).
# The follow flag stays wired for when it does.
seq.set_editor_property("shot_follow", [False] * len(demo_shots))
seq.set_editor_property("shot_follow", [True] + [False] * (len(demo_shots) - 1))
seq.set_editor_property(
"shot_field_of_view",
[float(c[3]) if len(c) > 3 else 0.0 for c in demo_shots])
+1 -1
View File
@@ -19,7 +19,7 @@ import unreal
SRC = "/tmp/gigline/character-anim.fbx"
DEST = "/Game/Test/Character"
PREFIX = "CharacterV3"
PREFIX = "CharacterV4"
RESULT = "/tmp/gigline/character-anim-import.txt"
lines = []
+12
View File
@@ -84,6 +84,18 @@
"Art/reference/hollywood/el-capitan-facade-day-wikimedia-2009-10-27.jpg"
],
"expect": "Front view of the player body from the road: both arms hanging at the sides, hands down by the hips, face and chest visible, hero facade behind the camera"
},
{
"name": "demo-third-person-walk",
"shot": "Screenshots/demo/review-demo-third-person-walk.png",
"size": [
1920,
1080
],
"references": [
"Art/reference/hollywood/el-capitan-facade-day-wikimedia-2009-10-27.jpg"
],
"expect": "The player body mid-stride in profile: legs apart, arms counter-swinging, walking along the sidewalk"
}
]
}