Sunday, 13 April 2014

Update on Major Project

I think this project deserves an update.

I've been messing around with ofxNSWindower, and have managed to get a fullscreen GL context on one screen while maintaining a control GUI on the other. Ive been told to invest a little more in the visual component of this artwork so I'm going to start doing that a bit more. A quick gallery of stills:


Squarees(left), and Squidees(right) being projected on the Peter Karmel building at ANU:



a screenshot of Fluidees:


and a screenshot of Rainees (they do actually move):


I've also been working on another project that grabs short video clips and incrementally loops them called VideoSquarees (this has been updated to run more efficiently, and with a longer loop cycle): 


I put some of my efforts into what might be considered a side project unless I can find an application for it in the overarching project:

Thursday, 20 February 2014

Spherical

I've been playing around with meshes in oF and I found a cool algorithm to create a 3d sphere of points using segments and a radius here. I also found a way to scramble the points from the set segment line by changing a variable.

I used the product of the points position relative to the centre of the sphere and an array (see C++ vector) of scaled noise values to change the position of the points.

Once I had the positions moving and changing to noise I added the other drawing modes like applying a subsection of the noise array to entire rows of the sphere.

Then I applied a mesh to the points in the sphere and drew the mesh to screen

I also added a simple UI for control of the object, along with lighting, and colour between the vertices.

At this point it looked a bit like this:



Also I used this method of getting normals for the faces of the object:
for all the vertices in the mesh except the first and last, add a normal at the normalized vector of the perpendicular between the previous and the next vertices.
Then I tweaked the lights a bit and considered the project finished, however I kept having problems with the addon I used to do the UI (ofxSimpleGuiToo) not saving the settings sometimes and not loading them from the XML file correctly (for some unknown reason, I think because its not compatible with oF 0.8.0)

I also wanted to implement some post processing fx. I hunted around for a bit and found ofxPostProcessing, and then implemented it.

By this point ofxSimpleGuiToo was having a conniption and wouldn't do anything that I asked of it and so I decided to upgrade to the elegant but slightly more complex, ofxUI, which is by far the superior technology.

Here are some screenshots of the finished product, along with a demo video:












Spherical Demo from Gareth Dunstone on Vimeo.

Sunday, 20 October 2013

Quick drawings

This method has been used elsewhere!!! EDIT: see Robert Hodgin http://roberthodgin.com/stippling/
I AM COPYING IT!
So don't be surprised when you find it elsewhere.
I have however, ported the method to C++, and optimised it so it doesnt use the square root function involved with calculating the distance between two points (a^2 = b^2 + c^2).
Soooo....
PYTHAGORAS THEOREM, BITCHES!

Win for not doing hard math.
First, a picture of someone else's eye (no opt):


Second (no opt):

Third, a picture of my cat (with sqrt opts):

Friday, 11 October 2013

The ArrayCube

This project started as a quick sketch with Nick Noble, a COMP1720 student, to learn about arrays.

We created a cube object, gave it some values, a vector location and stuff. And whacked it into a 3d array, drew them all. And as soon as you know it we have some weird stuff like this:



And thats all great. But I liked this. I wasn't happy with all the crap that Processing was giving me.
"Only 8 lights" they said.
"You're drawing too many cubes" they said.
So I started porting it to openFrameworks:







Now look at me, creating classes in C++ for glory. 
Problem is that its even slower. 
WHATS THAT OPENFRAMEWORKS? YOU'RE EVEN SLOWER THAN PROCESSING?
So I did a few more iterations:



Made some changes:



But still, why is this crap running so slow?
C++ doesn't treat variables like Processing does. Assigning a value (using =) makes a copy of it. And I have a problem with that. I'm drawing many, many cubes. Like a lot of them. All of the cubes. And I want them to just grab some value from somewhere else to use as their opacity or brightness or whatever the hell I want to to be.

I needed to start using pointers.

I started using pointers. Things got faster.
I started using more pointers. Things got much faster.
I used pointers in a class, had them coming out my arse.
I set *my = &day and filled it with win.
I pointed at 0x4632b2b and fucking killed it.
And so now I'm like:
"HELL YEA! I CAN DO THE POINTER DANCE! EAT MY SHORTS, PROCESSING!"
But I was still not fully pleased. It was missing something. Some kind of other input and interaction with its surroundings that would make it whole. I looked high and low. I googled this and I googled that. 
And then it struck me.
"WE NEED SOME DSP ALL UP IN THIS BITCH!"
 And after learning very quickly how to use openFrameworks' ofSoundStream I finalised the code for having it not only play sound (End Theme by Zero 7), but react dynamically to sound input.
And this is the result:

Saturday, 24 August 2013

Simple Nodes with openFrameworks

I made a small, simple node system in openFrameworks today.
Its essentially just an array of ofNode objects, with lines in between them, randomly placed on screen.
Next I'll try creating my own node class, and add some animation.

EDIT:
I finished animating it. Unfortunately the openFrameworks ofNode class doesnt have an inbuilt velocity or acceleration. So I built my own in by making 3 arrays the same size as the number of nodes, filling the arrays with random values between -0.1 and 0.1 and then ofNode.move(); ing them using those values.
Not the most elegant solution, but hey... It works.
Next I think I will Perlin the shit out of their movement.


First video of animation

Second video of animation

Updates

Working with Processing for Uni, mainly creating my hybrid work, however I also have been practicing trying to create really really short programs really quickly. For storytelling I am still constructing ideas and how/what to do. For my personal work at the moment I've decided to ditch Cinder and begin working in openFrameworks because it has a gigantic community and seems to be more supported. Either way they are both C++ so it should be fine.

Hybrid Work
Working with the twitter4j library in processing along with a 3D simple gravity system to produce a data visualisation of hashtags. It can talk to arduinos as well, through Serial.write(). Still in progress and not polished however its moving along quite rapidly. Heres some of the preliminary photos of it.











Really Really Short Programs
I got bored and wrote a program in 5 minutes.
I call it 256 Shades of Grey.













openFrameworks
I have been playing around with computer vision and I've been trying to get the addon for face and expression detection working (unsuccessfully).
I did manage to get the openCv addon working (with the help of a couple of the examples).
Next step is controlling an arduino, or outputting sound.

Thursday, 18 July 2013

Messing around with linux

Over the past couple of weeks I haven't been doing much coding or art.
I've been immersing myself in the art of server maintenance.

I compiled my first custom Linux kernel (Gentoo), unfortunately it was a x86 kernel not a x86_64 and I needed sleep desperately. I got given a IBM eServer (346?) xSeries with dual Xeon 3.2ghz processors. So I've been playing around with that (currently its running Arch Linux).

I got more familiar with the use of bash scripting to start programs on linux servers. I followed a guide over here only used the system crontab because it lets me do things as different users :) I did this because bfgminer kept crashing within a screen session and killing the session it was in (not giving me any reason). This way: it crashes -> cron runs the script every 5 minutes -> the script checks if bfgminer is running -> if bfgminer isn't running restarts a new screen session and bfgminer inside it (success YAY).

EDIT:
Also for those running Ztex FPGA devices. YOU CAN RUN IT AT A NORMAL USERLEVEL!
You don't need to run everything as root (particularly if you are using bfgminer like me).
The information you need to know is here.