[Not a bug] Unplayable VM time with double (spot?) lights

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Unplayable VM time with double (spot?) lights

Postby RicardoLuis0 » Wed Apr 14, 2021 12:32 pm

The exact circumstances that cause this are currently unknown, but reproducible. Framerate drops down to almost zero due to it.

This was discovered when trying my flashlight mod (double-beam mode) in the first map of the Hell Forged wad, this happens only with double flashlight beams enabled (and doesn't happen in simple maps, ex. vanilla doom/doom2/etc, so it seems to be about some aspect of the architecture of new-format maps? not sure). It is also not unique to my own mod, another mod that also features a double beam flashlight also suffers from this. This happens in both latest release (v4.5.0) and in git master.

Demonstration:


I've tried searching the forums for if this bug was reported previously but found nothing, so excuse me if this is a duplicate report.
RicardoLuis0
 
Joined: 21 Aug 2018
Location: Brazil
Discord: RicardoLuis0#1862
Github ID: RicardoLuis0
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Unplayable VM time with double (spot?) lights

Postby InsanityBringer » Wed Apr 14, 2021 12:43 pm

If I had to guess, I think the problem is that since the inner cone is a loot larger than the outer cone, the game has to check way more geometry to see if it's within the light or not. I experienced a similar problem adding a double-coned flashlight to my Doom 3 weapons mod, but didn't report at the time assuming that was the reason and that much couldn't have been done about it.
User avatar
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: Unplayable VM time with double (spot?) lights

Postby RicardoLuis0 » Wed Apr 14, 2021 12:46 pm

InsanityBringer wrote:I think the problem is that since the inner cone is a loot larger than the outer cone, the game has to check way more geometry to see if it's within the light or not

This has dynamic shadows disabled, and the slowdown doesn't happen in vanilla maps, and it doesn't happen if only one of the lights is enabled, even if that one enabled light is the largest one of the two, so i don't think that would be the cause, no. And the other mod in which it happens doesn't have a large light cone at all.
RicardoLuis0
 
Joined: 21 Aug 2018
Location: Brazil
Discord: RicardoLuis0#1862
Github ID: RicardoLuis0
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Unplayable VM time with double (spot?) lights

Postby Graf Zahl » Wed Apr 14, 2021 12:55 pm

What graphics card was this recorded on?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Unplayable VM time with double (spot?) lights

Postby RicardoLuis0 » Wed Apr 14, 2021 12:56 pm

Graf Zahl wrote:What graphics card was this recorded on?

GTX 970
RicardoLuis0
 
Joined: 21 Aug 2018
Location: Brazil
Discord: RicardoLuis0#1862
Github ID: RicardoLuis0
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Unplayable VM time with double (spot?) lights

Postby phantombeta » Wed Apr 14, 2021 6:10 pm

RicardoLuis0 wrote:
InsanityBringer wrote:I think the problem is that since the inner cone is a loot larger than the outer cone, the game has to check way more geometry to see if it's within the light or not

This has dynamic shadows disabled, and the slowdown doesn't happen in vanilla maps, and it doesn't happen if only one of the lights is enabled, even if that one enabled light is the largest one of the two, so i don't think that would be the cause, no.

That's not what they meant. The lights have to check the geometry to know what they affect, otherwise, they can't be rendered. This is not a particularly cheap process, and can take significant time with huge lights.
User avatar
phantombeta
Tired of being treated like trash by control freaks
 
Joined: 02 May 2013

Re: Unplayable VM time with double (spot?) lights

Postby Nash » Wed Apr 14, 2021 7:13 pm

If the engine supports light cookies, people can stop abusing using two lights for their flashlight mods... :mrgreen:
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Unplayable VM time with double (spot?) lights

Postby Caligari87 » Thu Apr 15, 2021 2:53 pm

This is simply a factor of how dynamic lights (all kinds) work. The larger the light radius (distance) and the more complex the map, the more slowdown you'll experience. It's geometric; when you double the light radius, you quadruple the area the light needs to check for geometry.

On vanilla maps the slowdown still happens, it's just not enough to be noticeable because there's less geometry to check than most modern maps with large amounts of sector detailing.

The only solution is to reduce the light radius and / or use fewer lights.

8-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: Unplayable VM time with double (spot?) lights

Postby Graf Zahl » Thu Apr 15, 2021 3:32 pm

Yeah, light range of 512 will pretty much be deadly for a moving light source when the map gets more complex. The lights were not made for this.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest