PDA

View Full Version : Depth buffer & DOF effect problem



pekka varis
02-26-2018, 07:45 AM
Hello!

I have a little problem with blurring images in after effects. See this first image:

140346

There is a ball rendered with alpha channel. Now it is on After effetcs, so we see the background too.

Together with a background it looks like this:
140348

Then we bring in the DETPH buffer render:
140347

Now I use After Effetcs Lens blur effect and I setup the source to be correctly the depth buffer render (luminance), we got this:
140349

There are visible seams around the ball. It looks horrible cos there is the alpha channel transparency in the ball. The DOF effect made this way does not work..

I have to use just normal gaussian blur in after effects:
140350

SO do enybody know how can I use this Depth buffer + Lens blur in after effects with images rendered with alpha channel?

Pekka Varis

cwarden
02-26-2018, 11:52 AM
I've had issues with edges of the depth pass in lightwave too. Try this workaround:
https://www.youtube.com/watch?v=KiwJGWVEnME

sk810
02-26-2018, 02:18 PM
What file type are you rendering to?

pekka varis
02-27-2018, 01:20 AM
Thank you. I watched this but it does not solve my problem..

pekka varis
02-27-2018, 01:24 AM
I am rendering to PSD+Alpha channel and Depth buffer is rendered to png. This works technically ok for after effetcs Lens blur. but After Effetcs does not blur the key'ed image. Insteadt it blurs the whole image and this leads to stupid looking seams in out of focus areas. It seems to be that if I want to use DOF effect in After Effects with depth buffer renders; I need to work with full size renders out of lightwave, so I need to compose everything or as much as possible in lightwave and not rendered out images with aplha channel.. Am I correct?

Otterman
02-27-2018, 02:29 AM
Render your Alpha on a separate pass. And render out with 32bit EXR! Should give you better results.

pekka varis
02-27-2018, 02:58 AM
Gotta try this! Thanks Otterman

2create
02-27-2018, 04:42 AM
Hi Pekka, might need to interpret you image sequence to match your alpha settings. Maybe Pre-multiplied to black?

I tend to use Alpha "Straight / Unpremultiplied" in Lightwave and Interpret as Straight in After Effects to avoid dark fringing.

A few other things might be:

Inverting the Depth map (White: Close, Black: Far)
Gamma correcting the Depth map
Ignoring Depth Alpha

These adjustments will need to be pre-comped for the lens blur effect to see the changes.

gerardstrada
02-27-2018, 03:07 PM
You might want to try also a focus depth pass.

http://s12.postimage.org/mq4gtpzml/focustrick.gif

More info here:

http://forums.newtek.com/showthread.php?132920-Compositing-and-passes-workflow-from-LW!!!-WTF!&p=1301589&viewfull=1#post1301589

A custom focus pass can be got in LW in this way as well:

https://web.archive.org/web/20140617115130/http://lightwiki.com/wiki/Multipass_Rendering_with_Filter_Node_Editors#Focus _Pass

In extreme cases like your example, you may want to render multilayers to keep background geometry data or mix 3D DOF with post-DOF.



Gerardo

gar26lw
02-28-2018, 04:10 AM
You might want to try also a focus depth pass.

http://s12.postimage.org/mq4gtpzml/focustrick.gif

More info here:

http://forums.newtek.com/showthread.php?132920-Compositing-and-passes-workflow-from-LW!!!-WTF!&p=1301589&viewfull=1#post1301589

A custom focus pass can be got in LW in this way as well:

https://web.archive.org/web/20140617115130/http://lightwiki.com/wiki/Multipass_Rendering_with_Filter_Node_Editors#Focus _Pass

In extreme cases like your example, you may want to render multilayers to keep background geometry data or mix 3D DOF with post-DOF.



Gerardo

oh cool. gerardo, would you feel comfortable putting some of this old stuff you have written into the extras section of the lw docs? there’s just so much excellent material you have written over the years and a fair bit got lost in the newtek forum explosion:)

a gerardo section. ;)

Otterman
02-28-2018, 04:50 AM
oh cool. gerardo, would you feel comfortable putting some of this old stuff you have written into the extras section of the lw docs? there’s just so much excellent material you have written over the years and a fair bit got lost in the newtek forum explosion:)

a gerardo section. ;)

I second this. Gerardo's knowledge on sweating passes for post rocks!

gerardstrada
03-01-2018, 06:34 PM
oh cool. gerardo, would you feel comfortable putting some of this old stuff you have written into the extras section of the lw docs?

I second this.
Glad you find it useful! :)
If they also think it's useful, they can use them of course!



Gerardo

p.s. the linked article was one of a series of 3 articles about the experimental use of node editors, but the other two were not possible due to magazine closing. A lot of things we can make with DP Node Editors...

gar26lw
03-02-2018, 12:08 AM
Glad you find it useful! :)
If they also think it's useful, they can use them of course!



Gerardo

p.s. the linked article was one of a series of 3 articles about the experimental use of node editors, but the other two were not possible due to magazine closing. A lot of things we can make with DP Node Editors...

oh i remember that. i had a subscription specifically for your articles and it was cut off. would you consider posting the missing two.

the info you post is fantastic and the best resource on this forum. i asked beevee about a docs section. i think he is keen.

gerardstrada
03-03-2018, 04:57 PM
would you consider posting the missing two.
I never finished those articles but I will probably do after finishing another related to proper color flow.


i asked beevee about a docs section. i think he is keen.
Sounds GREAT! much appreciated, Thanks!



Gerardo

inkpen3d
03-04-2018, 09:18 AM
Don't anti-alias the Depth pass!

If possible, render the Depth pass out at a higher resolution (e.g. x2, or x4) and scale it down in the compositing application (that is, if the comp application doesn't have resolution independent capabilities).

If you AA the depth pass then you will end up interpolating the depth information of background objects (or the background itself) with the depth information at the edges of foreground objects . These incorrectly interpolated pixels will be set to intermediate depth values and, when brought into a compositing application and used with effects that utilise the depth information, will result in fringing around the foreground objects.

Hope that helps,
Peter

gerardstrada
03-04-2018, 09:44 AM
Yes ideally, applying aliased Depth pass (at quadruple res) and scaling it down will preserve subpixel details in post-DOF effect, but in the case of the lacking of background data, interpolated depth pixels will precisely prevent fringing around foreground objects, mainly if we are mixing 3D DOF with post DOF. So not to be used for all cases.



Gerardo