Page 1 of 1

Progress toward manual DoF

Posted: 02 May 2012, 21:53
by cairmen
Ok, as mentioned elsewhere on the forums, I've been working on getting manual DoF to work in ENB, rather than having the auto-focus we currently have.

And I've had some results!

So far, I've figured out the constant to use to set a fixed focus distance, as demonstrated here:

Image

To achieve the effect I've got there (which is close objects being in focus at FOV 35), you'll need to change ALL instances of the declaration of the variable sf in enbeffectprepass.fx to 0.4. There are two in the ENB config I'm currently using (the excellent Next Generation), meaning that I end up with

#ifndef USE_SMOOTH_DOF
float sf = 0.4;
#else
float sf = 0.4;
#endif

I've attached a file that demonstrates the effect.

The next thing to do is to figure out how to alter that variable in-game - there are hotkey commands in the .fx files but I haven't figured out how to use them yet - and to figure out what the various values represent. So far, smaller numbers seem to lead to closer-in focus - 0.1 is extremely close focus, basically unusable (although rather trippy), whilst 0.4 offers what I'd call a CU to XCU level of focus.

All help and suggestions much appreciated! And I hope other Skyrim photographers find increased focus control useful.

Re: Progress toward manual DoF

Posted: 02 May 2012, 22:01
by Samurai_Smartie
Why not just ask Matso about it? He wrote the DoF code after all.

Re: Progress toward manual DoF

Posted: 02 May 2012, 23:05
by cairmen
Already done, but I'm not sure how active he is at the moment, so I'm also working independently.

Plus, figuring stuff out is fun!

Re: Progress toward manual DoF

Posted: 12 May 2012, 11:22
by cairmen
I've been talking with Matso about this - with any luck, we'll see a polished, Matso-approved, manual DoF function soon!