Welcome, Guest.
Username: Password: Remember me

TOPIC: Depth of Field (DOF) help please!

Depth of Field (DOF) help please! 1 year 8 months ago #1

  • jmp909
  • jmp909's Avatar
  • Offline
  • Posts: 135
  • Thank you received: 48
Hi

could anyone help me with DOF settings please? (latest ME).

I can't seem to control settings for depth of field as much as I'd like. I don't know if it's an issue with the game or the values I am using.

i thought DOF_MANUALFOCUSDEPTH would let me move the blurring in and out of the screen (ie focal plane) and DOF_NEARBLURCURVE and DOF_FARBLURCURVE would let me adjust how much blur there is behind and in front of this plane.. so eg how do i set the focal plane for 3rd person below?

maybe it's just the game but it does not seem to work like I expected (but then likely I dont quite understand the camera focusing properly)

I've included depth buffer screenshots, and a couple of examples I managed, but nothing in between.. eg I'd like the main character to have no blur and the character in the distance to be really blurred (sort of a cross between the two screenshots)

thanks for any suggestions
J

(the first 2 DOF types seem to work the fastest, Petka and Magic)







The administrator has disabled public write access.

Depth of Field (DOF) help please! 1 year 8 months ago #2

  • jmp909
  • jmp909's Avatar
  • Offline
  • Posts: 135
  • Thank you received: 48
Courier's Dead Space effect looks good, but I'm not sure how to convert the old petkagta dof to the new combined dof

original Courier's Dead Space DOF... (Master Effect 1.0.340)
//PETKAGTA DEPTH OF FIELD
#define DOF_VIGNETTING          0               //[0 or 1] Enables vignetting (darkens edges). There is a better shader for that in ME but I decided to keep it
#define DOF_MANUAL              1               //[0 or 1] Enables Manual DOF focussing
#define DOF_AUTO                0               //[0 or 1] Enables Autofocus
#define DOF_PENTAGONSHAPE       0               //[0 or 1] Enables Pentagonal DOF shape (bugged, dunno how to fix, better use GP DOF for polygonal shapes)
#define focalDepth              2000.5          //[10.0 to X] Depth of focal plane for manual DOF
#define focalLength             200.0           //[10.0 to X] Length of focus area for manual DOF
#define fstop                   150.5           //[10.0 to X] fStop for manual DOF
#define vignint                 4               //[0 to X] Amount if vignetting applied
#define fdofstart               20              //[0.0001 to 0.05] Distance where far blur starts
#define fdofdist                1500            //[0.1 to 1.0] Distance where far blur ends
#define focus                   float2(0.5,0.5) //[0.0 to 1.0] Screen coordinates of focus point. First value is horizontal, second value is vertical position. 0 is left/upper, 1 is right/lower.
#define CoC                     0.4             //[0.01 to 0.3] table is here http://en.wikipedia.org/wiki/Circle_of_confusion
#define namount                 0.00004         //[0.00000 to 0.0005] Amount of noise applied. This is no grain, rather some kind of DOF offset jittering
#define DOFdownsample           4.0             //[0 to 10] This should downsample the blurred areas but Boris and his unsupported stuff...
#define maxblur                 0.8             //[1.0 to 10.0] Maximum amount of blurring
#define samples                 6               //[5 to 30] Samples on the first ring. The other rings around have more samples
#define rings                   4               //[1 to 8] Ring count
#define threshold               2.5             //[0.8 to 2.0] Threshold for bokeh brightening. Above this value, everything gets much much brighter. 1.0 is maximum value for LDR games like GTASA, higher values work only on HDR games like Skyrim etc.
#define gain                    0.1             //[0.1 to 2.0] Amount of brightening for pixels brighter than threshold.
#define bbias                   0.2             //[0.1 to 2.0] bokeh bias.
#define fringe                  0.2             //[0.0 to 1.0] Amount of chromatic abberation
#define znear                   100.0           //[20 to 200] camera clipping start.
#define zfar                    3500.0          //[1500 to 8000] camera clipping end.
#define feather                 1.1             //[0.1 to 2.0] pentagon shape feather.

new format (MasterEffect 1.1.111)... less options it seems and different calculations?
//#define DOF_METHOD			1	//[1 to 4] 1: Ring DOF(Petka/martinsh) 2: Magic DOF 3: GP65CJ042 DOF 4: Matso DOF
//#define DOF_FOCUSPOINT	 		float2(0.5,0.5)	//[0.0 to 1.0] Screen coordinates of focus point. First value is horizontal, second value is vertical position. 0 is left/upper, 1 is right/lower.
//#define DOF_NEARBLURCURVE 		0.5	//[0.4 to X] Power of blur of closer-than-focus areas.
//#define DOF_FARBLURCURVE 		0.5	// [0.4 to X] Elementary, my dear Watson: Blur power of areas behind focus plane.
//#define DOF_BLURRADIUS 			20.0	//[5.0 to 50.0] Blur radius approximately in pixels. Radius, not diameter.
//#define DOF_MANUALFOCUS   		1	//[1.0 to 10.0] Enables manual focus. 	
//#define DOF_MANUALFOCUSDEPTH 		0.0	//[0.0 to 1.0] Manual focus depth. 0.0 means camera is focus plane, 1.0 means sky is focus plane.

//RING DOF
#define iRingDOFSamples   		6  	//[5 to 30] Samples on the first ring. The other rings around have more samples
#define iRingDOFRings   		4  	//[1 to 8] Ring count
#define fRingDOFThreshold  		2.5 	//[0.8 to 2.0] Threshold for bokeh brightening. Above this value, everything gets much much brighter. 1.0 is maximum value for LDR games like GTASA, higher values work only on HDR games like Skyrim etc.
#define fRingDOFGain   			0.1 	//[0.1 to 2.0] Amount of brightening for pixels brighter than threshold.
#define fRingDOFBias    		0.0 	//[0.1 to 2.0] bokeh bias.
#define fRingDOFFringe   		0.5 	//[0.0 to 1.0] Amount of chromatic abberation

thanks
The administrator has disabled public write access.

Depth of Field (DOF) help please! 1 year 8 months ago #3

  • matsilagi
  • matsilagi's Avatar
  • Offline
  • Posts: 199
  • Thank you received: 54
jmp909 wrote:
Courier's Dead Space effect looks good, but I'm not sure how to convert the old petkagta dof to the new combined dof

original Courier's Dead Space DOF... (Master Effect 1.0.340)
//PETKAGTA DEPTH OF FIELD
#define DOF_VIGNETTING          0               //[0 or 1] Enables vignetting (darkens edges). There is a better shader for that in ME but I decided to keep it
#define DOF_MANUAL              1               //[0 or 1] Enables Manual DOF focussing
#define DOF_AUTO                0               //[0 or 1] Enables Autofocus
#define DOF_PENTAGONSHAPE       0               //[0 or 1] Enables Pentagonal DOF shape (bugged, dunno how to fix, better use GP DOF for polygonal shapes)
#define focalDepth              2000.5          //[10.0 to X] Depth of focal plane for manual DOF
#define focalLength             200.0           //[10.0 to X] Length of focus area for manual DOF
#define fstop                   150.5           //[10.0 to X] fStop for manual DOF
#define vignint                 4               //[0 to X] Amount if vignetting applied
#define fdofstart               20              //[0.0001 to 0.05] Distance where far blur starts
#define fdofdist                1500            //[0.1 to 1.0] Distance where far blur ends
#define focus                   float2(0.5,0.5) //[0.0 to 1.0] Screen coordinates of focus point. First value is horizontal, second value is vertical position. 0 is left/upper, 1 is right/lower.
#define CoC                     0.4             //[0.01 to 0.3] table is here http://en.wikipedia.org/wiki/Circle_of_confusion
#define namount                 0.00004         //[0.00000 to 0.0005] Amount of noise applied. This is no grain, rather some kind of DOF offset jittering
#define DOFdownsample           4.0             //[0 to 10] This should downsample the blurred areas but Boris and his unsupported stuff...
#define maxblur                 0.8             //[1.0 to 10.0] Maximum amount of blurring
#define samples                 6               //[5 to 30] Samples on the first ring. The other rings around have more samples
#define rings                   4               //[1 to 8] Ring count
#define threshold               2.5             //[0.8 to 2.0] Threshold for bokeh brightening. Above this value, everything gets much much brighter. 1.0 is maximum value for LDR games like GTASA, higher values work only on HDR games like Skyrim etc.
#define gain                    0.1             //[0.1 to 2.0] Amount of brightening for pixels brighter than threshold.
#define bbias                   0.2             //[0.1 to 2.0] bokeh bias.
#define fringe                  0.2             //[0.0 to 1.0] Amount of chromatic abberation
#define znear                   100.0           //[20 to 200] camera clipping start.
#define zfar                    3500.0          //[1500 to 8000] camera clipping end.
#define feather                 1.1             //[0.1 to 2.0] pentagon shape feather.

new format (MasterEffect 1.1.111)... less options it seems and different calculations?
//#define DOF_METHOD			1	//[1 to 4] 1: Ring DOF(Petka/martinsh) 2: Magic DOF 3: GP65CJ042 DOF 4: Matso DOF
//#define DOF_FOCUSPOINT	 		float2(0.5,0.5)	//[0.0 to 1.0] Screen coordinates of focus point. First value is horizontal, second value is vertical position. 0 is left/upper, 1 is right/lower.
//#define DOF_NEARBLURCURVE 		0.5	//[0.4 to X] Power of blur of closer-than-focus areas.
//#define DOF_FARBLURCURVE 		0.5	// [0.4 to X] Elementary, my dear Watson: Blur power of areas behind focus plane.
//#define DOF_BLURRADIUS 			20.0	//[5.0 to 50.0] Blur radius approximately in pixels. Radius, not diameter.
//#define DOF_MANUALFOCUS   		1	//[1.0 to 10.0] Enables manual focus. 	
//#define DOF_MANUALFOCUSDEPTH 		0.0	//[0.0 to 1.0] Manual focus depth. 0.0 means camera is focus plane, 1.0 means sky is focus plane.

//RING DOF
#define iRingDOFSamples   		6  	//[5 to 30] Samples on the first ring. The other rings around have more samples
#define iRingDOFRings   		4  	//[1 to 8] Ring count
#define fRingDOFThreshold  		2.5 	//[0.8 to 2.0] Threshold for bokeh brightening. Above this value, everything gets much much brighter. 1.0 is maximum value for LDR games like GTASA, higher values work only on HDR games like Skyrim etc.
#define fRingDOFGain   			0.1 	//[0.1 to 2.0] Amount of brightening for pixels brighter than threshold.
#define fRingDOFBias    		0.0 	//[0.1 to 2.0] bokeh bias.
#define fRingDOFFringe   		0.5 	//[0.0 to 1.0] Amount of chromatic abberation

thanks

Aside from samples, rings, threshold, fringe, grain and bias, the rest is focussing releated, so it can't be changed
just replace the similar named ones with their similar variants on the new one.
Loves to test stuff for no reason.
Last Edit: 1 year 8 months ago by matsilagi.
The administrator has disabled public write access.

Depth of Field (DOF) help please! 1 year 8 months ago #4

  • jmp909
  • jmp909's Avatar
  • Offline
  • Posts: 135
  • Thank you received: 48
Hi thanks

the problem is there aren't similar variants.

DOF_NEARBLURCURVE, DOF_FARBLURCURVE and DOF_MANUALFOCUSDEPTH have no correlating entry in the original PETKAGTADOF

and similarly focalDepth, focalLength, fStop, fdofstart, fdofdist are not represented in the new DOF

I understand they are both doing focusing but I don't really know how they relate to each other.

thanks
J

ps here's what I'm trying to achieve but my character always seems more blurred when I use the new DOF..
Last Edit: 1 year 8 months ago by jmp909.
The administrator has disabled public write access.

Depth of Field (DOF) help please! 1 year 8 months ago #5

  • SunBroDave
  • SunBroDave's Avatar
  • Offline
  • Posts: 202
  • Thank you received: 174
if your character is too blurry, increase the value of NEARBLURCURVE
The administrator has disabled public write access.

Depth of Field (DOF) help please! 1 year 8 months ago #6

  • jmp909
  • jmp909's Avatar
  • Offline
  • Posts: 135
  • Thank you received: 48
in the end, this was the actual issue for that specific character blur problem
reshade.me/forum/shader-troubleshooting/...t-no-effects-enabled

I'd be able to work out the DOF settings easier if it didn't keep crashing! (a reload key for Windowed mode would resolve that, which I've also raised (reshade.me/forum/troubleshooting/335-sha...utomatic-not-working) but maybe i need to raise as an actual ReShade issue, not MasterEffect)
Last Edit: 1 year 1 month ago by crosire. Reason: Fixed link
The administrator has disabled public write access.