- Download this.
- Load MAP01, warp 1702 2096.
- "give FlashlightToggle" in console.
- Face the crates to the right and watch your computer curl up into the fetal position.
Spotlights: TREMENDOUS slowdowns
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Spotlights: TREMENDOUS slowdowns
Re: Spotlights: TREMENDOUS slowdowns
This seems like a game sim processing issue. When the game is paused the frame rate issues go away.
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Spotlights: TREMENDOUS slowdowns
Holding still will increase FPS too. But not by much. Still if needed, it can be moved to somewhere more appropriate.
Re: Spotlights: TREMENDOUS slowdowns
I'm willing to wager that this also happens with normal lights and that you're using moving a light around with a very large radius (don't have time to look at the mod right now).
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Spotlights: TREMENDOUS slowdowns
That light is wayyyyyy too large for the engine to handle efficiently. With a map this detailed the subsector linking for each movement will take its toll.
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Spotlights: TREMENDOUS slowdowns
Huh... I guess spotlights have a smaller range then, in general?
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Spotlights: TREMENDOUS slowdowns
The performance impact is actually the same as a normal dynamic light but the radius needs to be much higher to appear visually right because we expect spotlights to reach farther than point lights. The problem is that spotlights still "look all around" for affected linedefs even if they generally only illuminate a small portion of them.
I presume the fix would require only looking for linedefs that coincide with the light's cone.
I presume the fix would require only looking for linedefs that coincide with the light's cone.
Re: Spotlights: TREMENDOUS slowdowns
That's correct, Caligari87. However due to portals I didn't feel comfortable trying to improve the light link function without having a 100% understanding of how it links. This kind of function is not one you want to break by doing something careless.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Spotlights: TREMENDOUS slowdowns
What you definitely can do is to stop at segs which are completely outside the cone, provided that this can be done quickly.
Anyway, if you got an idea how to improve performance of creating all the light lists, be my guest.
The algorithm was originally from ZDoomGL, although that original was even more inefficient that what's there now.
In the end this is just one of those things where the Doom engine does not mix well with modern rendering effects
Anyway, if you got an idea how to improve performance of creating all the light lists, be my guest.
The algorithm was originally from ZDoomGL, although that original was even more inefficient that what's there now.
In the end this is just one of those things where the Doom engine does not mix well with modern rendering effects
Re: Spotlights: TREMENDOUS slowdowns
That's what I had in mind, but the angles you check for changes if the seg it crosses is a portal. Not an unsolvable problem, but I didn't feel like attacking it at the time.Graf Zahl wrote:What you definitely can do is to stop at segs which are completely outside the cone, provided that this can be done quickly.
Edit: or hmm, does it?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Spotlights: TREMENDOUS slowdowns
I knew these arbitrarily angled portals were a bad idea from the start but imagine I had removed them. Can you imagine how people might have reacted...?
It should be doable, though. If these portals are handled (I cannot remember if I skipped them), the light needs repositioning anyway so doing the needed rotation as well shouldn't be the issue.
It should be doable, though. If these portals are handled (I cannot remember if I skipped them), the light needs repositioning anyway so doing the needed rotation as well shouldn't be the issue.
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Spotlights: TREMENDOUS slowdowns
Only for Static (Eternity style) portals does the GL lights transfer over. In this example the lines are not static.
- Attachments
-
- portals.wad
- (50.04 KiB) Downloaded 51 times
Last edited by Major Cooke on Fri Jan 26, 2018 2:17 pm, edited 1 time in total.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Spotlights: TREMENDOUS slowdowns
That should make this here a bit easier.
Now I remember why I left them out. Getting the links is not the issue - the real problem is to get the proper location for the light after the portal transformation because this requires the offset table that's only available for static portals.
But here's another question that just came up. How does the shadowmap handle portals if some linedef is between the relocated light and the area affected through the portal?
Now I remember why I left them out. Getting the links is not the issue - the real problem is to get the proper location for the light after the portal transformation because this requires the offset table that's only available for static portals.
But here's another question that just came up. How does the shadowmap handle portals if some linedef is between the relocated light and the area affected through the portal?
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Spotlights: TREMENDOUS slowdowns
It does this with shadowmapping turned on. Turned off, it behaves normally.
EDIT: It's the same for both sides so it depends on the hidden room's depth. Huh...
EDIT 2: Forgot to attach the updated portals.wad. I only changed the two lines directly though, I didn't bother with the rest of them.
EDIT: It's the same for both sides so it depends on the hidden room's depth. Huh...
EDIT 2: Forgot to attach the updated portals.wad. I only changed the two lines directly though, I didn't bother with the rest of them.
- Attachments
-
- portals.wad
- (50.04 KiB) Downloaded 63 times
Re: Spotlights: TREMENDOUS slowdowns
Yeah Cooke is right - only static portals will transfer dynamic lights, and static portals can only face the same direction as their origin. So you can safely clip away everything that's too far out of the spotlight's aperture and it'll still be portal-safe.