Graham's Modeler Macros

While doing 3D graphics, I've run into some very tedious tasks. Luckily I'm also a programmer, so I made some ARexx scipts for LightWave to make things somewhat less tedious. Here's a few of the more useful ones, Plus some that are only usefull once in a blue moon. I've listed them from most often used to least often used.

I've started to convert some of the better ones to stand-alone C programs with ARexx interfaces. This will greatly increase speed and allow for future porting to Intel simply by recompiling the C portion and translating the interface into Lscript.

Particle Clone Deluxe V1.5

This is truly my masterpiece of macros. It makes a copy of the foreground object on each point in the background. It has lots of options for random scaling and rotation, single axis radial rotation, and even 3D radially oriented rotation. It also has a user-definable scaling function to create falloffs and ripples and stuff. It's great for asteroids, bubbles, spikes, grass, etc. I'm currently adding particle animation options to it for things like swaying grass, falling leaves, spinning asteroids and spiffy explosions.

Here's a happy flower. The petals and grass were done with Particle Clone Deluxe.

Here's a mess of cubes. It took me all of 15 seconds to model it.

Download Particle Clone Deluxe
Tangent Alignment

This wonderful macro aligns an object in the current layer with a polygon in the background layer, so it sits right on top of it.

Here's an example of aligning a cone to a polygon.

Download Tangent Alignment
Floor Object

This spiffy macro defines a "floor" with a polygon in the background layer and aligns an object in the foreground layer so that the "floor" lies exactly on the X-Z plane.

Here's an example of flooring a cone.

Download Floor Object
Make Polygon

This macro makes a convex polygon around the points in the current layer. The points don't have to be perpendicular to any axis, but they should be coplanar for good results. It's good for recovering polygons that you've accidentally REMOVED if it's too late to UNDO. It has one known bug: co-linear points and double points will screw it up. I will fix this.

Stay tuned for a CONCAVE polygon maker, and if I ever get the cash to buy StormC, a CONVEX HULL maker, and even a CONCAVE HULL maker.

Here's an example polygon made with Make Polygon.

Download Make Polygon
Flatten Polygon

This macro takes a polygon on the current layer and rotates it about its center until it is flat with respect to the X-Z plane.

Download Flatten Polygon
Polygon Normal

This macro takes a polygon on the current layer and adds two lines sticking out from the center of the polygon, perpendicular to the polygon, one in either direction.

Download Polygon Normal
Clay Morph V1.0

Here's a couple of happy macros that let you do organic deformations. ClayInit lets you define a set of points as control points. You can then move the control points and call ClayMorph to move points in an object in the same manner as the control points were moved, with interpolation. It's sort of like having bones in modeler, but I find it easier to use because you get to use all the modeler tools on the control points. It sometimes doesn't do exactly what you'd expect, so I'm planning a new version with different interpolation algorithms, written in C.

Here's a face-like blob I made with Clay Morph. The first image is the starting object, the middle is the points I set up with ClayInit and then moved (with lines joining the points), the last is the resulting object after calling ClayMorph.

Download ClayInit
Download ClayMorph
Reverse Scene

This macro makes a new scene file from an existing scene file with all the motions reversed (timewise). It doesn't do envelopes (yet).

Download Reverse Scene
Slice & Dice

These macros chop up an object into square (slice) or cubic (dice) pieces and save the pieces as a bunch of objects. They also create a scene file with all the pieces stacked together properly with their pivot points adjusted so they can be moved around and rotated and stuff. I have a cool macro that makes scenes with fancy movements for the pieces, but it's not ready for the net yet.

Download Slice
Download Dice

This macro removes useless points from a polygon. It only really works when there's only one polygon on the current layer. There are much better programs to accomplish this, but this one's free.

Download FlatLine

This is a funky macro that might be useful with a little more work. It creates a metablob from the points in the current layer. It sometimes works. The problem is that it makes the blob by stretching a globe out from its center, so it can't go around corners and there can't be any holes. It can only do peanut-like objects and other useless things.

I am nearly finished IsoSurf, a generic isosurface generator. It not only does metaballs, but also things like atomic orbitals or any implicitly defined shape. I think I should rewrite it in C so it'll be fast enough to be useful.

Here's a metablob made with 4 points.

Download MetaBall
What do you think of my ARexx? Click here to E-Mail me.