# Defocus

**URL:** <https://forum.logik.tv/t/defocus/6182>\
**Category:** Between Renders\
**Tags:** blur, dof, defocus\
**Created:** [June 30, 2022, 7:11am UTC](https://forum.logik.tv/t/defocus/6182 "2022-06-30T07:11:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PlaceYourBetts](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/placeyourbetts/32/6852_2.png) [@PlaceYourBetts](https://forum.logik.tv/u/PlaceYourBetts)\
**Post date:** [June 30, 2022, 7:11am UTC](https://forum.logik.tv/t/defocus/6182/1 "2022-06-30T07:11:09Z")

</div>

I always said that one of these days I was going to go through all of our de-focus options and figure out the differences/strengths.

I still plan on doing this when I get some down time but it came up today with my assistant that i was telling them not to use Gaussian for de-focus and they asked me what the difference was!

Stumped!

So lets narrow this down to just the blur node. What is the difference between Gaussian and defocus.

I bet this has something to do with convolution filters but I don’t really know.

---

<div class="post-metadata">

**Author:** ![finnjaeger](https://avatars.discourse-cdn.com/v4/letter/f/e99b99/32.png) [@finnjaeger](https://forum.logik.tv/u/finnjaeger)\
**Post date:** [June 30, 2022, 7:36am UTC](https://forum.logik.tv/t/defocus/6182/2 "2022-06-30T07:36:28Z")

</div>

yea all blur types are convolve filters.

Defocus just uses a different function for the convolve a gaussian function

I think that convolving your image with a circular shape would result in defocus type effect, which is what defocus does

Gaussian blur is basically a low pass filter, so it kills high frequencies, (something something fourier transformation if a gaussian is another gaussian) . I think I fell asleep in college when we talked about those filters…

(If I say filter I dont mean instagram filters but the technical term)

If you have nuke you can take a look at the convolve node and feed it different 2dimensional images, I think for gaussian it would be the Finite-Impulse - response of the gaussian function but i wouldnt know how this looks like would be a nice experiment though.

Ha , I should have known the gaussian kernel as it was printed on our banknotes …

> **[diffusion.gaussian.kernel.pdf.pdf](https://pages.stat.wisc.edu/~mchung/teaching/MIA/reading/diffusion.gaussian.kernel.pdf.pdf)**
>
> 249.08 KB

Filters are crazy complex (again not the instagram filters, different thing!)

---

<div class="post-metadata">

**Author:** ![andy\_dill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/andy_dill/32/47_2.png) [@andy\_dill](https://forum.logik.tv/u/andy_dill)\
**Post date:** [June 30, 2022, 5:17pm UTC](https://forum.logik.tv/t/defocus/6182/3 "2022-06-30T17:17:39Z")

</div>

The way I like to think about it is defocus replaces each pixel with a shape (aka a “convolve filter”), blur averages the pixels, so a defocus will take a very bright pixel like a point light and turn it into a large and still bright circle, whereas a blur will mush everything together.

 ![defocus](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/c/cfdf0a80ca359d9e4d100fc6cd39bd901cd19fc2.jpeg)
