GPU (game engine style) DOF ?

I have been playing Star Citizen Alpha 3.0 recently and the graphics/effects are great. The DOF is in real time and looks amazing. I was wondering if it would be possible to impliment a game engine style DOF for renders to greatly reduce render time and noise (of the DOF effect) substantially?

Maybe not as physically accurate as how Vray calculates things currently, but certainly usable in production.

Most compositing packages already have tools for fast and high-quality post-effect DOF. Or do you mean in the VFB or similar to the OptiX denoiser?

Best regards,
Vlado

The problem with post DOF is if you want to stylise a scene with quite heavy DOF there are always artifacts on the edges of items as the software is only doing a best guess and doesn’t generally do a great job. If there was some kind of effect that could take into consideration the positional factors required for high quality DOF then that would be great. In the VFB basically, like lens effects. Something calculated after render but with the 3d positions of objects taken into consideration…if that is even possible ?

Well, let me look at that that game and see how it looks… There are plugins for PhotoShop like DOF Pro (http://richardrosenman.com/shop/dof-pro/) that do a fairly good job. Maybe something similar can be done in realtime on the GPU.

Best regards,
Vlado

The game is only in alpha at the moment so you have to pay something like $24 to become part of the test team or you could check out youtube where a lot of streamers showcase the game including DOF etc.

Is it particularly better than that of other modern AAA games (i guess i’m asking if they wrote their own shader)?
Lumberyard does have a nice DoF in camera, but it’s hard to tell just by looking at the game if it’s exactly the same technique (based apparently on a 2013 paper).

I think VFB+ can do a DOF without rerendering, similar to DOF in packages like Photoshop,… I never used it though and it’s free now: http://www.monotoneminimal.com/vfb Might want to give it a shot.

Thanks for the link but I’m guessing that this third party VFB would only use the zdepth pass and not be processed with 3d positions of objects used…probably leading to artifacts. I’m maybe not explaining this well.

The Zdepth is probably used indeed. Doesn’t hurt to give it a try, maybe it uses some other tricks too, no idea.

Yeah, I’ll take a look :slight_smile:

Gpu accelerated fake dof in vray would be great if it gives better results than other plugins. Artifacts are a problem and if you blur things in foreground it’s mostly unusable with sharp edges.
I’m having such a hard time to clean my raycasted dof of noise. So something less accurate but smooth and time saving with lens options in engine would be a dream.

Have you tried denoising your DOF result? There are many options now - Neat Image, the V-Ray denoiser, the NVidia one, Altus etc.

Best regards,
Vlado

if you need really good post dof go with bokeh from peregrine… its like magic..
but it does require deep files and nuke…
http://peregrinelabs.com/bokeh/

Would love to get into nuke, but it’s too expensive right now. Probably some other time…
problem with the vray denoiser is that for dof I would need heaviet demoising than for other parts. So I need to denoise two times and get the parts in AE right to comp those together.
Off topic, but if the denoiser could choose between heavy and mild denoising for specific parts, it would save time and disc space.

The denoiser does adapt to the noise in the image (the noiseLevel render element), but other than that you can just run the vdenoise tool twice with different settings and blend in AE.

Best regards,
Vlado

But wouldn’t adaptive denoising be a great feature

It is already adaptive.

Best regards,
Vlado

Not in the sense of what we are talking about, else I wouldn’t have to comp two denoising results.

There is that, but I’m not sure I want to do that. There are improvements planned for the denoiser where I’d like to make it work better right away instead of trying to blend between differently denoised results.

Best regards,
Vlado

Sounds even better!