Anyone who follows me knows I'm pretty obsessed with Ubisoft's GDC Talk about their IK Rigs Animation System. Took quite a bit of time to build something similar myself from scratch. So the next thing I wanted to tackle is creating a system to that allows me to make procedural characters meant for prototyping similar to what was on display in that same GDC Talk.
From what I could tell in the videos and images, the characters are created from capsule shapes. So I started with that as the premise, but I needed a way to deform it in a few ways. The main idea is that I start with a sphere that I cut in half. From there I can move them away from eachother and tie them together with a single row of triangles that will then create that sort of shape.
From there I setup a way to defined how far away from the center each half can move plus scaling. With that, I able now able to define how long the capsule is, like if it has zero distance, its a sphere else you then start to form a capsule shape. Having scale defined for both ends allows me to deform the capsule in a few ways that lets me create hands, feet, tails, etc that look pretty decent. To finish it off, there is a center rotation quaternion thats include so that I can have the capsule in any starting orientation that makes sense for the body parts I'm trying to create.
All this data is then setup as instance buffers that will replicate and deform the capsule mesh in a single draw call. On top of that, extra instance buffers are added to include Armature bone transformation. The whole idea is to have a skeleton, then defined a capsule deformation around each bone to try to create some sort of character.
If you have been following me, you would have noticed that I was on a shader kick for awhile, doing eyeballs and various toon-ish ways to shade 3d meshes. The whole purpose of all that was to define some sort of unique look for ProtoForms. Now you can see the fruit it all that labor as it animates.
[ SHAMELESS PLUG ]
I have a patreon for anyone who would like to support my work. Everything I do I release as open source. With a enough support I can do this full time and make more stuff for people to use and learn from. https://www.patreon.com/sketchpunk