## Next music video underway (teaser)

### November 10, 2013

## Voxel Worlds

### September 11, 2013

I’ve been experimenting further with Ray Marching (using Processing) – which is a 3d rendering technique that uses algorithms and math to create solid forms. I’ve developed this Ray Marching technique into creating Voxel Worlds. Voxels are like pixels, except they are 3d, and can be any shape you want (Minecraft is a cube based Voxel world for example).

The concepts below are also potentially the basis of a music video commission, from a Canadian friend of mine and a very talented musician. More on this as it develops.

I’d also like to thank the Arts Council of Northern Ireland for the support they’ve given me – the work below evolved out of the funding help I’ve received from them.

## Prototyping with Algorithms (Part II)

### August 24, 2013

To continue my exploration of finding physical forms through algorithmic generation – here’s how my imaginary ‘game console’ ended up. After spending time creating LED light structures, I finished off the materials and colors, and then had some fun playing around with some random mutation of the overall algorithms.

This is just a scrapbook cataloging of my process of coding and experimentation. Just to reiterate, these 3d forms are created purely out of code and algorithms, there’s no wireframes, polygons or manual design in a conventional 3d sense.

I had in mind to knock out another musical video piece based on this. Would take a bit of time though to do well, we’ll see…

## Prototyping with Algorithms (Part I)

### July 9, 2013

Recently, being happily lost in my new world of 3d generative code art, i.e. 3d forms, fractals and geometric structures created out of functions and algorithms via the technique of Ray Marching, something made me stop and direct my focus to a real world application of this concept. This was the launch of the new Play Station and XBox consoles. I’ve been a fanboy of both machines over the years, and waited eagerly for the big reveal, as much to see what it looked like. I was kind of disappointed. Nothing more than square black boxes. Was this lack of imagination, or fear of being bold?

The old PS2 had its distinct corrugation, and the last XBox slim had its womanly curves. But since then, ever more conservative product design it seems.

I started to think of designing my own console, using functions and algorithms that established a framework, and through which, random mutation could create endless possibilities of physical design. I’m starting to believe more and more we need computers to augment and extend human imagination – and doing this through generative processes.

So I thought I’d kickstart a blog on this, and begin with something basic.

The fist stage is the overall ‘hull’ or superstructure.

Let me explain the above..

With Ray Marcing, imagine that the camera point of view is looking in the direction of every pixel on screen, sending every position in space from near to far into a single function, that function will return a number telling you whether you are on the surface of an object, or inside or outside the object.

Lets start with a simple box.

*float d2=sdBox2(cp, new PVector(1, .1, 1));*

Deform that box with some Perlin Noise to give it some random curves and mounds.

*float hull= d2-nv(cp); // nv is the noise function*

Wouldn’t be very console looking though. But add in some symmetry rules, i.e., mirror the horizontal plane, and mirror a vertical plane down the center of the console, so that left and right are symmetrical too.

if ( (cp.x)<0.) { // fold 1

cp.x=-cp.x;

}

if ( (cp.y)<0.) { // fold 1

cp.y=-cp.y;

}

Then quickly animate the deforming ‘noise field’ to see one new design automatically created after another.

After tweaking the algorithms, shaping the general framework of design possibilities, the last image above I was happiest with.

To breifly reiterate, Ray Marching is a 3d techinuqe that doesn’t require geometric meshes or wireframes to be created, instead, everything is expressed as a mathemcial function. This gives rise to very complex and experimental 3d graphics impossible in conventional 3d animation and software packages.

Next up is adding some heat vents. I’ll start with a basic sphere shape, and using boolean operations, cut away a cavity to create the vents.

–

I’ll now use the same sphere shape to do another boolean operation with a grill structure to create the vents structure.

–

now place the final vent structure back into the hull.

–

up the number of vents a bit

–

Finally, I want to add a nice bevelled edge around the vent structure. It’s another boolean operation that uses a slightly larger scaling of the original sphere that intersects with the hull to find a conforming rim.

–

So now that the basic hull, vent & rim elements are created, and importantly, all connected via a single algorithm / function, I can start playing around with mutating and randomizing the whole, by changing as little as one parameter / value.

Here I scale up the sphere. Remember, the whole object is based on a simple box and sphere that uses lots of boolean operations to create the final console prototype.

–

add left / right symmtery to the vent structure.

–

4 way symmetry, perhaps too much!

–

left / right symmetry, with noise deforming the sphere (which creates the vents)

–

So there it is, creating a random prototype out of algorithms. It’s just a start though, I’ve a lot more I want to develop with it.

This video I hope demonstrates best my overall philopsophy of using algorithms and random generation to discover new forms and conepts that would be impossible to us through conventional pen and paper and conventional software packages.

Next up is refining the algorithm, adding a nice abstract LED light panel. Texturing and surfacing – black plastic, metal chrome, neon blue lights etc..

Here’s a preview of the next stage, I discovered an better shape I was happy with, and put the vents flat in either side as a starting point (which can still be deformed in many ways) – and also with vents, I added some nice curving deformation on the grill structure, and you can also see the start of my abstract geometic thoughts on the LED lights – which will be added to the surface structure front and back.

## Hello 3rd Dimension

### May 29, 2013

Further to my last post ‘Distance Fractals’, I thought I’d write a bit more on it, as it seems to be my new direction.

I’m now back living in Belfast, Ireland, after living in New York for 9 months. I tried to ‘make it’ there, but in the end, was to commercial and competitive a place for the likes of me. I need to do what ‘I’ want to do. It’s what I’m best at. I tried to help a friend set up an Interactive Studio there. But I had to compromise with what I wanted, and with what clients wanted. The two don’t coexist.

Since moving back, I’ve been applying for film funding and arts funding for my own ideas. I feel inspired and confident again, and will hopefully being starting up a studio here. More to follow..

Anyway,

I’ve always wondered how I could create generative and algorithmic art in 3D, rather than just in ‘flat’ 2D, as with all my works such as Eyegasm, Zio, Nest That Sailed the Sky etc etc.

Do I create some nice random meshes in Processing – and then import to some 3d software for final rendering?

I never felt comfortable doing code art in 3D – real time OpenGL is too ‘tech demo-ey” and exporting to a 3D package doesn’t make it code art anymore.

Then one day I discovered Distance Fractals, and Ray Marching.

Ray Marching, put brutally simply, is creating shape and form in 3D without creating geometry, but by writing an algorithm, or function, that defines every point in space as being either a surface, or empty space. Ray Marching, approximates this into a 3d scene quickly by ‘Distance Estimation’ – with complex lighting, reflections, shadows, glows and fog and not too much extra CPU overhead.

Perfect. I can now play with code and functions, and see the final final result when I run the program..

Ray Marching isn’t something that new – and I’m a little late to the party maybe, but the thing is it’s only a small party that not many people know about.

So what happens when you throw that most beautiful and complex of mathematical functions, the 3d fractal, into a Ray Marcher ?

You get this. Thanks to Edward Porten on Open Processing.

This man is a genius. Thank you.

I now have code in front me to explore creating 3d animation and worlds out of algorithms, that render beautifully, in almost in real time, that I can interact and move around in.

It’s the ultimate sandbox.

This is a Menger sponge. A primitive iterative fractal.

Here’s the code.

## float map(PVector z0)

## {

float r = length(z0);

float t = 0.0;

int i = 0;

float ss=1.;

for (i=0;i<iterations && r<60.0;i++) {## z0.x=abs( z0.x);

z0.y=abs( z0.y);

z0.z=abs( z0.z);

if ( z0.x- z0.y<0.0) {

t= z0.y;

z0.y= z0.x;

z0.x=t;

}

if ( z0.x- z0.z<0) {

t= z0.z;

z0.z= z0.x;

z0.x=t;

}

if ( z0.y- z0.z<0.0) {

t= z0.z;

z0.z= z0.y;

z0.y=t;

}## z0.x=scale* z0.x-CX*(scale-1.0);

## z0.y=scale* z0.y-CY*(scale-1.0);

## z0.z=scale* z0.z;

if ( z0.z>0.5*CZ*(scale-1.0)) z0.z-=CZ*(scale-1.0);r=max(z0.x-1, max(z0.y-1, z0.z-1));

ss*=1./scale;

}

return r*ss;//the estimated distance

A Menger fractal is Nothing special, but what happens when you experiment with small, random transformations and rotations in your code? You get this..

mmm much more interesting. You then take it further with more mutations…

You could now be looking at a natural form from the real world – because of the random mutations in a simple geometric formula.

A principle of evolution, as I understand it, is genetic mutation. The DNA of the offspring of every 2 parent species will be slightly different, because of random mutation, allowing for the variety and diversity of life to evolve. And to the best of my knowledge, these mutations in DNA are caused by the background radiation of the universe, i.e. the field of energy remaining from the ‘big bang’..

This I love. The example above unifies all of creation in numbers and code, which seems to motivate me most as an artist. The forms of nature, at their heart, are simple algorithms and geometeric relationships, made complex and beautiful by iterative mutations.

A final big thank you to all the people who are developing and inspiring this kind of work – Syntopia, Knighty, Iñigo Quílez, and everyone on the Fractal Forums.

It’s times like this I want a T-Shirt that says ‘I F**king Love Computers’.