The definitive gameplay enhancement mod for the GZDoom and Zandronum engines. Adds realistic gore, dismemberments, headshots, executions, lightning effects, particles, makes enemies smarter and harder, makes gun louder and beefier, and adds epic new boss battles.

Forum Thread
  Posts  
The pitfall of sky portals and a horrible fps drop. (Games : Doom : Mods : Brutal Doom : Forum : Bug reporting (Brutal Doom : The pitfall of sky portals and a horrible fps drop.) Locked
Thread Options
chebmaster2
chebmaster2 slowpoke qualityfag
Feb 19 2019 Anchor

I first encountered this on map 26 of eday test from March 23, 2018. While approaching the red key tower, its roof implemented using a sky portal, I experienced a sudden fps drop from 40..60 to 20..25. It became much worse if you looked up from the bridge, fps dropping to 9..12.

I spent no little effort investigating and combating the issue in my Chebskies initiative. I though I found a solution, but in fact I failed to notice the elefant in the room.

First, sky portals are no magic. They work by placing a second camera shifted by x and y relative the main camera.
Second, what happens when you no-clip into the void? The engine tries rendering every sector that falls into your field of vision.
Third, the engine (Zandronum, at least) always renders *all* things in any sector that is even partly visible.
Four, doom bsp tres are 2d. When you look up, the engine scans the entire 360 around you. What happens if you no-clip into the void and look up? The check may hit most of the map resulting in a horrible chop-chop lag.

Now, look at this image. See?

User Posted Image

Yes, even skybox, which is now rendered *three times*: normally, through the sky of the tower top, and the third time - maybe not rendering, but expensive processing anyway - due to sky portal camera being in the void.

When I worked on that map, I thought I solved the problem by creating a second, dumbed down skybox for the tower top and selecting it via sky pickers. In part, that was what helped. But what I really did, was moving the old cathedral to the side instead of deleting it. And it served as occluder breaking sine of sight to most of the skybox area.

User Posted Image

So, lesson learned? Always surround the upper structure with an empty sector big enough to accommodate all possible player positions relative to that structure! It could have undefined floor, ceiling and walls because it is only there to stop expensive visibility checks.

Feb 20 2019 Anchor

Should I just expand the tower's fake skybox area and set it more apart from the actual skybox?
Can you provide a file of your edited map so I can check what exactly you did?2019 02 20 05 44 14  edaymaps

Edited by: Sergeant_Mark_IV

chebmaster2
chebmaster2 slowpoke qualityfag
Feb 20 2019 Anchor

Should I just expand the tower's fake skybox area

I think it needs to be *much* larger because the tower could also potentially be seen through that window behind the red key (argh, and it's *blue* key tower, I forgot).

See chebskies Chebmaster.com , map CHE26. (though I wanted to keep that link away from public scrutiny)

But keep in mind that most of the maps are half-done, I am working on them like crazy, hoping to finish them this weekend so you can have them as quality editing material.
See the exit area of CHE24 for the sky I was planning for 25..27. And the cathedral 3d model is *still* a placeholder.

P.S. I also prefer to make textures of connecting surfaces of these structures undefined because then the engine does not render them at all, which allows for otherwise impossibly complex self-obscuring contact surfaces but they still count for visibilty checks. See CHE24 and the top of the central building I almost died making.

P.P.S. Should I simply break radio silence ans start posting screenshots here directly? See Moddb.com
Will wait for your decision on that. For now, see my screenshots in the contributions section of the discord group.

P.P.P.S And your current skyboxes are no good because they are made out of too many sectors while there is *definitely* processing cost for sky portals *and* skyboxes proportional to something like map geometry complexity multiplied by skybox complexity. So I had to re-make all my skyboxes too, assembling terrain from 3d models (there *will* be sprite versions, just not ready yet).

Harsh minimalism and brutal economy save the day, just look at the larger skyboxes in CHE24.




P.S. Updated chebskies applying the fix to CHE26. A shining success! In combination with my last year's skybox hack got solid 50+ fps (30 if looking straight up).

Like this:

26likethis

Sergeant_Mark_IV wrote:

Should I just expand the tower's fake skybox area and set it more apart from the actual skybox?

I experimented and found no difference against my preferred method of undefined-colored additional sectors.

Edited by: chebmaster2

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.