Instead I stored most of them in first texture / buffer (“Buffer A”). Recomputing weights and their sum is very wasteful most of this can be precomputed and stored in an uniform / constant buffer. Shader toy implementation I provided is obviously not optimal. Real world lens “busy bokeh” with some ringing visible. Version with a single component produces quite strong ringing, but much more “pronounced” bokeh than Gaussian one: It has a version with a single component and a version with two components (“harmonics”). Results – qualityĪs a proof-of-concept, I implemented it here: . However, in complex domain, one can find whole family of functions (complex phasors multiplied by Gaussian “bell”) that their magnitude is! This is what Olli Niemitalo’s post describes and introduces some “fitted” functions to approximate disk DoF. Unfortunately, there are no circularly symmetric separable filters other than Gaussian filter in real domain. One can try to approximate them, like Guerilla Games in Michal Valient’s Killzone presentation, undersample with blur afterwards like Crytek in Tiago Sousa’s presentation, or try to use some separable approaches like Colin Barré-Brisebois. Working on Far Cry 4 and other titles, I used a different approach – scatter as gather “stretched” Poisson bokeh to compute DoF together with motion blur and at the same time.Ĭircular kernels can be very expensive prone to noise, ringing etc. I wrote a bit about bokeh, DoF and some crazy implementation in Witcher 2 in the past. Why?įor depth of field effect, Gaussian blurs are seen artistically as “boring”, while hexagonal DoF (popular few years ago) can be subjectively not attractive (artificial, cheap camera qualities). It is direct implementation of “Circularly symmetric convolution and lens blur” by Olli Niemitalo (no innovation on my side, just a toy implementation) and got inspired by Kleber Garcia’s Siggraph 2017 presentation “Circular Separable Convolution Depth of Field”. Selecting a region changes the language and/or content on is a short note accompanying shadertoy. Play around with it and see what kinds of blurred background bokeh you can create. The Field Blur filter allows you to set a focal point in the image and then create varying levels of blurriness and focus in other parts of the photo. With photo-editing programs like Adobe Photoshop and Adobe Lightroom, creating beautiful bokeh effects in post-production is as easy as applying the Field Blur tool. “You want to determine what to focus on in the frame yourself instead of letting the camera choose,” says photographer Khara Plicanic. And turn off your autofocus point selection. Try focusing on different parts of your subject, snapping pictures, and seeing how everything comes out.
Try taking shots of your subject from different distances, and with the subject at varying distances from their surroundings, to see how it changes the bokeh your lens produces.įocus: What you choose as your focal point will alter the focal plane. Positioning: Proximity of your camera to your subject and of your subject to their background will all affect bokeh. Experiment with those f-stops and see what you come up with. Experiment with f-stops in relation to shutter speed to see how your bokeh shifts and changes.Īperture: The main mover and shaker for bokeh is going to be the depth of field you create with your aperture settings. As you open up the aperture of your camera, you can increase the shutter speed to get crisper images. It’s measured in seconds, so a fast shutter speed might be 1/1,000 of a second versus a slow speed of a second. Shutter speed: Shutter speed determines how long the shutter on your camera remains open to allow light to hit the film in your camera, or its digital sensor.
How shutter speed, aperture, and positioning affect bokeh.įor your experimentation, start with a well-lit, static object, like a bowl of fruit, and take trial shots to help you figure out how to create the bokeh you want to see: If more bokeh is your aim, consider a lens focal length of 70mm and higher. Longer focal lengths - whether in zoom or prime lenses - can help you maximize bokeh. For maximum bokeh, you want lenses that have the ability to stop to 1.2 or 1.4.
For creating beautiful images with high-quality bokeh, you’ll want lenses that have low f-stops.