Swarm as a funny hat

Scripts in 3D Canvas

Chapter 8: Draft Plugins and Scripts

Here are some uncompleted plugins and scripts. Use them if you wish, but don't blame me if anything goes wrong.


Here is a draft plugin for doing grass, hair, billboards. It's basically an object cloner but it copies one object onto another. The copies can be scaled across the object, either linearly or randomly. They can also be rotated. They can also be aligned (including the added rotation) to the face normal to where they are copied, or left as you see them on the screen. For example, a stick aligned to normals would stick out like spikes if copied to a sphere. But this part isn't working properly.

Here are a couple of simple pictures.

Straight scaling of a block across a fractal terrain.

With some rotations

And the buggered up alignment to normals

If you want to muck about with this, be careful. There is no data checking. Here is the VB code. Here is the plugin dll.

Rotations are in degrees. Use sensible rotations like -10 to +20.

Scaling ratioed to the size of the object being copied - scale of 0.5 is half size

To use the plugin, select a point on the object to be copied, then run GraciasCloner. This point will be used as the centre of rotation.


Next is a script that is meant to extrude an arbitrary face along an arbitrary function. To use this you have to edit the script yourself to put in the length of the extrusion, and define the function you want to use.

some corkscrew shapes

It comes built in with a corkscrew function that extrudes for 40 lengths. The basic unit of length is the 3DCanvas unit, so any face you extrude will be based on the that unit. You can of course change this in the function.

For corkscrews, I just had a nice result by inserting a default cube primitive, extruding the right hand face (the x positive face, or the one in the yZ plane blah blah) by the default function, then smoothing the result. This may work better than extruding an octagon, but you'll have to work that out for yourself.

Here is is: (just copy it to 3DCanvas\scripts and run it after selecting a face). Good luck, Earth Person.



There is no next

Introduction and ContentsSwarm as a funny hat