PDFJuneIssue2005f

Page 46

Stamp-o-matic By Base80

Stamp-o-Matic Tutorial and a working file for xpressophobes

The XPresso part Part 1 - Create instances on collision.

Ever wanted to leave footsteps in sand or bullet holes or a stamp on an envelope? Well here is the solution. The Stamp-o-Matic xpresso.

Start by making an xpresso tag on a null-object. Add 3 user-data fields to the tag, the data type set on "link". Give them a name like; foot, footstep and floor.

Tutorial

What does it do? The Stamp-o-Matic creates an instance of an object on

You need a foot object (a polygon at the bottom of the foot), a footprint object (this can be whatever you want) and a floor (polygonal object or group of polygonal objects). Now you can animate the foot and it will leave a print every time the foot collides with the ground. Cool.

So we have: User-data--> Collision--> Mono-flop--> Instance-maker.

Now we can connect the user-data containing the link of the footstep to the Object port of the instance maker so it can make the instances of that object. Now open the xpresso editor by double clicking the tag. Drag the tag with the user data in the editor and open the 3 link output ports. Next we create a bunch of nodes. A collision node, a mono-flop, a time and a compare node.

impact of two other objects. In english; when a foot hits the ground it leaves a mark. Click once on the XPresso tag to drop the necessary objects in the appropriate user-data fields.

Now connect the count port of the mono flop to the instance-maker (this node is provided in the file in the goodies folder of the mag)

The first thing we do is detect a collision of the foot and the floor. Connect the foot and the floor userdata to the collision-node. This node gives a "True" on collision. This true can trigger the making of an instance. Check the Include children and use deformed points boxes.

The instance maker needs an empty null-object to put the instances in, the "container", just drag an empty null-object in the xpresso editor and connect the object-port to the container port of instance maker. Well this works fine but the footsteps are all in the same place. Part 2 - Placing the objects What we will do here is pass the position of impact to the instance created by the collision. So we need a Hierarchy node. Connect the container null object to the hierarchy node and set the node to go down to the last instances in

How does it work? This xpresso is built around the fantastic "instance-Maker-Node". This node was commissioned by me and is made by Majoul of France. The node can make an instance of an object when-ever needed. In this case an instance is created on collision. Easy.

What we want is to count the number of times the foot has hit the ground. We can do this with a mono-flop node. Every time the mono-flop is triggered by the collision it will add 1 to the count port.

46

the container. So set it to D (down) for the start path and L (last) for the iteration path, easy does it.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.