Ambient Occlusion in the GZDoom skybox

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Ambient Occlusion in the GZDoom skybox

Postby Tormentor667 » Thu Aug 08, 2019 5:50 am

Dear developers,

I am using a sector-based skybox (sector special 90, GZDoom skybox) in my map and the ambient occlusion portal level is set to two. Unfortunately the ambient occlusion is also applied to the skybox even though it shouldn't be, check the screenshot for an example.



Bug or wrong setup?
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Ambient Occlusion in the GZDoom skybox

Postby dpJudas » Thu Aug 08, 2019 6:00 am

There used to be a check if the portal being drawn was a skybox and if it were then it wouldn't run SSAO on it. I guess it must have been accidentally removed during one of the refactors of that code.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Ambient Occlusion in the GZDoom skybox

Postby Graf Zahl » Thu Aug 08, 2019 9:07 am

He said "sector built". I don't think these get handled properly by the AO pass.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Ambient Occlusion in the GZDoom skybox

Postby Marisa Kirisame » Thu Aug 08, 2019 10:26 am

If it's a cube why not make a proper skybox in gldefs?

And if there is other geometry inside it, you could just make it a "recursive" skybox. Where the rest of the map uses skybox pickers to have that as its sky, and then the sector sky itself would have its sky set to the gldefs skybox.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Ambient Occlusion in the GZDoom skybox

Postby Nash » Thu Aug 08, 2019 11:43 am

Yeah this is why I avoid fake skyboxes, as in - a physically square sector with textures applied.

As Marisa said, use real skyboxes (the GLDEFS one). If you need geometry, you can do them recursively. Skyboxeption!
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Ambient Occlusion in the GZDoom skybox

Postby Graf Zahl » Thu Aug 08, 2019 12:41 pm

These recommendations are just stupid, considering that this style of skybox is an official engine feature. What needs to be done is to disable SSAO on any skybox portal being rendered from an appropriately tagged sector.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Ambient Occlusion in the GZDoom skybox

Postby Tormentor667 » Thu Aug 08, 2019 2:25 pm

dpJudas wrote:There used to be a check if the portal being drawn was a skybox and if it were then it wouldn't run SSAO on it. I guess it must have been accidentally removed during one of the refactors of that code.

I think that is what the “GZDoom Skybox Sector Special” was meant for, but it doesn’t work.
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Ambient Occlusion in the GZDoom skybox

Postby Marisa Kirisame » Wed Dec 25, 2019 6:34 am

I'm currently in the process of fixing this, see this thread. AO on skyboxes would be disabled by default and need to be enabled explicitly through a mapinfo flag.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Ambient Occlusion in the GZDoom skybox

Postby sinisterseed » Wed Dec 25, 2019 7:12 am

I was just about to make another thread about this, glad I didn't have to.

I experienced an identical issue when I played ZDCMP2, strange square-like lines on the sky. I assumed it was a mapping error or some strange video artifact initially, but apparently it's not. This really ruins the skies if you ask me, so I'm glad it's getting addressed.
User avatar
sinisterseed
GZDoom RO Translator & Raze Tester
 
Joined: 05 Nov 2019
Twitch ID: sixhundredsixteen
Github ID: sinisterseed
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Ambient Occlusion in the GZDoom skybox

Postby Graf Zahl » Wed Dec 25, 2019 7:15 am

ZDCMP'2's skybox is actual sector geometry, that won't be fully fixable.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Ambient Occlusion in the GZDoom skybox

Postby Enjay » Wed Dec 25, 2019 7:35 am

Purely out of interest, I'm wondering why the skybox in the OP is made from a sector anyway. Isn't it just a cube with textures applied to the sides? If so, why not define it in GLDEFS?
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: Ambient Occlusion in the GZDoom skybox

Postby Tormentor667 » Wed Dec 25, 2019 8:51 am

Enjay wrote:Purely out of interest, I'm wondering why the skybox in the OP is made from a sector anyway. Isn't it just a cube with textures applied to the sides? If so, why not define it in GLDEFS?

Because you can add dynamic objects to such a sector-based skybox or alter the textures of said sector. There are so many possibilities if it is sector-based.
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Ambient Occlusion in the GZDoom skybox

Postby Enjay » Wed Dec 25, 2019 9:14 am

So it isn't just a simple cube then - it has dynamic elements too. Got it. :)

BTW, if all you want to do is change a GLDEFS skybox texture, that can be done using the usual changesky ACS command and the name of the skybox as defined in GLDEFS. I've done it several times myself.
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: Ambient Occlusion in the GZDoom skybox

Postby Tormentor667 » Wed Dec 25, 2019 10:22 am

Yes, but adding weather effects or models into the skybox is a bit trickier :)
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany


Return to OpenGL Renderer Bugs

Who is online

Users browsing this forum: No registered users and 0 guests