Wednesday, 30 December 2009

New Year, new Library

F32 yeah enbiggen

As part of getting ready for my new job, I'm in the process of publishing a lot of the common code that I've been using over the years and I thought why not start a collection. And so the very humble and small PolymonkeyLibs begins.

The first official package is polymonkey.time it features 3 classes that relate to (you guessed it) time.

Time - used for keeping track of TimeDelta (the time in seconds of the previous frame) can also speed up and slow down time.

TimerEvent - A helper class that will automatically call a timerEvent() method in a set number of seconds.

StopWatch - A helper class for timing how long an operation takes.

Docs, Examples and version 001 of the library are in the Download tab of the page above. If you've got questions / problems / requests then send em this way.

Matt Ditton

Disclaimer: Although the internals are as accurate as possible. Everything gets converted to floats or ints when talking to processing. So your mileage my vary. And although it works like a charm I wouldn't use it to run a pacemaker or anything.

Labels: , , ,

Thursday, 15 October 2009

When in doubt add more polys

Tessellate test on Evolving Geometry from matt ditton on Vimeo.

More tests, this time on the effect of tessellation on the geometry. Thanks for JohnK for the idea. I quite like low-fi polygons. But seeing the higher res version is quite nice. The full description is on the vimeo page.

Labels: , , , , , , ,

Wednesday, 14 October 2009

Evolving Geometry. Or what I did with my Sunday.

Evolving Geometry from matt ditton on Vimeo.


For my first attempt at making a genetic algorithm, is there any better subject than the Mona Lisa and some random dude from google image search?

The premise is simple. By randomly changing the color, position and diagonal edge direction of a grid of polygons can you turn it into the target image.

All written in Processing, the grid draws to a PGraphic on every change and a fitness test is done against the target image. If the fitness is better than or equal the change is kept. If not, it's reverted. Keeping the equal-to in the test causes that crazy vertex movement in the lower image, so that bugs going.

The left image is the grid with vertex colour, the right is the target and the middle is the wireframe of the polygons. The number is the fitness. The lower the number the closer tobeing an exact match.

This is the slowed down version for making a video. I've got it running in a thread and it's stupid fast. But because I'm drawing in the thread I'm getting colour sync errors in the main draw thread. It works fast but the flashing colours get pretty distracting.

Inspiration for this work has to go to Karl Sims and Roger Alsing. They are the giants, I'm just standing here.

Labels: , , , , , ,

Monday, 31 August 2009

Processing vs. Unity

Recently I been using Unity3D. And I'm impressed. I've been working in game engines for about a decade and I've never encountered one that is so easy to use. It's got basically everything you need, integrated with any package you'd want to use, and you can get a license for $200. That is amazing.

Because I'm also teaching it I've been putting together a bit of reference material about it. The first one is a Processing vs. Unity document. It covers some of the syntax differences between UnityScript (a Mono run version of JavaScript) and Processing (well it's Java under the hood). and here it is..

Processing_vs_Unity.pdf

Labels: , , , , ,

Monday, 10 August 2009

The Swarm is Coming

Swarm (working title) from matt ditton on Vimeo.

In the mad panic at the beginning of semester I totally forgot to post this video to the game I'm working on. Swarm is all made in openframeworks for the iPhone. There are also a bunch of support tools that I wrote in processing as well. More info soon.

Labels: , , , , , ,

Wednesday, 5 August 2009

Processing SBS and HD

SBS ONE, First Australians from matt ditton on Vimeo.

I've posted a version of the processing SBS work to vimeo. You can watch it in all it's HD glory.

Labels: , , , , , ,

Wednesday, 8 July 2009

So like, what happened to Matt?

night merry go round with no focus

Over the last few months I've been working on a number of projects that are slowly getting to a stage where I can talk about them. In the coming weeks I'll be updating the site and writing up some details on all of them. But as a teaser.

One of the big one's was work that I did for Qube Konstrukt. Qube was after something different while they worked for SBS ONE and SBS TWO. So enter Processing and that Generative "look". As luck would have it they called me up, had a chat and hit the ground running making cool stuff.

There are few projects that I've worked on that have been so rewarding. It was a dream to work on, and Qube are flat out awesome. And now the output is slowly making it's way into the world. To begin with SBS has posted a (badly compressed) selection of their new station id's to their facebook page. You can see them here.

The first two are from Qube, the next two are by Mighty Nice and the last three are from Iloura. Amazing stuff all round. The sound reactive particle system in the first one (the red one) is mine.


Labels: , , ,

Wednesday, 11 February 2009

GCAP 2008 - And now my talk

Some wonderful people posted the entire talk on you tube. That's brilliant I was told no one got it. So here it is...

Part 1



Part 2



Part 3 (this is the one with the pretty examples!!)



Part 4 (more pretty things here)



Part 5

Labels: , , , , ,

Wednesday, 10 December 2008

My screen is full of lines

More videos of stuff I'm working on at the moment. This time vector forces and particle collision are sitting on my mind.


Vector Force System from matt ditton on Vimeo.

Labels: , , , , , , ,

Wednesday, 26 November 2008

GCAP 2008 - Videos from my talk

These are videos of some the software that I showed off at GCAP


Drawing With Strings from matt ditton on Vimeo.


HeightField Demo from matt ditton on Vimeo.


Particle System Demo from matt ditton on Vimeo.


Slitscanning Workspace Demo from matt ditton on Vimeo.


Space Invader Class from matt ditton on Vimeo.

Labels: , , , ,

Saturday, 22 November 2008

GCAP 2008 - Slides from my talk

On Friday I gave a talk at GCAP. The topic was on teaching artists to program and how this can benefit the whole team. It was a chance to show off some of the experiences I've had through the year while teaching processing.

It's also got a few tips on how to write code for other artists in your team to use. The whole thing went over well, and as promised here are the slides from the talk. If I'm really lucky maybe I can get a recording of it.



Labels: , , ,

Saturday, 12 July 2008

Objloader version 014 up on google code

Now with VBO!

One piece of advice for all who come after me. When dealing with arrays in opengl, remember that the stride of an array IS IN BYTES. That's right F**KING BYTES. One Float is 4 bytes. to get to the second element in a float array you need to skip 4 bytes. Motherfu----.

Seriously I spent about 8 hours on that bug. Just another example of information so common knowledge I knew nothing about it. Opengl you are a fickle mistress.

mattD

Labels: , ,

Monday, 5 May 2008

copy for HTML.

Processing has a "copy for discourse" feature and when it works it awesome. It takes the code in the pde file and formats it for the discourse board. But this doesn't help when you want to publish some code on the rest of the internet. Something like this
void setup(){
String myString = backwards("the quick brown fox");
}

String backwards(String s){
String t = "";
for(int i = s.length() - 1; i >= 0; i --){
t = t + s.charAt(i);
}
return t;
}

OMFG colour. Adds a lot to code doesn't it.

Well I thought that maybe other people might find this tool useful, so here is the pde that makes the pretty colored text above. It takes the contents of the "formated for discourse" clipboard and formats it for the web.
  1. Get your code and copy it for discourse.
  2. Run the copy for HTML pde.
  3. Paste into blog.
copy_to_HTML

Labels: ,

Saturday, 29 March 2008

we're up on google code

city lights river view
In the last week I've been putting the two libraries I'm involved in up on google code. So the OBJLoader and the Collada Loader both have nice safe source controlled homes. Over the coming weeks I'll be making sure that all documentation and examples are also up on google code.
the OBJLoader
the Collada Loader

Labels: , , ,

Friday, 21 March 2008

Saving uncompressed TGA

Arch
(this image has nothing to do with this post. Just something I'm working on)

Alas RLE compression isn't supported everywhere. Can't expect the earth, it's only old enough that I can't find when it was invented. But onto the problem.

I needed to dump out uncompressed tga's from processing. Turns out this was an old processing feature that was upgraded to RLE. Because I'm still living in the dark ages, Toxi pointed me towards the original code that he wrote for uncompressed tga saving. Just so I don't lose it and maybe other people are looking for something like this. Here is the slapped together bit of code.
The zipped up sketch


MattD

Labels: , , , , ,

Tuesday, 11 March 2008

Collada Loader 003

The Collada Loader has been updated and now sits at version 003. There are a few new functions involving materials. You can check out the supplied example file for the usage. But here is the list of new stuff.

model.toggleTexture();
//toggles the texture on and off

model.toggleMaterial();
//toggles the collada material

model.setTexture(PImage);
//replaces the loaded texture with a supplied PImage

model.originalTexture();
//reloads the original texture

ColladaLibrary_003_demo.zip
ColladaLibrary_003_lib.zip
ColladaLibrary_003_src.zip

UPDATE: I'm sorry to say that with the updates to the XML library in processing, the collada loader broke. And broke hard. If anyone would like to help out in fixing this, that would be great. I'm afraid free time is just not happening for me at the moment.

Labels: , ,

Thursday, 6 March 2008

processing and tga's

You can always depend on a tga. That faithful image format is like an old friend. But processing has a bug where is saves them out upside down. You can see the bug in this code

line(10,10,90,90);
save("data/img.tga");
PImage img = loadImage("img.tga");
img.save("data/img2.tga");
exit();

Until a fix gets in, here is a workaround

line(10,10,90,90);
save("data/img.tga");
PImage img = loadImage("img.tga");
PImage outImg = createImage(img.width, img.height, ARGB);
for(int x = 0; x < y =" 0;">

UPDATE:

It's fixed for 0136. WooT

Labels: , , , , , ,

Wednesday, 5 March 2008

one down thirteen to go

20080122_07-15_HeightField_Example_0008

Week 01 of 1109GFS is in the can. Thank you to all the awesome students who came along. I had a great time. See you same place, same time, next week.

remember

problem = pebkac;
lol(u);

mattD

Labels: ,

Saturday, 1 March 2008

1109GFS and trying to explain (art == data)

Words as Lines, The first book of Genesis

This is the last weekend before I start teaching at QCA. This year between working full time making games, I'll be teaching two classes called 1109GFS and 1112GFS. They have been titled something like "Programming for Artists 1 & 2" but I prefer to call them 1109 and 1112.

The formal structure of the class will be teaching processing to students of the games design degree. But the subtext of whole thing is to try to show that you can view art as a form of data. It's a different approach and one that takes understanding before you can appreciate all the ramifications of what that approach means. Consequently when I talk about this idea at work they smile politely and nod. There is a lot of scratching and shaking of heads, and it mostly finishes with everyone agreeing that I'm on to something, we just can't put a good finger on it.

First class is on Tuesday night. Wish me luck.

Labels: ,

Tuesday, 19 February 2008

Processing Collada Loader version 001

Here it is.

Library
Source
Example

So why another format?

Lot's of reasons but mostly because I needed to load Collada files into processing. The added bonus is that the collada format is far more extendable than the obj format. It can store mesh, splines, cameras, lights, skeletons, skins, animation and even physics. So it's more a storage medium for 3D data rather than being just a model format.

What can your loader do for me?

At the moment the loader can load and display one model with one material (textured or untextured). There are also several helper functions for drawing the bounding box, vertex normals, face normals and the wire frame. You can see them all in the example above.

Is that it?

In this release, I'm afraid so. There is a lot more work to do. The current todo list (in order) looks like this.
  1. Multiple materials
  2. Multiple geometries.
  3. Cameras
  4. Lights
  5. Splines
  6. Animation

So when is it going to be finished?

Um. I'll get back to you on that.

Can you add support for (insert thing here)?

Yes. It's meant to be used. If there is something that you need from the loader just ask.

I broke it.

Excellent. Drop me and email and I'll try and get it sorted.


MattD

Labels: , ,