Jump to content
zooloo75

HBAOPlus Post-Processing Effect

Recommended Posts

_fx="hbaoplus";
_fx ppEffectEnable true; 
_fx ppEffectAdjust [10,10,2,2,12,12,12,12,20,10];
_fx ppEffectCommit 0;

Was experimenting and found this PP effect. Not sure what the ppEffectAdjust parameters are, but you can tinker with them and see the ambient occlusion change.

Share this post


Link to post
Share on other sites
25 minutes ago, zooloo75 said:

_fx="hbaoplus";
_fx ppEffectEnable true; 
_fx ppEffectAdjust [10,10,2,2,12,12,12,12,20,10];
_fx ppEffectCommit 0;

Was experimenting and found this PP effect. Not sure what the ppEffectAdjust parameters are, but you can tinker with them and see the ambient occlusion change.

I've played with it the past, but if I recall correctly the effects were fairly non-existent.

Have you gotten anything visible out of it?

Share this post


Link to post
Share on other sites

There are many more undocumented effects.

 

"RadialBlur"

"ChromAberration"

"WetDistortion"
"ColorCorrections"
"DynamicBlur"

"FilmGrain"
"ColorInversion"

^ These are documented. And ppEffectEnable/ppEffectCreate only works for these. The ones below throw "Unrecognized post process type" into RPT.

But some of the below ones are configurable with ppEffectAdjust.

These are not documented on wiki yet:


"SSAO" 11 params intensity, threshold0, threshold1, nearRadius, farRadius, nearDist, farDist, depthBlurDist, BlurPasses, HalfRes, BlurHalfRes
"LightShafts" (God rays) 4 parameters sunInnerRadius, sunOuterRadius,exposure,decay
"HDAO" quality (0-3), downScaleCoef (between 0.1 and 1), blur (bool or scalar as 0/1), BilateralBlurQuality (0-3), rejectRadius, acceptRadius, recipFadeOutDist, intensity, normalScale, acceptAngle, depthFallOff
"SSAONew" intensity, downscaleCoef, nearDist, farDist, nearRadius, farRadius, rejectRadiusNear, rejRadFar, rejFadeOutCoef, acceptRadius, blurRejectRadius, blur quality

And the rest.. Don't seem to be implemented via ppEffectAdjust/ppEffectEnable. If you pass them they don't error but they are ignored. Unless I'm missing something.
"Rain" This is RainParticles effect. You cannot set any parameters. It might work with ppEffectEnable, but it doesn't look like it. As always, I could be missing something. to
"CMAA"
"SSReflections"
"HBAOPlus"
"ColorsSimple"

 

Oops yeah I was missing something. .. There is a 14.. SSAONew is 10 and rain is 11.. so 14 is... HBAOPlus.. Well. So much to that.

10 parameters. Which you apparently already knew.

Okey.. Uh... uhm.. well... ehh.. Things.

First 5 parameters are numbers.
6th is two booleans combined though as a number. 0 means false,default(which is true), 1 means true,true, 2 means true,true.

7/8 are normal numbers

9 is both a boolean and a number

10 is both a boolean and a number. I guess the boolean part is just used internally as a flag.

 

 

"GFSDK_SSAO_CreateContext_D3D11" may have a clue.

https://docs.nvidia.com/gameworks/content/gameworkslibrary/visualfx/hbao/product.html

This is the HBAO plus.

If you check the parameters here: https://docs.nvidia.com/gameworks/content/gameworkslibrary/visualfx/hbao/product.html#getting-started

That's probably them.
I'd say either 9 or 10 is the Blur As they also set the enable boolean.

I got some default values.

 

Parameter 10 is by default 0

9 is default 2

8 is default 5

7 is default 4

6 is default true (1)

5 is 2

4 is 1

3 I don't know.

2 is 0.3

1 is 2

 

I'll see if I can grab nvidias library and find out more.

 

Okey got it. My guesses:
1: Radius // The AO radius in meters

2: Bias // To hide low-tessellation artifacts // 0.0~0.5

3: SmallScaleAO // Scale factor for the small-scale AO, the greater the darker // 0.0~2.0

4: LargeScaleAO // Scale factor for the large-scale AO, the greater the darker // 0.0~2.0

5: PowerExponent // The final AO output is pow(AO, powerExponent) // 1.0~4.0

9: ForegroundAO // To limit the occlusion scale in the foreground

The boolean part is for the Enable and the number is the foregroundDepth.

10: BackgroundAO

StepCount is by default 0 (Use 4 steps per sampled direction (same as in HBAO+ 3.x))

6: could either be two booleans. Or two enums that have two values.  Could be StepCount/DepthStorage/DepthClampMode/EnableDualLayerAO.

I'll throw my guessing dart at DepthStorage and DepthClampMode.

After rechecking I'm quite sure now that it's DepthStorage and DepthClampMode. Atleast if I can count correctly in Hexadecimal.

Okey I just recounted and now I'm not sure anymore.

is BlurRadius. Either 0 or 1 or 2. If 0, blur is disabled. If 1 blur is enabled with a radius of 2. If 2 blur is enabled with a radius of 4.

7: Blur Sharpness.

8: has to be depth threshold then? That doesn't match the SDK though. Unless I simply cannot count no matter how hard I try.

AHHH. That explains it. BI is still on HBAO version 3.1, they didn't update to 4.0 yet.

8 is DepthThreshold Sharpness

DepthStorage is GFSDK_SSAO_FP16_VIEW_DEPTHS

DepthClampMode is GFSDK_SSAO_CLAMP_TO_EDGE

All solved.

 

Src: https://github.com/NVIDIAGameWorks/HBAOPlus/blob/master/include/GFSDK_SSAO.h#L609 (you need Nvidia gameworks access to see that)

 

BTW HBAO+ requires D3D11 feature level 11 or above. If you don't have that. It will just do nothing.

 

Well. There ya go little over an hour of research. Have fun.

 

TLDR; HBAO+ parameters

Radius, Bias, SmallScaleAO, LargeScaleAO, PowerExponent, BlurRadius (read notes above), Blur Sharpness, DepthThreshold Sharpness, ForegroundAO, BackgroundAO.

 

 

@zooloo75 ppEffectEnable should throw error in RPT on hbaoplus. Can you confirm that?

  • Like 7
  • Thanks 3

Share this post


Link to post
Share on other sites
5 hours ago, Dedmen said:

There are many more undocumented effects.

 

"RadialBlur"

"ChromAberration"

"WetDistortion"
"ColorCorrections"
"DynamicBlur"

"FilmGrain"
"ColorInversion"

^ These are documented. And ppEffectEnable/ppEffectCreate only works for these. The ones below throw "Unrecognized post process type" into RPT.

But some of the below ones are configurable with ppEffectAdjust.

These are not documented on wiki yet:


"SSAO" 11 params intensity, threshold0, threshold1, nearRadius, farRadius, nearDist, farDist, depthBlurDist, BlurPasses, HalfRes, BlurHalfRes
"LightShafts" (God rays) 4 parameters sunInnerRadius, sunOuterRadius,exposure,decay
"HDAO" quality (0-3), downScaleCoef (between 0.1 and 1), blur (bool or scalar as 0/1), BilateralBlurQuality (0-3), rejectRadius, acceptRadius, recipFadeOutDist, intensity, normalScale, acceptAngle, depthFallOff
"SSAONew" intensity, downscaleCoef, nearDist, farDist, nearRadius, farRadius, rejectRadiusNear, rejRadFar, rejFadeOutCoef, acceptRadius, blurRejectRadius, blur quality

And the rest.. Don't seem to be implemented via ppEffectAdjust/ppEffectEnable. If you pass them they don't error but they are ignored. Unless I'm missing something.
"Rain" This is RainParticles effect. You cannot set any parameters. It might work with ppEffectEnable, but it doesn't look like it. As always, I could be missing something. to
"CMAA"
"SSReflections"
"HBAOPlus"
"ColorsSimple"

 

Oops yeah I was missing something. .. There is a 14.. SSAONew is 10 and rain is 11.. so 14 is... HBAOPlus.. Well. So much to that.

10 parameters. Which you apparently already knew.

Okey.. Uh... uhm.. well... ehh.. Things.

First 5 parameters are numbers.
6th is two booleans combined though as a number. 0 means false,default(which is true), 1 means true,true, 2 means true,true.

7/8 are normal numbers

9 is both a boolean and a number

10 is both a boolean and a number. I guess the boolean part is just used internally as a flag.

 

 

"GFSDK_SSAO_CreateContext_D3D11" may have a clue.

https://docs.nvidia.com/gameworks/content/gameworkslibrary/visualfx/hbao/product.html

This is the HBAO plus.

If you check the parameters here: https://docs.nvidia.com/gameworks/content/gameworkslibrary/visualfx/hbao/product.html#getting-started

That's probably them.
I'd say either 9 or 10 is the Blur As they also set the enable boolean.

I got some default values.

 

Parameter 10 is by default 0

9 is default 2

8 is default 5

7 is default 4

6 is default true (1)

5 is 2

4 is 1

3 I don't know.

2 is 0.3

1 is 2

 

I'll see if I can grab nvidias library and find out more.

 

Okey got it. My guesses:
1: Radius // The AO radius in meters

2: Bias // To hide low-tessellation artifacts // 0.0~0.5

3: SmallScaleAO // Scale factor for the small-scale AO, the greater the darker // 0.0~2.0

4: LargeScaleAO // Scale factor for the large-scale AO, the greater the darker // 0.0~2.0

5: PowerExponent // The final AO output is pow(AO, powerExponent) // 1.0~4.0

9: ForegroundAO // To limit the occlusion scale in the foreground

The boolean part is for the Enable and the number is the foregroundDepth.

10: BackgroundAO

StepCount is by default 0 (Use 4 steps per sampled direction (same as in HBAO+ 3.x))

6: could either be two booleans. Or two enums that have two values.  Could be StepCount/DepthStorage/DepthClampMode/EnableDualLayerAO.

I'll throw my guessing dart at DepthStorage and DepthClampMode.

After rechecking I'm quite sure now that it's DepthStorage and DepthClampMode. Atleast if I can count correctly in Hexadecimal.

Okey I just recounted and now I'm not sure anymore.

is BlurRadius. Either 0 or 1 or 2. If 0, blur is disabled. If 1 blur is enabled with a radius of 2. If 2 blur is enabled with a radius of 4.

7: Blur Sharpness.

8: has to be depth threshold then? That doesn't match the SDK though. Unless I simply cannot count no matter how hard I try.

AHHH. That explains it. BI is still on HBAO version 3.1, they didn't update to 4.0 yet.

8 is DepthThreshold Sharpness

DepthStorage is GFSDK_SSAO_FP16_VIEW_DEPTHS

DepthClampMode is GFSDK_SSAO_CLAMP_TO_EDGE

All solved.

 

Src: https://github.com/NVIDIAGameWorks/HBAOPlus/blob/master/include/GFSDK_SSAO.h#L609 (you need Nvidia gameworks access to see that)

 

BTW HBAO+ requires D3D11 feature level 11 or above. If you don't have that. It will just do nothing.

 

Well. There ya go little over an hour of research. Have fun.

 

TLDR; HBAO+ parameters

Radius, Bias, SmallScaleAO, LargeScaleAO, PowerExponent, BlurRadius (read notes above), Blur Sharpness, DepthThreshold Sharpness, ForegroundAO, BackgroundAO.

 

 

@zooloo75 ppEffectEnable should throw error in RPT on hbaoplus. Can you confirm that?

Wow nice chunk of research there! I haven't checked the RPT when I was doing this last night.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×