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.
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.
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.
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.
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…
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.