My objectives for this project were:
- Procedural animation with Control Rig in Unreal Engine
- Environment design in Houdini: for terrain generation and object scattering HDAs
- Finalising the materials to add more detail to the environment
This project started as an animation experiment in Houdini to test different procedural walking methods for many-legged creatures
using KineFX. I tried using different number of legs and attaching a soft-body simulation to my KineFX setup to make it more alive,
like real tentacles that are usually deforming. I had fun, but in the end I felt that it would be great to implement a similar system
in real-time, as a playable character.
My initial non-real-time experiments:
Then, I found a method that can be implemented in Unreal Engine with Control Rig using the Full-Body IK solver.
In my setup I am using the same system that Lincoln Margisson implemented in his
Control rig course, as a starting point.
I retargeted the Control Rig on my starfish creature and made some adaptations so it could work with 5 legs.
Initially the animation only looked good on a flat surface. When my creature was moving uphill its legs became tangled
and its motion looked very unnatural as it was swinging side to side while rotating. It moved like it had no head, only legs.
I fixed this by excluding the first two bones of each leg from the solver and by increasing the third bone’s angular stiffness,
so it could rotate with some resistance. This made the head fixed and the legs were not tangled and overlapping anymore.
There were still cases when the creature looked odd, like when it was climbing a bigger rock and its head totally sank inside the rock and the feet became too close to each other like this:
To solve this I had to modify the sphere tracing method that is used to calculate the predicted foot positions
(the red lines should start higher so the legs won’t be too close to each other) and I had to lift the root bone (the head)
when the surface was elevating.
The head and the foot positions work great. To avoid the legs’ in-between points overlapping with the rock I needed to lift
the head a bit too much here, but this can be fine-tuned depending on the surface. I didn’t need to make it any better at this point.
To show the capabilities of the animation system I have built a terrain with Houdini heightfields and imported it as a HDA.
This way it was easy to experiment with different types of terrains and iterate quickly. In the end I choose to create small hills
that are not too big compared to the creature – this made the walking animation more exciting. In the end I made the size of the terrain bigger
and exported the technical maps that I used for the shading.
I also built scattering tools for Unreal Engine to add some detail to the environment: a very simple rock scattering tool and a more complex Cluster Scatter HDA
for scattering vegetation. With the Cluster Scatter tool it is possible to:
- Select seed for the noise pattern
- Create a specified number of clusters
- Decide how many points each cluster could contain maximum
- Specify the size range of the instances
- Fuse points that are too close to each other
- Select objects that you want the tool to omit
- Specify the omit radius (how far from the objects to omit can the tool scatter points)
In the final version I am using the rocks as objects to omit from the vegetation scattering (vegetation = the cyan blobs).
To wrap the environment creation up for now, I added some more detail by developing the terrain material further.
While it's currently a walking simulator, I see this as just the beginning. I’m excited to add new interactions and expand this into a richer,
more immersive experience in the future.