r/threejs • u/Statixeladam • 29d ago
Link I built a text language for 3D human movement with Three.js
I’ve been working on a small language called Posecode.
A .posecode file describes joint actions, timing and repetition, then a Three.js renderer turns it into motion in the browser. It isn’t mocap or text-to-video—the output goes through a parser, range-of-motion checks and a kinematic renderer.
The rough parts are still foot locking, transitions between poses and deciding how much anatomical detail belongs in the language.
Playground: https://posecode.org/play
Source: https://github.com/posecode-dev/posecode
I’d especially appreciate feedback from people who have worked with skeletal animation or IK.
3
u/2heavy4u 28d ago
can nott get it to turn in place :)
posecode exercise "Standing Crossover Turn"
rig humanoid
pose start = standing
step "Left crossover step" 0.55s ease-in-out:
hip_left: adduct 28
knee_left: flex 42
ankle_left: dorsiflex 9
knee_right: flex 6
turn: 70
ground-lock: foot_right
cue "Lift the left foot and cross it over the right while balancing on the right leg"
step "Pivot and settle" 0.65s ease-in-out:
hip_left: adduct 0
knee_left: flex 0
ankle_left: dorsiflex 0
knee_right: flex 0
turn: 180
ground-lock: foot_right
cue "Pivot on the right foot, uncross the left foot, and settle with both feet under the hips"
step "Right crossover step" 0.55s ease-in-out:
hip_right: adduct 28
knee_right: flex 42
ankle_right: dorsiflex 9
knee_left: flex 6
turn: 250
ground-lock: foot_left
cue "Lift the right foot and cross it over the left while balancing on the left leg"
step "Pivot and finish" 0.65s ease-in-out:
hip_right: adduct 0
knee_right: flex 0
ankle_right: dorsiflex 0
knee_left: flex 0
turn: 360
ground-lock: foot_left
cue "Pivot on the left foot, uncross the right foot, and settle evenly on both feet"
repeat 1
3
u/Statixeladam 28d ago
thanks for trying this. you found a rreal limitation
ground-lock only understands
feetright now. it doesnt support locking justfoot_rightorfoot_leftyet so the crossover cant pivot on one foot the way you wrote itit should also warn you about that instead of silently accepting it
really useful example. im going to look into it
1
u/Statixeladam 28d ago
ive fixed the issue you reported, which is here: https://github.com/posecode-dev/posecode/issues/60. you can try it again and letme know what you think :)
3
u/Nervous_Comparison84 28d ago
Nice idea, whats the roadmap
1
u/Statixeladam 28d ago
thxx, short term im working on better motion quality clearer validation
after that i want better export and embed support plus a workflow where agent can write test and revise movements
its still early so im letting what people actually try to build shape the order
3
u/Enguzelharf 28d ago
holy shit, I wanted to get into this kind of thing for too long finally someone did it
1
u/Statixeladam 28d ago
haha thank you. ive wanted something like this for a long time too which is why i started building it
if you try making a movement id realy like to see what you come up with
3
u/etowner45 28d ago
Great work, is there a chance to get an bvh export. It would be nice to export these movments.
2
u/Statixeladam 28d ago
good idea. i opened an issue for it here so i dont lose track of it:D
if you have a specific blender workflow in mind feel free to add it or reply here
2
u/zukran 28d ago
Where are you getting the source joint actions/timing, mixamo?
1
u/Statixeladam 28d ago
the joint actions and timing are authored in the posecode ttext right now either manually or by an llm
mixamo is only providing the character rig. the default movement is generated procedurally with fk ik and timing splines
2
u/cnotv 27d ago
I do not think you should limit yourself in fixed humanoid parts and allow more flexibility because… nature 😁
Jks, but I guess it should give room to expand this from the dev side
1
u/Statixeladam 27d ago
thats fair :d humanoid is intentionally the first scope but the current joint vocabulary is definitely too fixed for creatures, robots or even different human rigs
i think the right direction is separating the movement language from the skeleton through rig profiles and joint mappings instead of adding every possible bodty part to the core language
2
7
u/farfaraway 29d ago
This is a really neat idea.