Archive for June, 2008

Goodbye my Sweet love

Monday, June 30th, 2008

So, LugRadio is coming to an end. The news actually, genuinely, brought a lump to my throat and a tear to my eye. How sad is that?

LugRadio was my first introduction to, and a primary method for discovering, so many new pieces of software which I’ve gone on to love such as Ubuntu and Clutter. I will genuinely feel the show’s absence and will feel far less informed of the ‘exciting’ events on the free desktop.

Salut, LugRadio!

Microsoft in having sense of humour shocker

Sunday, June 29th, 2008

The Bill Gates leaving video is another in a fine line of nice internal Microsoft videos (such as the wonderful Microsoft matrix spoof).

To provide a balanced opinion, however, I should probably link to one or two (seek to 3 mins in) of the less successful ones.

Chroma key with Firtree

Sunday, June 29th, 2008

The best way to test your dog food is to eat it yourself and so this afternoon I set out to write a little PyGTK app that would use the Firtree Python bindings to allow you to pull an alpha matte via chroma key. Chroma key, for the less SFX minded amongst you, is the process whereby the green backgrounds so beloved by special effects people everywhere are ‘cut out’ and replaced by… well, whatever you want your actors to be standing in front of.

Pulling a matte, as such a process is known, is a little tricksy and requires not a little tweaking. I had in mind an app which would let you load a high-res photo, pan and zoom around it lightning fast and let you see the results of tweaking all the matting parameters in real-time. Just the sort of thing Firtree is supposed to be good at. An afternoon’s hacking later and we have this little gem:

It is a recording of the chroma key app that, as of 10 minutes ago, resides in Firtree’s examples directory. You load your image, select something that is background coloured and fiddle with some sliders. Firtree’s pixel pushing powers allow it to reflect the result in real-time. I love it when software starts to become useful and not just Another Framework TM.

This is actually the second little app I’ve written which has used Firtree. I find writing little apps like this very good for shaking out bugs and exposing use cases I hadn’t though of. The first ‘non-trivial’ Firtree app was one I wrote at work. The app displays streams from a pair of computer vision cameras and allows you to monitor the stream, record it and overlay detected features in real time. It is suprisingly useful to be able to get on-demand feedack as to whether your funcky computer vision algorithm is working :).

Update: Should anyone care, you can also browse the source to the app via launchpad.

Best 3min tech presentation evar!

Thursday, June 19th, 2008

I’m not normally one for posting random videos but this presentation is almost exactly my ideal 3 minute technical presentation. Go on, it is only 3 minutes of your life.

For those reading in poorer RSS readers, you may want to follow the link to the original video.

Update: Apparently the player will just start the video on some people’s systems so I’ve put it behind a cut.

(more…)

Firtree redux

Wednesday, June 11th, 2008

This evening, firtree managed to render this:

blobby checkerboards!

Why is this impressive? Well, it means that lots of things are working and it is slowly reaching the point where it might actually be useful. Read on for an overview of the system.

(more…)

Firtree: a teaser

Tuesday, June 10th, 2008

Further to my previous post: this evening I typed the following into my computer:

kernel vec4 testKernel(void)
{
    float squareSize = 10.0;
    vec2 dc = mod(destCoord(), squareSize*2.0);
    vec2 discriminant = step(squareSize, dc);
    float flag = discriminant.x + discriminant.y - 
                 2.0*discriminant.x*discriminant.y;
    return vec4((0.25 + 0.5*flag) * vec3(1,1,1), 1);
}

My personal project, firtree, compiled and JIT-ed it into a GPU shader. I was then presented with this:

A checkerboard

Then I typed in:

kernel vec4 testKernel(void)
{
    float dotPitch = 60.0;
    vec2 dc = mod(destCoord(), dotPitch) - 0.5*dotPitch;
    float discriminant = 1.0 - smoothstep(0.3*dotPitch-0.5,
           0.3*dotPitch+0.5, length(dc));
    discriminant = sqrt(discriminant);
    return vec4(discriminant,discriminant,0,1);
}

I got this:

A spotty pattern

You’re not excited are you? Well, anyone familiar with GPU image processing frameworks might be.

In all seriousness, firtree isn’t anywhere near ready to play with the big boys. Come to that, it barely crawls out of its pram. For a start, kernels can’t be chained together… yet. The infrastructure is there though…

GLSL front end source code

Tuesday, June 10th, 2008

Recently, for a personal project of mine, I was trying to find the code 3Dlabs released for the front end to a GLSL compiler. This code is useful for a number of reasons; for me it was a nice starting point for a domain-specific, vector-oriented, C-like language.

In any case, it appears that the 3Dlabs developer website, where this code was hosted, is no more. Google searching is almost fruitless giving, as it does, a load of dead links. After a bit of a struggle I found a mirror of the September 2005 release and I’ve decided to mirror it on my site to make it a bit easier to download. The license is below. It’s a bit like a MIT or BSD license.

Copyright (C) 2002-2005  3Dlabs Inc. Ltd.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

    Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

    Redistributions in binary form must reproduce the above
    copyright notice, this list of conditions and the following
    disclaimer in the documentation and/or other materials provided
    with the distribution.

    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
    contributors may be used to endorse or promote products derived
    from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

LOL

Monday, June 9th, 2008

Link posted with no comment:

Comparison of file systems