A* pathfinding applied to roto poly edges
A* pathfinding applied to roto poly edgesAs I mentioned in my earlier posts about anti-aliasing, I’m currently working on a Nuke rotoscoping plugin. The default Nuke rotoscoping plugin is really an artist’s drawing tool. You can define polys or paint on the image to create a roto matte. If you need a more precise edge, you’d usually use some sort of keying tool such as Ultimatte, Primatte, or Keylight. These tools are typically used with a green screen.
So, my little experiment: Coming from the games industry, I’m quite familiar with pathfinding algorithms. Would it be possible to use A* pathfinding (the simplest of them all) to refine a roto poly to follow the edge of an image, to give a result much closer to a chroma-keyed matte? This wouldn’t work well for things like hair, but perhaps it might be useful in other situations.
Procedural Architecture
Procedural ArchitectureI thought it’d be interesting to go back and review a bit of work I did for fun a few years ago. I’d been reading Shamus Young’s excellent series of articles about building a procedural city. It fascinated me and I set out to make my own, but with a more realistic and less grid-like road network, inspired by Müller and Parish’s paper on building cities. I documented it a bit in an earlier post.
Full body tracking in a virtual world
Full body tracking in a virtual worldMy Perception Neuron mocap system finally arrived last week. I ordered it after Siggraph 2014 last year. It’s been a bit delayed, and it looks like the final price has increased dramatically since its Kickstarter (what I paid $340 for looks like it now costs over $1200 on their web site), but it seems to be a very slick setup so far.
Ever since I received my Oculus DK2 in the mail I’ve been intrigued by the idea of a “holodeck” simulator: Full body integration in a virtual world. I’ve already played around with XBox Kinect and Kinect 2. They’re actually quite good at providing you with a decent skeleton to work with. But it’s glitchy and you have a limited movement range. I was hoping that Perception Neuron would help solve some of those issues.
Performance Analysis and Optimization of A-Buffer Antialiasing
Performance Analysis and Optimization of A-Buffer AntialiasingIt’s performance analysis and optimization time! Truthfully, this is one of my favorite parts of any project. Most of the time it ends up being a very rewarding experience. Although ironically it’s rewarding inversely to how clever you were when you originally wrote your code. If the code is already fast, it can be a frustrating time. Not so today, as you’ll see!
I’m going to be looking at the performance of the code from my last post. I had a few comments wondering how fast the code was, and specifically the question of whether it would be faster to calculate the mask, or look it up in a table due to the possibility of L2 cache misses. So I was interested in trying out that change to see if it went any faster. But before that, I needed to establish my baseline performance.
Anti-aliasing Polygon Edges for Scanline Rendering
Anti-aliasing Polygon Edges for Scanline RenderingAnti-aliasing is something many of us take for granted these days. Certainly in the realtime world there are a number of well-known techniques using clever manipulation of graphics hardware (MSAA, FXAA, TXAA) each with variations in quality (2x, 4x, 8x, 16x) with associated higher GPU processing costs. But outside of the realtime world, there are still cases where we may have to implement a high-quality anti-aliasing solution.
Recently, for example, I was working on a rotoscoping plugin for Nuke. Rotoscoping tools render polygons that are used as masks in compositing. Most compositing tools use a traditional scanline-based approach to rendering, so my first step was to implement a polygon fill algorithm. This is a fast algorithm that works well but leaves jagged edges, and the end result cries out for anti-aliasing.
Procedural City Generation
Procedural City GenerationI was originally inspired to look into procedural city generation after reading Shamus Young’s article about creating a simple night-time procedural city using no geometry or texture assets (only code). I made my own version, but I wasn’t happy with a simple grid layout for the city and decided to take it a but further. I looked into the relevant literature concerning procedural city generation and it seems the seminal work in this area is this paper by Müller and Parish.
Pascal Müller went on to found Procedural and develop CityEngine into a full-featured product, and Procedural was then acquired by ESRI. We used CityEngine at Slant Six Games to allow us to develop sprawling worlds for our games. It’s a great product.