Welcome, Guest.
Username: Password: Remember me

TOPIC: New shader: cinematic depth of field

New shader: cinematic depth of field 8 months 2 weeks ago #101

I surely could skip near plane objects.... if they're in the depth buffer :) UI elements aren't so the pixels appear as if they're in the background, and are blurred accordingly. If you enable the "DisplayDepth" shader, you'll see that the elements aren't in the depth buffer (or click the view CoC option in cinematic dof). So there's little I can do regarding that.
The administrator has disabled public write access.

New shader: cinematic depth of field 8 months 2 weeks ago #102

Removing the HUD completely would be a better option then.

I'm fine with blurry UI though. The bigger issue where near objects looked pixelated is solved. So it's all fine now
The administrator has disabled public write access.

New shader: cinematic depth of field 6 months 2 weeks ago #103

New version (v1.1.8 ). Version in reshade repo is v1.1.3, so I made PR to get it updated in the reshade repo as well.

New features:

v1.1.8: Added anamorphic bokeh support, so bokehs now get stretched and rotated based on the distance from the center of the screen, with various tweaks.
v1.1.7: Added 9-tap tent filter as described in [Jimenez2014] for mitigating undersampling. Implementation is from KinoBokeh (see credits in file).
v1.1.6: When near plane max blur is set to 0, the original fragment is now used in the near plane instead of the half-res pixel.
v1.1.5: Added far plane highlight normalizing for non-gained highlights. Added tooltip for reshade v4.x
v1.1.4: Far plane weight calculation tweaked a bit as near-focus plane elements could lead to hard edges which looked ugly. Highlight far plane adjustments have been reworked because of this.

PR: github.com/crosire/reshade-shaders/pull/153

(edit) merged
Last Edit: 6 months 2 weeks ago by OtisInf.
The administrator has disabled public write access.
The following user(s) said Thank You: Wicked Sick, Ryukou36, AssassinsDecree, Sami 1999

New shader: cinematic depth of field 6 months 1 week ago #104

I can not thank you enough !
The administrator has disabled public write access.

New shader: cinematic depth of field 6 months 10 hours ago #105

A guide for all the settings has been added to the FRAMED screenshot website: framedsc.github.io/ReshadeGuides/Shaders/cinematicdof.htm
The administrator has disabled public write access.
The following user(s) said Thank You: Wicked Sick

New shader: cinematic depth of field 6 months 8 hours ago #106

Suggestion: modify the "anamorphic" option. Right now, it squeezes the bokeh disc and rotates it so the effect swirls around the center. I think you're throwing two different bokeh properties together: anamorphic bokeh is caused by recording video with anamorph lenses which allow to record horizontally wider image on narrow film. Has the side effect of squeezing bokeh horizontally - on the entire screen with the same orientation, so nothing center aligned going on.

What the option in your DoF currently does is somewhat mimicking the occlusion of the aperture by the camera lens itself, which doesn't look like squeezed bokeh but like the boolean intersection of two circles, like in the first picture below. While it is possible to have an effect like yours, it's caused by lens distortion and only happens on severely fish-eyed images.

500px.com/photo/149434545/a-world-with-y...e=photos&ctx_q=bokeh

Which looks different to what your DoF currently does:



And anamorphic bokeh looks like this

Last Edit: 6 months 8 hours ago by Marty McFly.
The administrator has disabled public write access.

New shader: cinematic depth of field 5 months 4 weeks ago #107

With different setting values you can achieve that tho: (so like the picture you quoted last, with vertical ellipses) It's also in the same doc page (almost at the bottom ;) )


I used an example image with slightly rotated anamorphic bokehs in the corners to build the effect, so I added that rotation option too so you could achieve that. You can get overboard with it, but that's not the intention. To be honest, I used www.eoshd.com/comments/topic/2035-why-is-anamorphic-bokeh-oval/ as basis for an explanation of what it was and built the code from there.

That said, what's suggested is indeed that the rotation aspect is part of what an anamorphic lens does, and that's not the case. I'll see what I can do to update that.

(edit) updated the wording of the section a bit. I'm not going to update the settings of the shader.
Last Edit: 5 months 4 weeks ago by OtisInf.
The administrator has disabled public write access.

New shader: cinematic depth of field 3 months 4 weeks ago #108

new version: github.com/crosire/reshade-shaders/pull/169
  • Added white boost/correction in gathering passes to have lower-intensity highlights become less prominent.
  • Added further weight adjustment tweaks. Changed highlight defaults to utilize new sample weight code
  • Better near-plane bleed mask. Better far plane pixel weights so more samples get accepted.

Guide updated with new shots: framedsc.github.io/ReshadeGuides/Shaders/cinematicdof.htm

The administrator has disabled public write access.
The following user(s) said Thank You: Alex_outer, Tom Yum 72, Uncle Crassius, Ryukou36, Zarathustra, Duran.te, Marot, marmamowl

New shader: cinematic depth of field 3 months 3 weeks ago #109

Not sure what else to say other than.... thanks! Time to go near DOF all the things :)
The administrator has disabled public write access.
The following user(s) said Thank You: OtisInf

New shader: cinematic depth of field 2 months 3 weeks ago #110

Is there a way to make Auto focus ignore upto a certain distance?

In games like House of dead 1, 2, 3 the auto focus almost works perfectly with the following settings:

Near blur set to 0 so that near objects never blur out, and far blur set according to preference. That way during cutscenes or whenenemies come close to player the DOF works very well. Except, there's one problem:

The gun cursor and the flame textures that appear on cursor when firing is at absolute 0 distance from the screen. So every time I take the cursor to centre, the auto focus focuses on it, causing even the mid distant objects to blur out. Removing the cursor texture doesn't work well either since the the flame textures are still there.

So if it's possible to make auto focus ignore focusing upto a certain distance, it will be possible to use DOF on those games.
The administrator has disabled public write access.

New shader: cinematic depth of field 2 months 3 weeks ago #111

Nope, sorry. You could perhaps set the autofocus point close to the center of the screen but a bit outside the cursor that's otherwise being focused on?
The administrator has disabled public write access.

New shader: cinematic depth of field 2 months 3 weeks ago #112

New version, with rewritten highlight pipeline, removal of redundant controls, New weight calculation for far plane, Near plane alpha optimization.

Highlight/bokeh now finally looks how I wanted it to look when I started. The bug that plagued me for a long time and caused a lot of controls/workarounds has been removed. Highlights now properly blend with one another, are consistent and easy to setup (it simply works out of the box).

Examples:




PR: github.com/crosire/reshade-shaders/pull/179

Merged
Last Edit: 2 months 3 weeks ago by OtisInf.
The administrator has disabled public write access.
The following user(s) said Thank You: Wicked Sick, Tom Yum 72, JBeckman, Uncle Crassius, Zarathustra, AssassinsDecree

New shader: cinematic depth of field 2 months 3 weeks ago #113

OtisInf wrote:
Nope, sorry. You could perhaps set the autofocus point close to the center of the screen but a bit outside the cursor that's otherwise being focused on?

Nah it's fine. Thanks for the answer.

Changing auto focus point wouldn't work in this game because it's a rail shooter game and the cursor could be anywhere on the screen. So even if say auto focus is slightly off-centre, bringing the cursor to that point would still result in focusing on the cursor.
The administrator has disabled public write access.

New shader: cinematic depth of field 1 month 2 weeks ago #114

Heya, OtisInf, I have a question for you, looking over the parameters we have to use, we can't change the bokeh shape, can we? It's always assumed that are aperture rings are circular/smooth in shape; I know I'm in a minority, both for game graphics and in the real world photography aspect, I heavily prefer polygonal shapes instead of the drab and ever so boring perfect circle.

I'd love to use this Cinematic DOF Shader, but we can't change that, can we?
The administrator has disabled public write access.

New shader: cinematic depth of field 1 month 2 weeks ago #115

That's right, there's no way to change the shape, it's always a perfect circle :)
The administrator has disabled public write access.

New shader: cinematic depth of field 2 weeks 2 days ago #116

Request: Would it be possible to integrate Emphasize.fx into Cinematic DoF? Both shaders work really well together and my main issue is always having to guess the correct depth for Emphasize. Would be a lot nicer if it relied on the same focus point or at least have a similar "autofocus" function. Also, is "highlight preservation" possible for Emphasize? I use it mainly to darken the BG but how it affects things like sparks floating in the air sucks. Thanks so much for the great shaders! :)
The administrator has disabled public write access.

New shader: cinematic depth of field 2 weeks 23 hours ago #117

the first shader code I ever wrote was what later became emphasize and was added to kingeric's dof for skyrim. It worked great, but ultimately felt off: it's not a logical part of a dof, it was only there because it worked on a depth buffer too and with the same focusing code.

To darken the background you could also use Adaptive Fog with a black color (I use that most of the time if I need to darken the background). Sparks, fire etc. are often not part of the depth buffer, so are always seen as far away as the pixel they obscure. So they'll always be darkened, there's no solution for that.

So, no I won't add this to cinematic dof, sorry.
The administrator has disabled public write access.