Dungeon lags terribly

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
User avatar
jayhova
Posts: 924
Joined: Wed Jul 19, 2017 7:54 pm
Contact:

Dungeon lags terribly

Post by jayhova »

I noticed on a recent dungeon crawl that the dungeon is very laggy. This is so bad that sometimes I will open the spell book and be unable to cast the spell because DFU does not see my double click due to the lag. I found this rather surprising. Lag is directly related to the direction I am facing but not to the items in the scene. I can for instance be in a closed off room and have the same issue. I am curious if anyone else has the same issue.
Attachments
SAVE39.zip
(202 KiB) Downloaded 82 times
Remember always 'What would Julian Do?'.

User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Dungeon lags terribly

Post by pango »

With your save, and in the direction you're facing, I do experience some low fps. But it depends a lot on mods.

No mods: 260 fps
Fully modded: 31 fps

(obtained using "tdbg" in the console; and with vsync disabled)
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Dungeon lags terribly

Post by Interkarma »

Also be sure that dungeon shadows are disabled.

User avatar
jayhova
Posts: 924
Joined: Wed Jul 19, 2017 7:54 pm
Contact:

Re: Dungeon lags terribly

Post by jayhova »

pango wrote: Wed May 22, 2019 8:22 pm With your save, and in the direction you're facing, I do experience some low fps. But it depends a lot on mods.

No mods: 260 fps
Fully modded: 31 fps

(obtained using "tdbg" in the console; and with vsync disabled)
I assumed that was the case. I tried my setup with no mods and it was still very laggy. I found the mods were not the main problem.
Remember always 'What would Julian Do?'.

User avatar
jayhova
Posts: 924
Joined: Wed Jul 19, 2017 7:54 pm
Contact:

Re: Dungeon lags terribly

Post by jayhova »

Interkarma wrote: Wed May 22, 2019 9:13 pm Also be sure that dungeon shadows are disabled.
That was it. Dungeon shadows totally killed my performance. It looks like shadows I can't even see are making the game unplayable. The game lags in areas I would not expect shadow generation to affect. I really like the shadows but it seems like the more of the dungeon I explore the worse it gets.
Remember always 'What would Julian Do?'.

User avatar
jayhova
Posts: 924
Joined: Wed Jul 19, 2017 7:54 pm
Contact:

Re: Dungeon lags terribly

Post by jayhova »

pango wrote: Wed May 22, 2019 8:22 pm
Fully modded: 31 fps

(obtained using "tdbg" in the console; and with vsync disabled)
I get similar, if slightly lower, FPS with mods (no shadows)
With no mods and shadows turned on I get very low number 3-5 FPS
I have not tested with both on but I imagine around 1 FPS or worse.
Remember always 'What would Julian Do?'.

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Dungeon lags terribly

Post by Interkarma »

Thanks for letting me know. The core issue is the default shadow distance is too high for that number of lights. which hits the CPU pretty hard.

I've already trialled some optimisations that work great, but I'm holding these for part of a larger lighting review sometime in alpha.

User avatar
jayhova
Posts: 924
Joined: Wed Jul 19, 2017 7:54 pm
Contact:

Re: Dungeon lags terribly

Post by jayhova »

From what I can tell the speed seems to be affected by things not actually in the scene. Stranger still is going into the spell book and having lag still going on (I'll actually look at this with the frame rate tool in a bit). The same seems to happen in the 3D map. Again I'll try and hunt down frame rates. It would be easier if I didn't have to exit out of the game every time I wanted to test a different thing. :D
Remember always 'What would Julian Do?'.

User avatar
King of Worms
Posts: 4753
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Dungeon lags terribly

Post by King of Worms »

Ive reported the same problem some months ago. It indeed is caused by light shadows enabled.

And its CPU bound, not gpu.

Its strange few lights can kill a cpu, something is off there. Also, shadow resolution/quality settings do NOT change the framerates in this case,..

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Dungeon lags terribly

Post by Interkarma »

It's related to number of lights and shadow distance specifically. As I said above, I already have some optimisations that work great. I'm holding this for alpha lighting review in a couple of months. :)

Post Reply