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.
Post Reply
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »



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?
dpJudas
 
 
Posts: 3037
Joined: Sat May 28, 2016 1:01 pm

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

Post by dpJudas »

I think this is a bug. At least I think once it didn't do this.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

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

Post by Graf Zahl »

This isn't a skybox, it's a textured cube shaped sector. How should SSAO recognize that?
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »

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
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

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

Post by Rachael »

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
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

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

Post by Enjay »

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
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »

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
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

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

Post by Rachael »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

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

Post by Graf Zahl »

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
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

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

Post by Graf Zahl »

Precisely that.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

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

Post by Enjay »

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
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

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

Post by Rachael »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

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

Post by Graf Zahl »

It comes from making skyboxes so much smaller than the actual level.
User avatar
AFADoomer
Posts: 1322
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

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

Post by AFADoomer »

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
Post Reply

Return to “General”