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.

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.

the link to the doc

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.


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

Saving uncompressed TGA

(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


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.
[cce lang="java"]
//toggles the texture on and off

//toggles the collada material

//replaces the loaded texture with a supplied PImage

//reloads the original texture


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.

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
[cce lang="java"]
PImage img = loadImage(“img.tga”);
Until a fix gets in, here is a workaround
[cce lang="java"]
PImage img = loadImage(“img.tga”);
PImage outImg = createImage(img.width, img.height, ARGB);
for(int x = 0; x < …. waitaminute

It’s fixed for 0136. WooT

One down thirteen to go

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.

[cce lang="java"]
problem = pebkac;

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

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.

Processing Collada Loader version 001

Here it is.


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.

  • Multiple materials
  • Multiple geometries.
  • Cameras
  • Lights
  • Splines
  • 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.