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

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: , ,