DOF Composit Node ... a teaser


This is just a quick up date on a depth of field composit node I am implementing. I should be complete enough to release to the community next week.

Original pic …

Ignore the printing of the diaphragm mask of the test images.

Different distances (aliasing mask errors are clear here follow the links at the bottom for better detail of improvements),

Different diaphragm shapes and max blur settings,

These images show in a little more detail the foreground, background, focus area compositing (a little large to include here I’ve been cheeky enough already)

Features so far,

  • Correct forground over focus composit
  • Correct focus over background composit
  • Correct splat blur (lens blur)
  • Different diaphragm shapes
    • focus distance
    • focus area (distance in complete focus from focus distance)
    • distance from min to max blur
    • max blur size (apature effect)
    • luminance effect (light over dark bias)
    • diaphragm shape
    • background/foreground mask threshold

To do this next week,

  • better background/foreground antialias
  • better rasterization of blur mask
  • interface
  • much more testing
  • test with latest version of code (two weeks behind)
  • x,y coordinate focus and hence auto focus
  • patch generation and style guideline complience
  • more luminance bias/highlighting

Very cool! This is a very needed tool for us Blenderheads. Can’t wait to get to
play with it! :smiley:

//The M.h.p.e.

Looks very good! :o

Great! Really looking forward for this.

Wonderful. This will save a lot of work and the results look even better, than using thousands of nodes.

Will most/all the parameters be animatable? This looks great! Definitely fills a gap that a lot of people have been wanting!

how long does it take to render a image with DOF?
looks good anyway :smiley:

A few seconds.

looks pretty good already! Keep going! Really looking forward to this one…

My whole thinking about putting this together was to make it useful for animation. Current inputs,

  • Focus distance or x, y input. Like zblur there will be a auto focus that will simply take the focal point from x,y (or center)
  • Maximum blur - simulating apature change
    Where possible I have set up parameters, like blur size, to be a proportion of the image size so that resolutions can be changed but the output will as remain constant as much as possible.

It is about 5-20 seconds for PAL resolution. Main factor on time is the amount of blur you want. Have not got round to optimizing this yet - still finalizing method so I hope that I can reduce this. At least with a method pinned down others can start to input on this.

(where I am sat at the moment I am unable to contact my hosting, i.e. see my pictures - hope that that is not the case for others … goes off to kick butt)

Oh how grand!!!

I do hope you’ll make it easy to use.

Perhaps 1 request… would it be possible to just make the focus point linked to an object???

Because that way you could perhaps move the focal point in an animation as well… which is something I am sure most people will want at some point in time.

Well, the ultimate goal would be to get IPOs implemented for nodes (material as well as composite). I’m currently looking into this but beeing a noob to the blender code and not having coded plain C in a long time (I’m more of a C++ guy) it’ll be a long time until I get this done, if I even get this done at all. It shouldn’t be all that hard but I have to understand how the existing code structure works first. Would probably be faster if someone who is more familiar with the code (Ton? :wink: ) did it…

It’s definitely looking great! I hope we can see this in the next release possibly! Keep up the great work!

Slightly outside my domain but one way or another this will be possible at some point - enough people are asking.

The inputs will be there ready for … err well … input.

Awesome.:smiley: I can’t wait for it to be finished. (I’ve got one project near completed, and another on the way that would benefit greatly from this.:)) Keep up the good wok.8)


neat, rack focus.

rack focus is when you use the camera to change the focus of a scene from the foreground to the background or vice versa.

i can’t wait to see this either… :slight_smile:


This is a very interesting tool!

Good job!

I’ll keep an eye on it! :o …Maybe two!


Wonderful !!! :smiley:

loving the bokeh shapes! it’s really looking quite good.