I can't really post anything about work, though it probably wouldn't hurt to say that I've been working on an automated matte extraction program in my spare time. It uses what is supposedly a state of the art algorithm for extracting mattes from natural images. It sometimes works pretty darn well, though overall it's fair to say that green screens aren't going away any time soon.
I was grumbling about what a poor matte I was getting from this image, when it occurred to me that while it's a lousy matte, it's a rather striking artistic effect.
I'm interested in people's thoughts on licenses for the jskFx code. My quick default choice was the GPL. Not for ideological reasons. My brief thoughts on the philosophy of open source licensing are that I think the GPL is the right choice for public computing infrastructure (OS's, compilers, network stacks, and so on), but other licenses have their place. I once had plans to commercialize the work, and it represents my most of my creative computing code, so it feels a bit odd to simply give it all away. The GPL seemed the best way to go.
But if I discover there is a real appetite for people to use the code in commercial context, but they are scared off by the GPL -- i.e, if it comes down to a choice between the GPL and the code actually being used -- I would be happy to go with the LGPL.
Feel free to drop me a line and tell me your thoughts one way or the other. I am at kevin dot atkinson at gmail dot com. Or submit a comment.
Nuther topic is the somewhat dishevelled state of the code, and the prospects for it being tidied and maintained in the future. As I mentioned in the previous post, it was written in tremendous haste, so it is frequently ripe for refactoring, and virtually without any formal test code. My fantasy is that some eager and capable coder becomes the maintainer, and takes up that challenge, since I am going to be working kooky long hours for the next year at least. Any takers?
[Update: For those new to the blog, I've written a dataflow framework for real-time video effects, plus a number of effects implemented within that framework (some of which are demoed in the above video). In this post I'm announcing that I'm open-sourcing that framework]
A few months ago, I made this post on reddit.com, where I crowd-sourced my then-just-begun job search. The post went to the top of the programming page and even squeaked onto the front page of the main reddit. As a result, I got an interview with Weta Digital, and after two very long interviews, I was offered a gig there with the code group. My wife and I leave for New Zealand tomorrow. (Finally! Our visas were delayed for about six weeks, but they arrived by Fedex this morning.)
I've been vaguely intending to commercialize this work for a year, but I just don't seem to have it in me to be a software vendor, and I think it's a bit sad to seal these effects away inside closed binaries. Also, I no longer have the time.
So, I decided to open source the lot. Here's the code:
The code is generally not half bad, though after a year where I've really concentrated on enhancing my coding skills (reading Andrei Alexandrescu, learning template meta-programming and such like, delving deeper into boost), it's not the way I'd do it now. It was written in six weeks, on a brutal deadline, so signs of rushing are sometimes apparent (though most of the effects themselves were developed over the previous couple of years). Also, this stuff is way overdue to be ported to the GPU.
The "flowy-blowy" effect never made it into the jsk framework, since I just ran out of time, and the code was a bit of a mess. I'm also a bit wary of releasing it as is, since it uses Jos Stam's semi-Lagrangian interpolation technique, which I believe is covered by some obnoxious patent or other. Messrs Lagrange, Navier and Stokes were kind enough to not to patent their stuff, but Mr. Stam, or perhaps just his employer, had other ideas.
In any case I'm currently rewriting it using a lattice-Boltzmann approach. Hm. Maybe I should look into the patent situation there? But then, I know that Blender's fluid sim is lattice-Boltzmann, so it should be okay.
About the name: The code was created in its current form last summer for a cool gig that a fellow named Joel Gethin Lewis (interaction designer, bon vivant, and all around jet-setting, conference-headlining man-about-town) landed us in New York. You can read about it here. For the gig, I took some video effects I had written over the previous couple of years, cleaned them up, and then wrote a node-based coding framework that they could operate uniformly within, and wrote a couple new effects besides.
A clever fellow coder named Shawn Bonkowski also created some effects for the show, though I haven't included his code in this release. I'll be in touch with him to see if he'd like his stuff included in the next release.
As a result, I used the prefix "jsk" (for Joel-Shawn-Kevin) to all the objects in the library. All the code in this release is my own, but I kept the prefix to honour the contribution of the other guys to the event, and commemorate the circumstances that gave it its birth in its current form.
The endlessly inventive directing duo oneinthree last year produced a visually scrumptious music video which uses the Droste effect with hypnotic results. Dudes are on their way to the big time, recently producing their first big budget commercials in Europe.
I was inspired to create a realtime version of the effect which can be downloaded here. Only for mac, currently, though if the people clamour for it, I'll recompile for windows.
Update: Here's the PC version! Unzips to a directory containing droste.exe. With any luck you have all the required dependencies. Drop me a line at kevin dot atkinson at gmail dot com if you have issues.
Update:Some Windows users may have to install the VC runtimes.
Almost forgot to mention: if you are running the app, press 'f' for fullscreen, 'w' to return to a window, and 'esc' quits.
Update:I haven't had time to do a full source release, since it is going to require a lot of time for clean up, and putting together a build, since the source files are scattered among different libraries I use. Short of that, here's a link to the file that contains the rendering code, for them as are interested in such things. There's a nice article by Jos Leys explaining the math here.
I needed code for the 2D and 3D distance transform (for my dendrogen toolkit), and the only thing I could find used ITK -- lovely toolkit, but that's a big dependency I didn't want to drag in. I looked up the algorithm, and it turns out it's dead simple.
Curious thing about the distance transform is that approximate algorithms have been around for a while, but so far as I can tell, an efficient (linear in the number of pixels) and exact algorithm was only devised in 2004, by Messrs. Felzenszwalb & Huttenlocher. Their solution is also beautifully simple. The paper contains pseudocode which can be directly translated into C.
The above pic is a slice through a 3d distance transform of a set of points, and the corresponding 3d voronoi diagram.
I added the ability to optionally generate voronoi regions. The code mostly tests with points, but it will work with arbitrary regions as well. It's a VC Express project, but the code is all portable. The test code uses OpenCV just to display results, but the distance transform code itself is in a single header and has no dependencies beyond the C++ standard library.
If you look at the code, you'll notice an OpenMP directive, which sped things up by about 25% on my slow-but-dual-core laptop. The tiny amount I know about OpenMP is from a Doctor Dobb's article I read years ago, so I don't know if I'm using it correctly, except to say that the results appear correct, and it did indeed make it go faster.
I'm currently making a open source software toolkit for procedural tree generation called dendrogen (I figure every open source project needs a catchy name ;-)
My plan is to create efficient, practical implementations of promising tree generation algorithms, ready for incorporation into modern CG pipelines. So far I've implemented the algorithm from Runion et al's paper Modeling Trees with a Space Colonization Algorithm, and I'm half-way through an implementation of the algorithm in Rodkaew et al's Particle Systems for Plant Modeling.
I currently have no plans to implement L-systems, since 1) it seems that despite their extraordinary power for compactly describing rich plant geometries, they are not very directible -- it's hard for an artist to end up with a tree of a desired target geometry; and 2) I believe there are already well-developed tools in that area. My hope with the tool I am building is that it will be the center of a artist-centric tool that will permit interactive sculpting of foliage envelopes.
If I'm wrong about L-systems, please let me know.
The first phase of the project is to create high quality, well-documented and thoroughly tested C++ implementations, together with python wrappers that will be written in tandem.
The next phase will be creating tools for generating the geometry of the tree itself, using the skeleton generated by the code in the first phase. The tentative plan at this point is use implicit surfaces.
The attached screenshot is from Maya, but there is no Maya dependency in the code.
I'm currently leaning towards an LGPL license. If you would like a snapshot of the current code, let me know (kevin.atkinson at the domain gmail.com).
I just accepted a job at Weta Digital in New Zealand, and assuming all the visa-getting rigamarole goes as planned, Julie and I will be heading there in about 6 weeks. I will be a "CG Software Engineer" -- it is spelled out in the contract that that will be the exact text of any screen credit I might receive. So in the next couple of years, if you see a movie where Weta was an vfx vendor, and you stay until the bitter end of the closing credits, after the Key Grip and the Best Boy and the Caterer and the Parrot Wrangler, you may see my name up on the big screen, in 7 point type. Which will be as satisfying to me as a director's credit.
Calling all directors: let me be Olivier Gondry to your Michel.
I am a computer vision programmer and vfx junkie with an obsessive interest in novel applications of computer vision techniques for visual effects in music videos, commercials and film.
Seriously, let's do lunch.
Also: I do live interactive installations, create novel sites of play, and perform various other hacks on the human visual system.