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