This is the final project of the 15664 Technical Animation Course, which was completed by me and Grace. Our algorithm implements the following functions:
It is implemented in Houdini and Unity engine. The showcases are all in real-time.
This is a system that includes procedurally generated monster meshes and a system that uses kinefx for procedural rigging.
Our inspiration came from the monsters in “Inside” and the demons in “Chainsaw Man”.
Our tool allows artists to customize the position and direction of each muscle/functional block (prefab). They can put them freely.
Once defined, an algorithm calculates the muscle/ligament connections between each muscle block. Specifically, when traversing the connections of each muscle block, I use a prefab to cut open each muscle’s connection port and connect these two connection ports using “polybridge “to produce the effect of muscles/ligaments.
The detailed algorithm to build a muscle connection given two meat points will be.
as the result:
So we have:
We allow the player to customize the number of legs. The algorithm is based on the existing functional prefabs, and we can roughly determine the position of the center of gravity from them. The goal of generating legs is to cover this center of gravity point as much as possible. Similarly, the legs come from prefabs, and you can put your favorite leg models into this system.
this is how center of gravity influences leg generation. It looks more physically correct.
This is my first time using kinefx. I think the most exciting feature is that I can transform a point-line model into a skeletal system. However, it is actually very tricky to use. There are two things to note about skeleton conversion:
Therefore, after obtaining the positions of the functional blocks placed by the artist, the algorithm will connect to each functional block starting from the root node. But this must be an existing root point, forced to make its ptnum smaller than the ptnum of other functional points (otherwise, the skeleton node cannot infer the parent-child relationship), so we can only use the point clouds as a reference and regenerate them in order.
I tested the results of two skinning methods, and it is clearly more reasonable to use biharmonic, but it is painfully slow. My inference is that by dividing the skeleton into more regions for weight diffusion, biharmonic has more accurate characteristic features of the geometry.
This part is a mass-spring system, similar to cloth. It is worth noting that our current skeleton tree diagram is not the complete representation of each particle connection. We need to configure a connected graph on the basis of the tree to express the connection of each particle.
Our method is to calculate the neighbors within a certain range while configuring, and generate spring relationships. After collecting all neighbor information, we will record the neighbors’ neighbors and establish bending springs with them. Unlike in 2D plane for cloth, where shear springs need to be established, in 3D, establishing stretch springs can avoid shear problems, so there are only bending springs (with second-level neighbors) and stretch springs (with first-level neighbors).
Below are some simulation effects.
Some collision demo ^^ You can play around with it.
I’m using the procedural locomotion algorithm I wrote before, which supports any number of leg poses and any speed of movement. You can read about it here.
The current locomotion algorithm is that when a destination is set, the legs will drive the whole meat towards the direction.
It looks good now. But not 100% correct, what we want to achieve is that: this monster is insane and they will insanely move the body first and the legs will simply compensate the keep body upright. How do we gonna achieve that?
The easiest way to achieve “legs follow body” could be that we move the body towards the destination first and then make the center of legs area to chase the body.
But this method is still not so ideal, Since the reason why animals or like our human lean forward when we speed up is to create acceleration.
Acceleration Driven Locomotion
So this is much more complicated. When a destination is set, the monster will set the ideal velocity and the ideal acceleration to achieve this velocity. To create this acceleration, the up control of meat will firstly move forward to the relative distance that could achieve this acceleration. You can see the difference of algorithm from the flowchart below.
And the from the result, you can see that:
When moving forward, the Acceleration Driven one will firstly move legs backwards and push body forward to create the acceleration, then it will move. And when braking, the body will lean backward and it will oscillate to settle down in the destination. It takes more time to move and slow down, but much more physically correct, since the nobody can achieve the speed instantly. We all take time, so do monsters ^^
The figure below shows the relationship (relative distance) between center of body and center of legs. You can read that the legs are more proactively moving to create the acceleration than the Body Driven one. (note that, yellow is center of body and blue dot are center of legs)
I think it is cool ^^
There is only one unsatisfying things. The rigging of meat didn’t keep the volume of each meat balls, bone weights are too evenly distributed and make everything equally soft. This requires a much detailed implementation of Houdini KineFX Procedural Rigging system and I am still working on it!
Here is a good reference about procedural weighting if you are interested too.
Cheer!