The biggest challenge of this thesis has clearly been to create the displacement set of rules that was pitched as the component named “Phasma”. Different from the actual creature leg locomotion for semi-believable behavior, this component deals with the displacement of the creatures in space to establish seeking and avoidance behaviors between the two types of creatures, hunters and prey.
Originally the goal was to set up a locator system that would represent the position of each creature using a particle system using Houdini’s built-in POPs, but it quickly organically transitioned towards a customized VEX-based system within a SOP Solver.
This custom approach starts by using the environment component of this system (Arena) as a base to distribute points on it. These points are scattered on it in a way that ensures a uniformly distant distribution to guarantee no territorial or spatial overlaps (prey points don’t scatter in the same space as hunters and vice-versa).
Creature Distribution on “Arena”
Each point is flagged as either prey or hunter to, later on, set their custom behavior. User parameters are made available to control the amount of each type as well as speeds.
The system works by pre-establishing a VEX array of the creatures in detail mode to, later on, be accessed by the hunters to identify their target.
A Simple Point Wrangle is Used to Make The Prey Array
Next, in a separate Point Wrangle, a set of rules is established to determine initial targets. This works by locating the nearest point flagged as a prey point and setting it up as the current point’s target. If no near prey is found an arbitrary prey is set as a target.
Wrangle Setting Up The Initial Rules for Hunters
Everything else happens within the SOP solver where the system is reevaluated each frame. In a separate Point Wrangle, Initial directions and speeds are set for Hunters by creating vectors between the two points. These vectors update themselves each time the solver is reevaluated. Since no real contact interaction has been implemented, a separation rule is set so preys and hunters don’t overlap.
Prey Speeds are set to be random, but with a user control multiplier.
Naturally, prey creatures need to avoid hunters, so additional rules had to be set for this behavior as well. This is simply developed by looking for near points tagged as hunters and calculating vectors away from them. Keep in mind this all happens within the solve.
It is also necessary for hunters to avoid themselves to a certain degree to ensure that no overlaps happen. This rule is applied in a similar fashion, with hunters looking for near points that are flagged as hunters and calculating and applying vectors away from those.
And naturally, the same behavior has to be set for prey to avoid themselves.
The behavior has to be limited to the bounds of “Arena”. To make sure the creatures stay within bounds, “Arena” is used as a reference to create a boundary zone at its limits where the velocity gets rotated. The closer it gets to the edge, the more it rotates. This ensures that the creatures don’t wander out of the environment.
Turn Enforcement Setup
The last step is to update the position of points and make sure they stay on top of the surface of “Arena”.
With all the rules set, the system allows for non-deterministic motion. User input is provided to change the creature scattering independently, the speeds of the creatures, and the turn magnitude once they enter the boundary zones. Additionally, visualizers are provided so the user can see the paths creatures will take once this component is connected to the individual creatures’ HDAs.
An Example Of Creature Displament Using the Embedded Visualizers Provided
Once the behavior is tweaked, the 3 elements that conform the Bioma system are connected together. Creatures’ HDAs are connected last and as many as representing points. This allows for customization per creature since each individual HDA provides user controllers to change creature morphology and leg locomotion.
An example of how the 3-part Bioma System is Stacked Together in the Network Editor
The creatures’ HDAs have an internal system to recognize which point to use in order to place themselves in the right place in the environment and if it’s a prey or hunter flagged point. Once all the nodes are properly stacked, the creatures locomote as expected.
It’s worth mentioning that the creatures’ HDAs have a parallel embedded system to use them without the “Phasma” component. This allows for semi-deterministic motion, where the user sets a direction, locomotion speed, and path length. Since one of the goals of this tool is to have flexibility, as well as the ability to art direct, it was important to have the option to include this alternative as well.
This concludes this rather intricate post about the component that gives life to the creatures. Thank you for reading and until the next post!