Unintentional film looking shot

Snow suddenly started to fall over Tokyo last night, quickly building a white layer over the never ending city. I was too lazy to grab my gear and all the stuff one needs to get out during a cold night, so I just hoped the snow would still be there on the morning and decided that I would take my camera with me on my way to work.

It was still there (although it had become ice) and it was giving the morning sunlight some exquisite tones. I love the morning light anyway: grazing, harsh, drawing bold shadows on faces and buildings… But the reflections due to the snow really make a difference.

While waiting for the train on the platform, I wanted to take a picture of that girl on the other side, lit by that light. But I didn’t even have time to aim and the train was there already. I took the shot anyway, in the hope I would catch it through the window.

The result is a bit unexpected: the tinted glass and blacklit inside give the picture a film feeling, as if tones were post-processed and black mattes were added.

The filmic train

The filmic train

 

Variance Shadow Maps

Shadow mapping is a popular way of getting dynamic shadows, but suffers from aliasing artifacts that cannot be addressed by usual texture filtering. The reason boils down to the fact that the average of depth test results (which is what we want) is not the same as the result of a test on the average of depths (which is what hardware does).

The trivial way to do it anyway is the Percentage Closer Filtering (PCF) technique, and usually stands in papers as the expensive upper bound.

Variance Shadow Maps are a simple technique allowing filtering, including some Gaussian blur for example, thus giving soft shadows (the blur does not depends on the distance from the occluder though). The main drawback of the algorithm is the light bleeding artifact that occurs as soon as the scene complexity is too important. I also found it to be fairly expensive in terms of texture memory since it requires twice as much as regular shadow maps, and another times two for blurring.

One could argue VSM are some pretty old stuff already, but because of the elegance of the trick they rely upon and the ease of implementation, I really like them.

Epsilon, a 64k intro by Mercury

Last weekend the demogroup Mercury released at Tokyo Demo Fest the final version of their invitation to the upcoming Revision party: a 64kB demo called Epsilon. While the complexity of the scenes is very limited, the rendering, seemingly a raymarching shader, features a couple of very noteworthy real-time effects including ambient occlusion, reflexion (up to two iterations it seems) and refraction, caustics, and an hexagonal bokeh depth of field.

Draft on depth of field resources

What is mostly in my thoughts recently when it comes to rendering is real time depth of field effect. I intend to read state of the art material on the matter and hopefully post a well formed summary, just like I did for physically based rendering, but until then I thought I would list a few resources already.

That’s all for now. ;-)

Update: after further documentation, both Kawase’s  and DICE’s techniques indeed rely on the idea of creating an hexagon shaped bokeh by decomposing it into three skewed boxes, but while Kawase’s approach uses seven passes, DICE’s one takes it down to two passes thanks to some clever use of multirender targets.

Also, I forgot to mention a second article of Matt Pettineo, where he suggests a combination of techniques to achieve a better result.

Show your difference

An example of actual bokeh in a photo of mine

 

Yet another GLSL live editor

I mentioned already the current trend of writing live coding tools. During the Tokyo Demo Fest, which was taking place last weekend in Akihabara, Hole performed a live coding with his own tool, thus VJ-ing while the DJ was on stage. Interestingly, this led to collaborative coding when someone joined him. This could be a very interesting direction to explore.

The tool, LiveCoder, looks pretty clean on big screen and may be worth trying out.