Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Depth mapped lens flares!

  • Depth mapped lens flares!

    Posted by Spencer Tweed on August 21, 2016 at 4:20 am

    Hey guys,

    I realized that by using this old-school technique you could write an expression that would automagically turn off your lens flare if it went behind an object based on a z depth render: https://www.motionscript.com/design-guide/obscuration.html. I don’t know why no one else has done this before, but I couldn’t find anything online so I wrote my own expression and am sharing it! Here it is as an animation preset, to work with Optical Flares. As a warning I just threw this together a few minutes ago and I’m sure it could be taken MUCH further… (which I’ll inevitably do in short order. I plan on linking this to 3D lights too).

    The main down-side of this approach right now is that the light doesn’t smoothly fade out as it get’s closer to the depth theshhold. I did put a sort of fade paramenter in there (light radius) but that only fades the light out along the depth values as can be seen if you test it out on a gradient ramp. However if you have a very near point next to a far point it doesn’t do much… a possible solution is to blur your z-depth image, but then the lens flare will start to encroach into your foreground object. Anyone have an idea how to solve this? Some sort of convolve filter?

    FILE: 10451_ofdepthocclusion.ffx.zip

    – Spencer

    Spencer Tweed replied 9 years, 8 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy