SSAO in sector-based skyboxes - bug or [don't do that]?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Nash » Wed Jan 02, 2019 3:03 am



I was playing ZDCMP2 and I noticed this. I'm not sure if this is a bug or are we not meant to have geometry-based skyboxes and SSAO combined?
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby dpJudas » Wed Jan 02, 2019 4:34 am

I think this is a bug. At least I think once it didn't do this.
dpJudas
 
 
 
Joined: 28 May 2016

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Graf Zahl » Wed Jan 02, 2019 4:39 am

This isn't a skybox, it's a textured cube shaped sector. How should SSAO recognize that?
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Nash » Wed Jan 02, 2019 5:03 am

The SSAO pass recognizes portals, does it not? Would it be possible to detect if the portal is a skybox camera viewpoint to skip doing SSAO?
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Rachael » Wed Jan 02, 2019 5:30 am

There are legitimate uses of SSAO in a skybox camera, so that seems hacky at best.

Graf is right, to be honest, and this is pretty moot. It's a cost of having SSAO where once there was none and you didn't have to account for such things. ZDCMP2 is far from the only map to have ever used this trick.

In this case, I would recommend a MAPINFO option for disabling SSAO's in SkyCam sectors.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Enjay » Wed Jan 02, 2019 5:59 am

Rachael wrote:In this case, I would recommend a MAPINFO option for disabling SSAO's in SkyCam sectors.

Would it not make sense for it to be the other way around? i.e. default to disabled SSAO in SkyCam sectors so that any existing camera-skybox set up at a time when SSAO didn't exist would still look the same, and only specifically enable it via MAPINFO when SSAO is required in the camera-skybox. Or would that be counter-intuitive for new mappers?


However, I think that using a map/sector based approach for a simple cube skybox of the type shown should be discouraged versus setting it up properly in GLDEFS (I am aware that there can be reasons for doing the sector based method). In other words, the default should be "don't do that". ;)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Nash » Wed Jan 02, 2019 6:03 am

Can LevelCompatibility apply MAPINFO flags? Could make an entry for ZDCMP2 and other maps that do this.

That said, I agree that "default is no SSAO in skycam sectors, MAPINFO for mods that want SSAO in skycam sectors" is better because it preserves behaviour from old maps.
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Rachael » Wed Jan 02, 2019 6:23 am

I disagree for one simple reason: There are many SkyCam sectors that actually could benefit from SSAO and they aren't just simple cubes with a skybox texture on them. I think the default should be to apply SSAO in all cases except where it is explicitly not needed. Cube skyboxes really aren't that common.

That said, yes, we can apply LevelCompatibility flags to ordinary MAPINFO flags. It's already being done for several flags - Unloved 1 and 2 is a perfect example of where this takes place, to fix rendering issues in the Carmack renderer.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Graf Zahl » Wed Jan 02, 2019 6:44 am

Most SkyCam portals are sector based geometry, but no matter what you try there, it will look fake because the dimensions are off.
There's a reason why I choose not to use this feature at all. IMO the glitches far outweigh the benefits.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Nash » Wed Jan 02, 2019 7:17 am

Graf: What do you mean "fake"? Is it because the shadows end up looking too large because the skybox geometry is basically just one gigantic zoomed-in camera?
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Graf Zahl » Wed Jan 02, 2019 9:33 am

Precisely that.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Enjay » Wed Jan 02, 2019 11:21 am

As a matter of interest, why does the skybox camera magnify things so much? I've found it a bit awkward and difficult to gauge when making some skyboxes in the past.

Does it need to magnify in this way? Could some sort of scaling factor be applied to the camera view to make it more customisable? Would that even work?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Rachael » Wed Jan 02, 2019 11:45 am

It actually doesn't.

In a real technical sense, the skybox camera is nothing more than a player view that is forced to never move, but will always rotate with the player's camera.

This feels big because of the parallax effect - or rather, the lack thereof.

If real magnification took place, it would fuck things up a lot especially when pitching and rotating the player view.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby Graf Zahl » Wed Jan 02, 2019 11:46 am

It comes from making skyboxes so much smaller than the actual level.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: SSAO in sector-based skyboxes - bug or [don't do that]?

Postby AFADoomer » Wed Jan 02, 2019 2:24 pm

Wasn't there a discussion at one point about adding a way for a mapper to tag lines in a geometry-based skybox so that they are excluded from SSAO? Did that ever get implemented?

EDIT: Maybe I'm remembering this: viewtopic.php?f=124&t=62359&p=1077230
User avatar
AFADoomer
 
Joined: 15 Jul 2003


Return to General

Who is online

Users browsing this forum: No registered users and 5 guests