Depth maps with lens blur


I've been looking around the blurs section of the effects panel with the HitFilm 4 Express reference guide. That was when I stumbled up the lens blur effect, which looks to be something useful to have. Unfortunately, the guide doesn't give an indication on how to create a depth map. Could someone fill me in on the process?

Thanks in advance.


  • A depth map is a black and white image that defines where the blur is. White areas of a depth map have full blur, black areas have no blur, and greys are varied blur depending on brightness. 

    What method you use to create the depth map is up to you and will depend on the shot. 

    For safety, make your depth map an embedded Composite shot. 

  • @yshyonli2

     Here are links to three discussions I could find on the subject that quickly got in over my head, but I think most have explanations by @Triem23 who responded before me above:

    I hope they can help you.


  • Mmmm. The threads @tddavis linked to aren't quite dealing with the same thing, but worth a look. They kind of illustrate the points I am about to make. 

    A control map is required by many Hitfilm effects. Including Lens Blur, Displacement, Set Matte, Parallax, and Caustics, among others, and can be used to refine effects like Shatter or Atomic Particles, etc... Even a mask is a type of control map. 

    What all of these have in common (except masks) is in all cases the control map defines the range of an effect or parameter. Some effects can use other channels, but all can use straight black-to-whitw. Black is ALWAYS "none" and White is ALWAYS "maximum."

    The reason you put the map in an embedded composite shot is the order Hitfilm does things. When pointing to a control map, Hitfilm looks at a "raw layer," before effects or masks. Therefore, if you make a control map with, say, fractal noise on a white plane, Hitfilm sees... A white plane. Putting it in a Composite Shot "bakes in" the effect, so Hitfilm sees the fractal noise. 

    Control Map is a generic term. Sometimes it will be called Source Layer or Map Source. 

    Get these concepts firmly in your head. They'll come up a lot in Hitfilm. 

    @Yshyonli2 can you post a screen shot or clip of what you want to lens blur? Might help figure out advice for how to approach the depth map. 

  • Nah, it's fine. I think I've figured it out based on all the information from this post. Thanks!

  • No problem. :-) 

  • If you don't want to make a new composite shot or using a gradient as a control map, for instance, you can add a grade layer just on top of your gradient layer. It seems to flatten everything below. So you just have to point to the "flattening" grade layer instead of your gradient layer. Sometimes it makes the project's layout more simple :)

  • edited March 2017


    With HFP2017, I'm in focus only on the grey area of my depth map, blur when it's black or white.

    My depth map is a simple black to white gradient comp. I then embedded this comp to to the main one and use it as source layer in the lens blur effect (source channel is set to luminance).

    I even try with a completely white plane as depth map and my main comp is completely blur.

    That doesn't sound good. What's the problem?


  • @Joet7373 Lens Blur is the exception and Grey is in focus and Black and White are out of focus. I think some parts of the particle system might use it like that for some behaviors (or not?). 

    I'm sure someone else will explain fully but essentially: Nothing wrong with what yours is doing wit Lens Blur.

  • edited March 2017

    @Palacono Thanks. The  user manual is wrong then.

  • edited March 2017

    Apparently. :)

    Also, if you use a simple plane to apply the Blur, it doesn't work like in the manual either. The Blur extends vertically above and below the plane being used, and if you apply a Mask, it gets that wrong too. Blur.jpg Blur2.jpg

    Edit: Hmmm... that happens because my source image is not the same size as the project...OK, one for the buglist.

Sign in to comment