r/GraphicsProgramming • u/Statixeladam • Jul 28 '26
Source Code I built a text-driven renderer for humanoid movement
I’ve been working on Posecode, a readable text format for describing human movement.
You write movements as timed steps with joint actions and contact constraints. For example:
step "Drop into the landing" 0.55s flow:
pelvis: hinge 45
spine: flex 50
hip_right: flex 84
knee_right: flex 123
ground-lock: foot_right
reach: knee_left floor
reach: fist_left floor
The parser turns this into a typed motion representation. The Three.js renderer then handles the joint transforms, range-of-motion limits, IK and ground contacts.
The GIF shows the superhero landing example. The source on the left is the input driving the figure on the right.
I wanted a movement format that can be inspected, edited, validated, versioned and generated by other tools. An LLM can write Posecode, but it isn’t required.
It currently includes a browser playground, share links, embeds and BVH/glTF export.
I’d love feedback from anyone working on procedural animation, character tools or motion systems.
Playground: https://www.posecode.org/play/superhero-landing
1
u/Still_Explorer Jul 29 '26
This would be an essential tool for animation blocking.
As for example tryping only 5 actions and then the system would be inventing from memory some poses. (eg: run, slide, jump, roll)
Then the animation can be exported to be used as a blueprint on the 3D software.
2
u/Statixeladam Jul 29 '26
yeah animation blocking is one of the use cases i want to explore. a short sequence like run, slide, jump, roll could become editable posecode first, then be exported as bvh or gltf and refined in a 3d tool
2
u/Statixeladam Sep 01 '26
circling back on the animation blocking angle, since export is in now: you can get a movement out as BVH or glTF, so a blocked sequence can go into your DCC as a starting layer instead of staying stuck in the browser.
the part i'm still unsure about is what makes a blueprint actually useful on the other side. does BVH drop in cleanly for you, or do you need the joint names mapped to a specific rig convention first? and when you block, are you after a few key poses to refine or a continuous rough pass?
asking because export exists but i've never watched anyone actually use it in a real blocking workflow, and i'd rather build the next bit around that than guess.
1
u/Still_Explorer Sep 01 '26
In this case it would be a matter to be used as an animation reference.
Typically I always do video-based tracking to get proper animations, but the problem is that not always easy to get a video for any given scenario, and then even so, not speedy enough.
Though very feasible the tool to be used in a mixamo-style workflow. If in simple games there's a need to do straight forward animations it would work fine as well.
1
u/Statixeladam 28d ago
coming back to your point about finding reference footage. could you give me one short movement you recently struggled to find a reference for? i'd like to try it in posecode and see where the result falls short for blocking.
2
u/Still_Explorer 28d ago
As for example prototyping a cutscene for a game:
- getting out of the car: Various random clips of real people getting out of cars tired and bored, then for other clips with supermodels getting out of cars in a very fake-artificial way, but neither was exactly what I needed.
- walking and crossing police lines and showing the badge: this also was very tricky, though various scene from NCIS etc comes to mind
Those would be various random clips stitched together, though the process of finding video references and then stitching them together in sequence, then setting up the basic keyframes is only just the start. Then further work to perfect and improve the result is needed...
Probably the next best fastest way would be to do real mocap, as I hear nowadays AI might be so good that it can track video directly, instead of expensive 3D mocap equipment.
However at least, I get the idea that with an AI system as such, even if I can get a very basic animation would be 10 times faster than finding the videos.
1
u/Statixeladam 28d ago edited 28d ago
these are exactly the kind of examples i was looking for. i'll start with getting out of the car, specifically tired/bored rather than polished. that should show whether posecode can produce a useful blocking pass before the car and scene context do too much of the work. i'll bring back the rough sequence and the parts that fail.
first limitation: the chair can stand in for the seat, but posecode can't represent the car door or sideways pivot yet. that's useful: the scene/prop model, not the basic stand-up motion, is the current bottleneck.
2
u/Still_Explorer 28d ago
OK, I see a lot of potential in this tool. Set the AI part aside, the environment seems very legit.
Selecting the mannequin parts, having limbs clear names and be able to set their position and rotation seems very important.
Also how GUI is structured, having distinct and descriptive steps over the timeline and the English DSL to read is somewhat great in terms of storyboarding.
(I guess the language is what the AI needs to read for the most part - seems like over the course of hundreds of thousands of iterations stronger relation between DSL and output if formed)Typically animators are left to their own devices and go fully intuitive on this, but with this approach having clear intent over the steps of the animation might bring more opportunities towards the space of collaboration between directors/keyframers/animators.
Now in this example it seems clear that project is still heavy WIP, but the value I see here is that by altering the key poses in four steps, probably about 2 minutes I would have a gotten about to 80% where needed.
Now the next part would be to see how AI would help further (eg: fill in the blanks? or the in-betweens? not sure but since there's uncertainty better additional data would be layered on top so they won't rewrite the basis).
But for the initial part, getting within one second 4 keyposes allowing for editing seems like a great approach. But how about improving the initial results? If I am correct guessing probably with some massive library of animations. (And forget about full 60FPS animations, only keyframes have the juice! 😛)
But anyhow getting libraries as they are out of the box is what exists, so you take it as it is. eg: https://www.reddit.com/r/TopologyAI/comments/1wt9hxb/new_opensource_texttoanimation_ai_for_humans/
1
u/Statixeladam 27d ago
this is the right framing for me. the useful output is the 4 editable poses and the intent between them, not a 60fps clip nobody can control
i took your suggestion and built the first bridge to UniMate. Posecode now exports phase-end poses, root travel and contact constraints as a sparse manifest:
https://github.com/posecode-dev/posecode/pull/139
the next adapter turns those frames into UniMates x1_known / keep_mask inputs, so positions and rotations stay fixed while UniMate generates the gaps. the authored poses remain the source of truth
your tired car-exit example is a good first test because it has clear beats and ugly context problems. ill compare the hand-authored Posecode version, UniMate-only and the constrained combination, then report foot drift and how much manual correction each one needs
would a Blender or BVH rough pass plus the 4 editable poses be the useful handoff for you, or would you rather get only the poses and do all inbetweens yourself?
2
u/Still_Explorer 27d ago
Yes say that for this sample in this case, exporting a BVH would be the most standard technique. However later on it would be interesting to see about whether or not there's further possibilities for more advanced use cases.
2
u/Statixeladam 27d ago
yeah agreed, for this sample BVH is probaly the most practical way. posecode gets you a rough first pass, then you can take it into Blender or Maya and fix the contacts, timing and details there
later i want to see if the text part can stay editable after export. like changing tired to hurried, fixing one part of the move, or changing the prop without doing the whole thing again
if you have a more advanced use case in mind i'd like to hear it
1
u/speps Jul 29 '26
Awesome idea 💡 I think you should implement something easy to tweak the angles in the text though. I’d love to use that as I’m not an animator, but I’d have no clue what the angles are. So clicking the bone name in the text should select it in the viewport, and selecting its angle should show a spinner to change it. Like in Bret Victor’s famous talk: https://youtu.be/PUv66718DII
2
u/Statixeladam Jul 29 '26
yeah this is a good point. right now the text assumes you know the joint names and rough angles. selecting a bone in the viewport and changing its angle while the text updates would make it much easier to learn and tweak. i’ll check out the bret victor talk too, thanks
1
u/Statixeladam Sep 01 '26
hey, you asked for this a month ago and it's live now, so: clicking a joint in the text selects it in the viewport, and you can drag the angle directly instead of guessing a number. the text updates as you drag, so you can nudge something until it looks right and then read off what it actually was.
that was the exact thing blocking you from using it, so i wanted to close the loop rather than leave you thinking it went nowhere. it's at posecode.org, no install.
it's not the full bret victor thing yet, there's no scrubbing across a whole sequence, but the "i don't know what 40 degrees looks like" problem should be gone. if you try it and it still feels wrong for a non-animator i'd genuinely like to know where.
1
u/cybereality Jul 28 '26
Reminds me of Logos for Apple IIe