"Never measure the height of a mountain until you have reached the top. Then you will see how low it was."
- Dag Hammarskjöld
More pages: 1 ... 11 ... 16 17 18 19 20 21 22 23 24 25 26 ... 31 ... 41 ... 47
On depth of field
Tuesday, December 16, 2008 | Permalink

For my first entry in my new blogging effort I'm going to talk about depth of field, which is a particularly interesting subject given both my graphics programming and photography interests. My former boss Andreas Thorsén sent me this interesting blog post on the subject.

First thing first, I agree with Vincent that "current depth of field effects in games fall short of delivering the same cinematic emotion as movies and TV", or as I would put it: they generally suck. My pet peeve with depth of field as typically implemented is that there's no smooth transition between sharp and out of focus areas. Many games implement depth of field by taking the framebuffer and blurring it. Then the sharpness is controlled by linearly interpolating between the sharp and blurry image. This is generally cheap, especially since you probably already have a blurred version of the framebuffer around anyway for other posteffects such as bloom. However, except in the fully sharp and fully blurry areas the quality leaves a lot of be desired. Object edges aren't going to be smoothly blurred, but instead you'll see a sharp edge with some sort of halo blended on top of it. Not exactly what you want. What you really want is a blur kernel with an adjustable radius. Unfortunately, that's also a lot more expensive.

Now that wasn't what Vincent complained about in his post on the subject. He is complaining that the bokeh (that's "out of focus blur" for you non-photographers) in games isn't anywhere close to what you see in movies or on TV. Instead of the gaussian blur that's commonly applied by games he's suggesting a filter similar to "lens blur" in Photoshop with disc shaped blobs of out of focus light sources. Personally I'm not convinced this is better though. Even though this is the result you'll see in most photos it's not exactly "the gold standard" either. Many photographers (including myself) considers this an artifact, just like for instance lens-flares. Not that that has ever stopped game developers from adding it to their games. The shape of the blobs depends on the aperture of the lens. Lenses with adjustable aperture generally are created by a bunch blades. The higher the number of blades the closer to a circle the aperture will be. On a cheap lens you might see something like an octagon shape whereas with more expensive lenses it will look almost circular. The reason you're seeing a blob rather that something softer like a gaussian falloff is because the aperture has hard eges. The question is if that's desirable. Producers of highend lenses tend to not agree. Hence there are some highend lenses that contain special elements in order to produce softer bokeh and remove the blob effect, like for instance this one. If you compare the 80-200@F4.5 and 135 STF@F4.5 example images on that site I'm sure most will agree with me that the latter is the better looking image.

With that said, what's best is of course highly subjective. I'm sure there are people that prefer blobbier bokeh, and other lens artifacts such as flares, vignetting, scratches etc. has been used for artistic reasons before. Since people are used to seeing blobby bokeh I'm sure that effect has its place too.

[ 2 comments | Last comment by sqrt[-1] (2009-01-04 11:28:28) ]

Blogging on
Tuesday, December 16, 2008 | Permalink

As you might know, this site has been around for quite a while. I'm not sure when it first came online, but my oldest demo is from the year 2000. So at least 8 years, maybe 9. It started as a traditional personal homepage and has more or less stayed that way, except maybe that I added the "news" section (the one you're currently reading) a couple of years into its existance.

However, as you may have noticed I'm not posting much news anyway. The news I'm posting is mostly about new content on the site, such as demos, cubemaps or galleries. Hence there may be months between each update. So at times it may seem like I'm not working on any new projects. However, a majority of the projects I start on never result in a demo and leave no visible trace of having ever been worked on. Only once I've finished a demo do you see a news item here. So if several of the ideas I've been experimenting with have failed I sometimes get somewhat uncomfortable with the fact that there has been several months without a website update.

So the other day I was discussing programming blogs with some friends. I was asked why I'm not blogging and was told I really should, which when I thought about it is a very good idea. I figure people might be interested in what projects I'm working on, and when projects fail it's a good idea to post about it and why it failed. It may help other people that are attempting things in the same field and hopefully I might get some feedback that can turn some of those projects around into something that actually works. And it should make it more visible that I'm working on stuff and relieve me from any stress related from not having been able to publish any finished demo in a while. Further I think it may be a good idea to put down my thoughts from time to time on subjects such as interesting rendering techniques. Since I'm also into photography I suppose there might be a post or two about that too from time to time.

Now, I don't think I'll be posting on a daily basis, but from now on this site should turn somewhat more blog-like, although there won't be any other change than more frequent posting. And with just days from my holiday vacation it's perhaps an odd timing to announce a new effort given that the next few weeks are likely to be quite silent. But hey, a soft start might be a good thing.

[ 3 comments | Last comment by Gregory (2008-12-22 15:45:23) ]

One year left to go ...
Tuesday, November 25, 2008 | Permalink

... and I'll be a middle-aged man.
On the other hand, only 36 years left to retirement. Woot!

[ 3 comments | Last comment by Seth (2008-12-13 17:14:41) ]

Another demo
Tuesday, October 21, 2008 | Permalink

It's demo time again!

This time I've implemented deferred shading with multisampling support using a stencil mask to separate the edge pixels from the surface interior. Grab it while it's hot!

Update 2008-10-23: As per tradition, I've now updated the demo a couple of days after release because of some feedback I've received. It wasn't obvious that you needed to select a multisampled mode, so now the demo tells you about it if you happen to have a non-multisampled mode selected. Also, I've added the F5-F8 options to the F1 dialog to make it more obvious what options there are and what they do.

[ 14 comments | Last comment by Greg (2013-07-19 14:12:29) ]

New gallery
Saturday, September 20, 2008 | Permalink

I've uploaded a new gallery with pictures from this summer, with my sister's wedding as the main event, but also some nice pictures of the midnight sun etc.

[ 3 comments | Last comment by y (2008-10-14 03:21:55) ]

New cubemaps
Saturday, August 30, 2008 | Permalink

I have uploaded another seven cubemaps. Available in the Textures section.

[ 1 comments | Last comment by David (2008-09-05 23:26:04) ]

Updated Interior Mapping demo
Friday, August 15, 2008 | Permalink

I've added a small optimization to the Interior Mapping demo that boosts performance by about 80% in the default position. I didn't sort the buildings before, and as it turns out, the default position had them drawn more or less in the worst case order. A few lines of code to sort buildings by distance and it's now running a lot faster.

[ 5 comments | Last comment by Jan (2008-09-07 13:22:03) ]

New gallery
Monday, August 11, 2008 | Permalink

These are pictures from the spring of 2008. All in Stockholm, most of them around where I live.

[ 0 comments ]

More pages: 1 ... 11 ... 16 17 18 19 20 21 22 23 24 25 26 ... 31 ... 41 ... 47