[SLE / SSE / FO4] Depth of Field

share shaders here
  • Author
  • Message
Offline
User avatar
*blah-blah-blah maniac*
Posts: 849
Joined: 28 Dec 2011, 00:50

Re: Skyrim SE Advanced Depth of Field

@Marty McFly

I would like to include a discussion in my next video of this DOF you have shared for Skyrim SE -- and thank you kindly for doing so, by the way.
I want to ask if there is any existing documentation for the various parameters of the effect? If not, I can simply learn from testing each of them to see what they do, but I do not have any photography experience myself so I would end up doing a lot of guess work. Any info you could provide would be very much appreciated.
_________________
Fallout 4 ENB Video Series | Skyrim ENB Video Series | My YouTube Channel
Intel i7-4700HQ @ 2.4GHz | NVidia GTX780M 4GB | 24GB RAM

Offline
User avatar
*blah-blah-blah maniac*
Posts: 530
Joined: 30 Jan 2012, 13:18

Re: Skyrim SE Advanced Depth of Field

Well, ReShade has this tool tip feature for UI, that makes explaining easier. I can provide you with some diagrams/illustrations later today about the functionality of the params.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 1498
Joined: 31 Mar 2012, 15:06
Location: France

Re: Skyrim SE Advanced Depth of Field

Guzio wrote:Marty McFly -- Thanks for the update :D and sorry for the trouble.

I have checked it more closely. Seems that the new TAA anti aliasing causes bokeh flickering and seems that the rest of these problems was my fault or rather too old Nvidia drivers (I try not to install every new release) :oops:
From what I've been experimenting, flickering can also occur if setting a low value for Focusing Time in enbseries, f.e. 0.1.
_________________
Lian Li PC011 Dynamic, Corsair AX 1500i PSU, i9 10850K @5.0 Ghz, Aorus Z490 Ultra, RTX3090 MSI Gaming X Trio, 32GB Corsair Vengeance Pro RGB RAM@3600, Corsair MP600 1TB NVME System Drive, 10 TB Storage, W10 Pro 64, Custom Hard Tubing Watercooling Loop

Offline
User avatar
*blah-blah-blah maniac*
Posts: 849
Joined: 28 Dec 2011, 00:50

Re: Skyrim SE Advanced Depth of Field

@Marty McFly

Thank you, that would be very much appreciated. >_O
_________________
Fallout 4 ENB Video Series | Skyrim ENB Video Series | My YouTube Channel
Intel i7-4700HQ @ 2.4GHz | NVidia GTX780M 4GB | 24GB RAM

Offline
User avatar
*blah-blah-blah maniac*
Posts: 530
Joined: 30 Jan 2012, 13:18

Re: Skyrim SE Advanced Depth of Field

tapioks I had a hard time finding out which values are self explanatory and which ones are not. I think the whole bokeh shape thing is pretty straight forward, 5 vertices means pentagon, 6 means hexagon and so on. And what they do can immediately be seen.

But I figured not much people understood how the focusing works, here's how. I still use GP DOF focusing (little bit modified) because it's easiest to configure. Most people cranked up the blur curve to 100000 or so if they wanted to remove near blur, hence I added a multiplier for near and far blur curve.
The "infinitefocus" setting is mainly for autofocus, because with a setting of 1.0, autofocus will react to anything onscreen. no matter how far. But in real life focusing on something 30m away is just like focusing the sky, both appear to be "infinitely" far away. Hence a setting of infinitefocus of 0.1 means that if you look at anything that is more far away than 0.1 (depth range 0 ~ 1, 0 camera, 1 sky) it counts as infinitely far away. I introduced this setting because it was annoying that when looking at something 300m away some far blur still popped up at the horizon. DoF for gameplay should only react if you look at something very closely, like the GTA V DoF.

Image

Then the focus point for autofocus and all that (it's HLSL standard that coordinates start at upper left corner, sorry):

Image

Offline
User avatar
*sensei*
Posts: 341
Joined: 27 Dec 2011, 21:33
Location: Poland, Gdańsk

Re: Skyrim SE Advanced Depth of Field

I still think that it would have much more sense to use DSLR focusing. This is one of the most extensive DOF shaders ever and IMO it deserves a physically based approach for focusing.

But having said that, I still love your work and it is indeed easy to set up for those that are not very familiar with DSLR.

@tapioks

If you want, you can use my settings as a example or something, it is tweaked for gameplay purposes:

Code: Select all


enbdepthoffield.fx.ini

DOF: Enable Autofocus=true
DOF: Autofocus sample centerX=0.5
DOF: Autofocus sample centerY=0.5
DOF: Autofocus sample count=10
DOF: Autofocus sample radius=0.02
DOF: Near blur curve=2.0
DOF: Far blur curve=1.0
DOF: Near blur mult=0.0
DOF: Far blur mult=0.5
DOF: Manual focus depth=0.05
DOF: Infinite depth distance=0.05
DOF: Maximal blur radius=20.0
DOF: Bokeh shape vertices=6
DOF: Bokeh shape quality=7
DOF: Bokeh Intensity=1.2
DOF: Bokeh rotation=0.0
DOF: Blur render res mult=1.0
DOF: Bokeh shape max size=20.0
DOF: Bokeh shape curvature=1.0
DOF: Bokeh shape rotation (°)=0.0
DOF: Bokeh shape aspect ratio=1.0
DOF: Bokeh shape weight curve=1.0
DOF: Bokeh shape weight amount=0.5
DOF: Shape chroma amount=0.15
DOF: Gaussian postblur width=0.5

enbseries.ini

[DEPTHOFFIELD]
FocusingTime=0.35
ApertureTime=0.35
Last edited by MaxG3D on 15 Nov 2016, 16:57, edited 1 time in total.
_________________
OS: Windows 10
CPU: AMD R5 3600
RAM: Corsair DDR4 16GB 3200MHz Vengeance
GPU: AMD Radeon 5700 XT
Sound Card: X-FI Titanium HD
Mobo: ASRock X370 Pro4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor

Offline
User avatar
*blah-blah-blah maniac*
Posts: 530
Joined: 30 Jan 2012, 13:18

Re: Skyrim SE Advanced Depth of Field

I could steal kingeric's DSLR code so I don't need to research the formulas :v possible it is for sure though, the shader is flexible enough to add such things with ease.
About the feature set, currently it has less features than kingeric's one but I guess it's faster.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 849
Joined: 28 Dec 2011, 00:50

Re: Skyrim SE Advanced Depth of Field

Wow, thanks Marty and Max for this input! I don't plan to get TOO technical in my discussion of the effect, but this gives me plenty to demonstrate an alternative, quality DOF people can use in place of the default effect. Cheers!
_________________
Fallout 4 ENB Video Series | Skyrim ENB Video Series | My YouTube Channel
Intel i7-4700HQ @ 2.4GHz | NVidia GTX780M 4GB | 24GB RAM

Offline
User avatar
*blah-blah-blah maniac*
Posts: 983
Joined: 09 Dec 2012, 00:29

Re: Skyrim SE Advanced Depth of Field

Oyama MaxG3D -- Thanks for the tips :D

Marty McFly -- Thank you for the diagrams, they are very helpful :D
_________________
Rudy ENB for Skyrim, Skyrim SE, for Fallout New Vegas, for Dragon's Dogma

English is not my native language.

AMD Ryzen 9 5900X, Gigabyte B550 AORUS PRO AC, Arctic Liquid Freezer II 280, Nvidia Geforce RTX 2070 Super, 64GB ram

l00
Offline
User avatar
*master*
Posts: 112
Joined: 30 Jan 2016, 11:26
Location: France

Re: Skyrim SE Advanced Depth of Field

Maxg3d
If your settings are made for Fallout you maybe want to change the DOF: Autofocus sample centerY=0.5 to something a little bit lower like 0.485 or you will focus on some weapons because of the recoil animation.

McFly
Where can I find in your code the setting that defines the time of focusing ? It works fine for gameplay, sharp and quick, but I would like to make a float of it so I can tune it down for a machinima in order to have smoother transitions.
_________________
Released ENB: PRC - PRT - Painterly' | FO4 mods: NAC | Videos: ::Virtual.Camera::
Post Reply