MEL script for Maya that constructs geometry from 3D textures made in the hypershade.

1) Create the 3d texture

2) Create a brush from textures brightness values

3) Use the brush to break your objects

 

Cube

Create the 3d texture


The best textures divide the space into discrete zones.

But you can create whatever textures you want, as long as they are plugged into the layered texture attached to the texture cube,

Their brightness will contribute to the volume created.


Hint: Most 3d textures dont give discrete areas on their own. Marble is good because its black sections are separate from each other when scaled up, and so can define separate chunks/pieces.
Try layering 3d textures, and experimenting with the ways they blend.


Brush

Create a brush from textures brightness values

Samples - how many samples in each dimension to make. Keeping this to x^2 values will help texture sampling. 128 is about as high as I would push it on our 8 core 2 ghz machines. Just because of the amount of time waiting for boolean operations to calculate later on.


ISO value - Lower = blobbier surfaces, but safer.
Higher = more defined volumes, but at the risk of breaking the shell and making it invalid for boolean operation


Save to - The brush will be saved as an obj that can be imported at a later date.

BallAndBrush
Position the brush over your object(s)
EarchBroken
Use the brush to break your objects
After importing the brush, select the brush, then after positioning it, select the object or group of objects before hitting the button to break it. Naturally your chosen object should be a full volume for the boolean operations to work.

In theory once you have a selection of brushes, you should be able to mix them using boolean ops, but in practice this is verycomputationally expensive with high sample values, and sometimes just doesnt work.
But you still can use previous brushes on sections of the object you may want to break up further.

 

1) Create the 3d texture



2) Create a brush from textures brightness values

 

3) Use the brush to break your objects

Window

Positives :
Organic shapes, high detail, procedural.
All of Mayas texture nodes are available to aid the creation of brushes.
Maintains UV values
Applies surface to newly generated faces.


Negatives :
Reliant on Maya's Boolean operations - slow and sometimes doesnt allow you to boolean on a previously "booleaned" object.

Todo :
Mesh reduction without compromising the volume - to speed up boolean operations
-removing multiple planar polygons
Compile external application as a real Maya plugin.
Allow for oblong shapes.

 

 

Computer Games Programmer

Bournemouth University Graduate '08

BA(Hons) Computer Visualisation And Animation

Nottingham UK

email: jon_m_baker@hotmail.com