Some way for sector skies to avoid being affected by SSAO

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Some way for sector skies to avoid being affected by SSAO

Re: Some way for sector skies to avoid being affected by SSA

by wrkq » Wed Dec 30, 2020 11:16 pm

Ah heck. Way too late to comment, I know.

But I think it would be better from encapsulation perspective if the line in hw_drawinfo.cpp would be

Code: Select all

applySSAO = mCurrentPortal->AllowSSAO();
while the line in hw_portal.cpp be

Code: Select all

 bool HWSkyboxPortal::AllowSSAO() { return !!(Level->flags3 & LEVEL3_SKYBOXAO); } // [MK] sector skyboxes don't allow SSAO by default
Right now you made the global "all portals" code check for "AllowSSAO()" from any portal subclass, but if it says no, you decide to ignore that if the skybox flag is on.

It would "feel more right" if the skybox subclass specifically returned true/false in response to the flag, and the main render code let each subclass decide for itself.
Would be future-proof for hypothetical other portal subclass which might want to control SSAO in response to a different flag or whatever other reason.

That said I'm not sure if Level is accessible in the latter file (or can be made accessible without problems)?

Re: Some way for sector skies to avoid being affected by SSA

by Marisa the Magician » Wed Dec 30, 2020 3:51 pm

Oh, so in the end it was inverted. Welp.

Re: Some way for sector skies to avoid being affected by SSA

by _mental_ » Wed Dec 30, 2020 2:20 pm

If you need this feature ASAP, grab Visual Studio 64-bit Release build artifact from this page. You should copy all .dll files from existing build in order to run it.

Re: Some way for sector skies to avoid being affected by SSA

by Tormentor667 » Wed Dec 30, 2020 2:02 pm

Re: Some way for sector skies to avoid being affected by SSA

by Enjay » Wed Dec 30, 2020 1:25 pm

Tormentor667 wrote:Anything wrong with it or was I just too quick and it hasn't been added to the svn devbuild yet?
From Github: "madame-rachelle - Modified commit from @OrdinaryMagician #1261 df4f41f 3 hours ago Git stats"

Image

;)

Re: Some way for sector skies to avoid being affected by SSA

by Tormentor667 » Wed Dec 30, 2020 12:42 pm

Update
Added it and tried it with today's dev-build of GZDoom, didn't work unfortunately:

Code: Select all

map C1M1 lookup "C1M1"	//Tormentor667
{
	levelnum = 1
	music = "NOMUSIC"
	cluster = 1

	// Force SSAO being disabled in skyboxes
	disableskyboxao
}
Anything wrong with it or was I just too quick and it hasn't been added to the svn devbuild yet?

Re: Some way for sector skies to avoid being affected by SSA

by Tormentor667 » Wed Dec 30, 2020 12:36 pm

Blue Shadow wrote:
Tormentor667 wrote:So I wonder, what do I have to add to the MAPINFO entries to activate that feature?
Add disableskyboxao to the maps for which you want it disabled.
Thanks kindly, I will just do that - and thanks to anyone involved in this new feature!

Re: Some way for sector skies to avoid being affected by SSA

by Enjay » Wed Dec 30, 2020 12:30 pm

Honestly, I don't know. I haven't messed seriously with PBR materials. They're a bit of a dark art to me so far. If the AO thing is in, it would be worth me investigating though.

Re: Some way for sector skies to avoid being affected by SSA

by Chris » Wed Dec 30, 2020 12:26 pm

Enjay wrote:Now, if there was also a way to disable SSAO on a texture by texture/surface by surface basis, I really would be happy. That would mean that little light alcoves etc don't become dimmed to almost looking like they are not bright at all despite having LITE5 on each surface and being set to 255 brightness. But I realise that's a whole different problem. :P
Doesn't PBR include an AO map that allows doing just this, specifying which parts of the texture can receive AO and which parts shouldn't? Or does GZDoom not implement that part of the pipeline?

Re: Some way for sector skies to avoid being affected by SSA

by Blue Shadow » Wed Dec 30, 2020 12:24 pm

Tormentor667 wrote:So I wonder, what do I have to add to the MAPINFO entries to activate that feature?
Add disableskyboxao to the maps for which you want it disabled.

Re: Some way for sector skies to avoid being affected by SSA

by Tormentor667 » Wed Dec 30, 2020 11:08 am

Nash wrote:Why not make it the other way around? Opt in. Surely Torm can spare the 2 minutes to edit BoA's MAPINFO to disable SSAO in BoA's skyboxes... ;)
Exactly. I think we can keep the default behaviour as it was (SSAO in skyboxes activated), and I can simply add appropriate lines to the MAPINFO that disables SSAO in the BoA skyboxes, that's just fine and a really good reason compared to the crazy stuff that I must have done without that.

So I wonder, what do I have to add to the MAPINFO entries to activate that feature?

Re: Some way for sector skies to avoid being affected by SSA

by Enjay » Wed Dec 30, 2020 10:27 am

Nash wrote:I thought generally the way it goes with GZDoom feature enhancements is always "make sure old stuff always look the same way it did, newer stuff has to be opt in by modders themselves".
This, however, is a weird one. If the map was made pre-SSAO then it might have a skybox that doesn't look good with SSAO. So, that would normally dictate that the default should be SSAO = off in skyboxes. However, SSAO has been around long enough that people have made skyboxes expecting it.

So either option is going to "break" something that already exists. ;)

Honestly, even though I personally would prefer SSAO to be on in skyboxes by default, I actually think that it would be better to default to off. Why? Two reasons:

1) The older maps that were not designed with SSAO in mind are probably more numerous.

2) Ultimately, SSAO being off is less "harmful" than being on. A player might notice something and think "hang on, those buildings/rocks/cliffs in the background look a bit different to the ones that I can walk up to" if the player has SSAO enabled but it isn't present in the skybox. However, everyone is going to notice the huge black lines across the sky that happen when a skybox is set up like the ones in BoA. (Although, it's worth pointing out that the first issue in this reason will potentially occur in BoA if the skyboxes do not have SSAO because the rest of the architecture in the box will also not have SSAO.)


Now, if there was also a way to disable SSAO on a texture by texture/surface by surface basis, I really would be happy. That would mean that little light alcoves etc don't become dimmed to almost looking like they are not bright at all despite having LITE5 on each surface and being set to 255 brightness. But I realise that's a whole different problem. :P

Re: Some way for sector skies to avoid being affected by SSA

by Rachael » Wed Dec 30, 2020 9:37 am

Graf Zahl wrote:I don't care about AO so you'll have to make up your minds without me. :P
Then to spare any arguments I'll do an arbitration.

I'm going to take on the PR myself, and finish it, it's going to be default allowing SSAO, but, it needs an option both to enable it and disable it per-map (oops, this was there already, my mistake). The defaultmap or gamedefaults block can be used to set it for multiple maps at once.

Re: Some way for sector skies to avoid being affected by SSA

by Graf Zahl » Wed Dec 30, 2020 9:26 am

I don't care about AO so you'll have to make up your minds without me. :P

Re: Some way for sector skies to avoid being affected by SSA

by Nash » Wed Dec 30, 2020 9:22 am

I thought generally the way it goes with GZDoom feature enhancements is always "make sure old stuff always look the same way it did, newer stuff has to be opt in by modders themselves".

Top