Go Ka-Pow when Objects get Close

Several tricks are shown here. First we detect when two objects get too close to each other. Then we trigger the automatic creation of objects when this happens. Then we run through a pre-computed animation. Finally we automatically delete the objects we just created.

CHOPs calculate the distance between two objects without writing math expressions. The object1 CHOP gets the X, Y and Z distances between two objects. The Math CHOP we named "length" is very versatile for doing a lot of math operations. Here it is set to get the inter-object distance based on the X, Y, Z it is given.

The trigger1 CHOP looks for a threshold and goes on when the distance is less than a certain amount.

In some cases it is not predictable how many objects you will have at a certain time in your animation. To cope with this, you can "overpopulate" your environment with too many objects, and only turn on the ones you need. Or, like with particle systems, you can "stamp" some geometry at each particle. But in cases where you have too many particles or too much geometry to stamp, you can, in Houdini, automatically create and delete objects as you need them.

This technique is illustrated here. All the tricks shown here free the animator from writing scripts, which is tedious and error-prone.

Here is one case where a script is easiest, though it is triggered with a Logic CHOPs, not a script. create.sc simply copies two objects and names them. Their behavior thereafter is driven automatically by CHOPs.

As in in trick 3 and trick 5, the new objects go through a pre-determined sequence.

Then the objects are deleted using another logic CHOP and a script command.