Walking Ant
|
Summary
For this project I decided to make an insect rig. I am using pymel and OpenMaya for manipulating the rig in maya. All the data is stored on the big arrow control. The GUI is made using PySide/PyQt4 and it reads the data stored on the arrow control.
The goal of the tool is that you can animate this insect with just a single control. The tool bakes animation for you that will automatically adjust to the terrain and do all the leg animation. Every leg IK control has some attributes to set up when that leg starts and ends it's "swing phase", which allows you to set up different gaits.
Seeking
The seeking is done by simply rotating the insect around it's local y-axis towards the seeker object. It's rotation value is clamped by the max rotation. Between the antennae there is a locator which will shoot a ray straight ahead. If it detects a wall in front of the insect he will try to rotate upwards. Similarly, this object also projects a ray 45 degrees downwards to check if the floor suddenly stops. If this ray does not hit a collider it will make the insect turn downwards.
|
GUI
As long as the insect manager window is open there will be callbacks for the selected insect. If you move the insect around or add or remove colliders while it is active in the insect manager these callbacks will run the command to project the origin onto the collider. It will not move the actual insect but a proxy mesh will be visible which gives feedback on where the insect will end up. This proxy mesh will automatically show or hide itself based on how far away from the real insect it is. You can also set it to always show this proxy mesh or always hide it. All it's render flags are turned off, so you do not have to be afraid of this mesh popping up in your renders.
|