AC3D Resources

 

AC3D is a low cost 3D modeller.

This page will host resources that I find useful or develop for AC3D.

Links

*         Dennis Hawthorne has developed numerous AC3D plugins and also hosts those developed by others on his site.

 

 

My Plugins

This is where my plugins live.  They are supplied “as-is” and in good faith.  Use them at your own risk.  I can accept no responsibility for any damage incurred directly or indirectly as a result of using these plugins.  Do check any downloaded code for viruses etc. before installing it.

 

*         Twister – apply a twist to an object

*         Meta – create metaballs for blobby objects

*         Visualiser – create isosurfaces from volume data

 

 

Twister

This plugin implements Barr’s twist operation.  This is my first plugin!

 

*         History

*         Instructions

*         Examples

History

*         Version 1.0:  First version

*         Version 1.1:  Added min and max twist values.  Tidied some messages.

 

*         Download sources and windows dll (version 1.1).

*         Download linux files (version 1.0 courtesy of A J MacLeod)

 

Instructions

Here is the GUI:

 

 

Simply select the geometry that you wish to twist and then click the apply button.  You can choose to twist about an arbitrary axis as specified by the centre and axis selections.  There are built-ins for the origin, and the three primary axes, or alternatively the centre can be set from a selected vertex.  The axis direction can be set (relative to the centre) by selecting another vertex and clicking the “vertex” button.  Finally you can input axis directions and positions manually.

 

Vectors input via vertex are normalised, so that the twist rate is always per unit distance.  However, the normalised vector is not shown in the GUI.

 

The feature added in version 1.1 was to provide minimum and maximum limits on the twist.  This is useful for twisting just a small part of an object.  If the maximum is smaller than the minimum (default), then no limits are applied.

 

Examples

These are examples of twister in action.  Click on images for full-sized version.

This is a cube that has been twisted around x, y and z and then subdivided.

 

This example shows four extruded cylinders which have been twisted around each other to create an electric cable like effect.

 

This example shows the effect on the twist of limiting the minimum and maximum twist angles.

 

Meta

Creates isosurfaces from metaballs. 

 

*         History

*         Instructions

*         Examples

History

*         Version 1.0:  First release.  Consider this an alpha version.

*         Version 1.1:  Bug fixes and improvements to memory footprint.

 

*         Download windows dll and tcl file.

 

No source is available yet because it needs a good tidy up before I let the world see it!

 

Instructions

Here is the GUI:

 

The basic operation is to select vertices to act as metaball centres and to click apply. 

Grid resolution

Controls how fine the generated geometry will be.  100 seems a good compromise setting for a reasonable quality, but reasonably quick operation.  On my machine 400 is about as far as you want to go as the models become very big very quickly.

Threshold

Controls where the isosurface will appear.  Reducing this value will increase the size of the metaballs because the threshold is further away.  Metaballs in Meta are describe by the same function as in POV-Ray i.e. v = strength * (1 – (distance / radius)^2)^2

Default strength

Vertices that have no associated metaball parameters (see below) will be assigned the default values.  The strength affects the scale factor of the metaball formula given above.

Default radius

Vertices that have no associated metaball parameters (see below) will be assigned the default values.  The radius controls the maximum radius of a metaball.

Strength

Use this to enter a strength to be applied to vertices.

Radius

Use this to enter a radius to be applied to vertices.

Get

Select a vertex and click get.  The strength and radius associated with the vertex will be displayed in the respective boxes.

Set

Select vertices and click set to apply the current strength and radius to them.

 

NOTE: metaball parameters are associated with vertices on a purely temporary basis.  These values are not part of the model and will be lost when you finish the session.

Examples

Here are some results (all generated and rendered within AC3D):

 

 

The first image from an early prototype.

Image is from the prototype GUI with a grid of 400x400x400.  The object has nearly half a million triangles!

 

A metaball-icosahedron.

A metaball-dodecahdron.

 

Is it just me, or is this thing creepy?  It’s based on a sphere.

 

A C60 molecule (based on a truncated icosahedron).

You can use negative strengths to good effect.

 

 

 

Visualiser

Creates isosurfaces from volume datasets using the same isosurface algorithm as meta. 

 

*         History

*         Instructions

*         Examples

History

*         Version 1.0:  First version

 

*         Download windows files.

 

Instructions

Here is the GUI:

 

File

Use the File… button to select an input file of type .raw

Slices

Select the number of slices from the dataset that are required.  It can be useful to select less than the maximum initially in order to experiment before generating the final surface.

Major/Minor Dimension

The data in the file should be arranged as a number of slices.  Each slice consists of a number (the major dimension) of rows and each row consists of a number (the minor dimension) of elements.

Bytes

Each element can contain either 1 byte or 2 bytes.

Endianness

For two-byte input data, the high byte can be stored first (big-endian) or second (little-endian).  A zero in this box signifies little-endian (Intel order).  A one signifies big-endian (old Mac order).  This should really be a checkbox or something like that, but I just haven’t got round to it.

Threshold

The threshold determines where the surface is considered to be within the dataset.  Normally a higher value will extract surfaces of denser material.  This value should usually lie in the range 0 to 1.

Maximum

Some datasets contain data values that need to be rejected (for example the bunny dataset).  Use the maximum box to reject any data above a certain value.

Bits

Most medical datasets are only record values up to 12 or less bits.  This value is used to normalise the data.  Each element is divided by 2^bits.  For 1 byte data, any value over 8 is ignored and 8 bits is used instead.

 

Examples

Below are some samples of some surfaces extracted from volume datasets.  The sites used to obtain this data are:

 

*         Stanford data.  These are sent as a multi file archive.  To use in visualiser, you will need to concatenate all the files into a single .raw file.

*         Universität Tübingen data.  Note these files end in .gz but they are not compressed – simply remove the .gz to obtain a raw file.

 

Visualiser uses x for the slice direction, y for the major and z for the minor (this is the reverse order to the quoted dimensions and scaling ratios).

 

Click on the images below for a larger version.

The Stanford Bunny dataset.

 

360 slices x 512 x 512

16-bit (12 significant), big-endian

Bonsai tree dataset.

 

256 slices x 256 x 256

8-bit

Lobster dataset.

 

56 slices x 324 x 301

8-bit

(scale is 4:1:1 not as quoted, notwithstanding visualiser’s reversed order)

Teapot dataset.

 

178 slices x 256 x 256

8-bit

(scale is 1.4:1:1 not as quoted)

 

MRbrain dataset.

 

109 slices x 256 x 256

16-bit

(scale 2:1:1)

CThead dataset.

 

113 slices x 256 x 256

16-bit

(I didn’t scale this as it looked ok as-is)

CThead dataset (with a lower threshold).

 

113 slices x 256 x 256

16-bit

Looking at the literature I think this might be a mirror image.

Engine dataset.

 

128 slices x 256 x 256

8-bit

 

Foot dataset.

 

256 slices x 256 x 256

8-bit

.