Showing posts with label Photography. Show all posts
Showing posts with label Photography. Show all posts

Wednesday, November 25, 2009

Anamorphosis Gamebryo LightSpeed Logo

We all love Anamorphosis, and have seen it done wonderfully before ([edit] even spectacularly). Well, I've done a few simple things around the office, here's one I just did:

Vimeo and YouTube videos.

That was done with painter's masking tape, with the help of Cat, in about 2.5 hours.

Here's an earlier project, the old Gamebryo logo done with post-it notes:

Post-it notes were handy after a late night in the office and no prep. The masking tape is obviously much better. Both were done by setting up an image on my laptop and using a projector to cast it into the room. The perspective for both is just in a doorway, to help guide viewers to the right position. Both also are cast in a way that the image is heavily distorted as soon as you move slightly away from the right point.

Share links if you've done similar projects, or know of good ones. ;)

Falice Varini is the link you want to follow! See e.g. this.

Wednesday, August 5, 2009

A Light Field and Microphone Array Teleconference Idea

Paul Mecklenburg and I were chatting, and the thought of really cheap cell phone cameras led us to day dreaming about a teleconference system.

Line up a dense array of cheap CCD sensors and microphones into a video conferncing wall you're projecting onto. Now you've got a light field, which permits rich virtual camera re-imaging (movement, rotation, zooming, depth of field). The microphones can be used to triangulate sound sources. Sources from e.g. table locations can be dampened (see "hush zone" in picture). Sources distant from mics can have an audio boost to account for volume fall off (see "audio boost"). The speaking locations can also be used to drive an automatic virtual camera which focuses on subjects doing the speaking.

Sunday, November 23, 2008

Motivating Depth of Field using bokeh in games

I've posted before on Higher Fidelity depth of Field effects in games. I believe that current depth of field effects in games fall short of delivering the same cinematic emotion as movies and TV. The reason distills down to the commonplace use of compute-efficient separable Gaussian blur. More expensive methods can reproduce bokeh with crisp circle of confusion shapes.

I've realized in casual conversation, many people can't easily recall how the technique is commonly used in television and movies. And, they often overlook how common it is.

So, in this post I've collected a bunch of examples from movies, and whipped up some mock images from game screen shots.

This is all just motivation. ;) Ideas for fixing the problem in a practical way is for another post.

Cinema Examples

A few simple shots, showcasing bright point lights, and specular highlights:

Similar to the above, but with some edge highlights blurred as well. Look at the horizontal edges blurred in the background on the right of the image:

The Dark Knight made extensive use of the effect for the entire film. The circles of confusion often had an oval shape due to the Panavision anamorphic lens used (compressing the image on film to an aspect ratio different than that of the screen). Also, note the specular highlights from the henchman's head and waist:

These circles are larger than in many of the others, and also show the non-uniform characteristics of the disks:

Finally, a subtle image. The amount of blur is minimal, but still distinctive on the lights in the background. Even though slight, delivering this effect will be yet another one of those required level of polish for AAA games in the future:

Mock Images
I've doctored up some game screen shots to show what is missing. They're quick and dirty, made in Photoshop with "lens blur". In a high dynamic range rendering pipeline, results would be much better, since the distinctive shapes we're looking for are results of very high contrast between highlights and the rest of the background scene.

First, a Mass Effect scene that would have worked well. I quickly added several points of bright light to trigger the effect since the background didn't include small point lights:



And here marketing screen shot for Unreal Tournament. I only generated a mask and applied the blurs, since the image had good contrast to begin with:


Lens blur:

Gaussian Blur (common in games today, poorer result):

And, a zoomed section contrasting Gaussian to Lens Blur:

Keep your eyes open as you watch TV, or movies, and you'll notice more and more how common this effect is.

Pay attention in games, and you'll notice that we're currently delivering the concept of "out of focus". That's sufficient to draw attention to near, middle, or background. But, games today are not capturing the artistic & emotional feeling that comes with a strong use of the effect.

I have a few prototyping ideas for delivering a higher quality depth of field, which I hope to have time to try out soon, but may likely take a while. As new hardware brings more FLOPS, it's also possible that the O(n^2 * m^2) naive approach may just be used soon enough (as was already done in Lost Planet on DirectX10).

(Next post, Jeff Russell Depth of Field example comments)

Update: Nice technique writeup in 3DMark11

Sunday, April 6, 2008

Higher fidelity depth of field effects arriving in games

Photo by Brian Talbot - Used by Creative Commons Attribution-Noncommercial permissionCinematic shots in movies and television shows use depth of field frequently. Decorative point lights in the background pushed out of focus are a familiar image. You can try it when your out at lunch by ordering a cola, and blurring your vision as you stare at the ice cubes. The bright highlights will blossom out.

The Playstation 2 had excellent fill rate, enabling the over use of blur in many games. Combined with masking or thresholding, this was were we saw the mass emergence of (cheap) high dynamic range effects in games. Though, the "high" in this case wasn't very high, and most of the effect was just the blur.

Those blurs were typically a separable Gaussian blur, for performance reasons. The separable blur is just a horizontal then vertical blur, O(n) instead of O(n^2) for a general case 2D blur.

A Gaussian blur, however, is not the effect created when a point light is out of focus in a camera. The proper convolution varies a bit from camera to camera, but here is an example taken with my SLR:

This shape is primarily a constant intensity circle, with diffusion ringing near the edges. High quality cinematic cameras will also often show the aperture edges, however in my camera there was too much flaring to see these. Pay attention in a movie, however, and you're likely to see octagons instead of circles.

To illustrate a cross section of the intensity (hey, why not) I've done the following in Photoshop:

Unwrapped the image with polar coordinates:

Smoothed the image with a strong horizontal blur:

Added a gradient:

Applied a threshold:

The result is a graph where the center of the disk is at the top, and the outer edge at the bottom. The distance along the X axis indicates the intensity.

The diffraction ringing near the edge is clearly visible, with the center of the disk being approximately a constant intensity.

There is still some noise towards the top of the profile, which is from the center of the image. That is due to the noise that appeared there, and was not blurred by the horizontal blur. (It was stretched out when unwrapping the polar coordinates).

To render this effect on ~2008 era GPUs is a heavy weight operation. However, some games have done so, e.g. Lost Planet's port to DirectX. (Beyond 3D article) They had extra processing power to spend when porting from the Xbox 360 to DirectX 10 cards such as the GeForce 8800.

Instead of horizontally & vertically blurring the image, for each point a triangle is rendered to a small area with its intensity modulating a texture. For a single bright pixel, the result is a copy of the convolution texture around that point. (Read their article for details on scene segmentation and geometry shader usage.)

Here I've highlighted the effect in two Lost Planet images from (1 and 2). The top images show the standard Guassian blur, the bottom images show the texture effect.
Click image for larger view.
Compare the blurry sparks on top
to the hexagon out of focus sparks on bottom.

Note they were able to increase the size of the blur with the texture effect, because it remained cinematic. That size of a Gaussian blur would just look muddy.

Try it at home: In Photoshop try opening up a image you have with small point lights, or just make one with a black background and a few small white dots. Give it a go with
Filter / Blur / Gaussian Blur and
Filter / Blur / Lens Blur.

Conclusion: Crisp cinematic depth of field effects require a distinctive convolution kernel. Real time graphics will move beyond separable Gaussian blurs.

Update: More discussion here: motivating-depth-of-field-using-bokeh
Update: Nice technique writeup in 3DMark11