Octree Towers
Sunday, January 31st, 2010I found a sneaky bug in my overhang-detection code which was preventing altitude. Here are 10,000 blocks of altitude.
I found a sneaky bug in my overhang-detection code which was preventing altitude. Here are 10,000 blocks of altitude.
Mold-style growth, from the edges.
Count ‘em, 10000.
With the octree this only took an hour to generate.
Update: Okay, so I counted, and there are only 9,999. My bad.
It’s about time somebody made a bear out of cubes.
Not much of a bear, really. It can’t be blamed for that, but I can.
Here are 2500 cubes all smushed into another cube without overlapping, which I accomplished by means of a cleverly-arranged series of object-oriented whistles and knobs in just over two of your Earth minutes.

That’s mathematics, son. You can argue with me, but you can’t argue with figures.
Commentary and code follows.
(more…)
Another visualization of an octree expanding to encompass an increasingly wide-spread array of points, coded in Python for Maya using Pymel.
Normally octrees start large and subdivide. This is fine for static scenes, or scenes in which the boundaries are known, or scenes managed by reasonable people.
Being perverse, I decided to make an octree that could adapt to its circumstances, and grow extra layers if necessary to accommodate objects beyond its limits.
This, my friends, is what we are witnessing here today. The first live, growing octree ever captured on film. By me.
As locators generate, this octree subdivides to keep any node from holding more than 10 at once. If a locator generates outside of the octree, the tree grows super-nodes until the point is contained.
2500 iterations, each one hand-polished and placed by skilled craftsmen in Singapore.
No overhangs, finally. I know *I’m* relieved.
A rotating cube made of other, smaller, more industrious cubes.
The code is shy, but I am grooming it for society. For now rest assured that it uses the allIntersections node, in a wrapper conveniently provided by CGTalk member octupe in this thread.
One of my favorites so far. This has a particular sense of structural interrelationships I’ve been watching for — patterns like the two parallel longblocks repeated throughout, emerging from the combination of growth points and collision detection settings.
Scaling cubes based on their proximity to love.
Details and code follow:
(more…)
After some time away, I have returned to my shrubberies. This one is deceptively tidy, and very tightly packed. Really, it’s barely a shrub at all. More of a malignant ziggurat.
Code follows:
(more…)