High GPU Usage Tavern

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
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: High GPU Usage Tavern

Post by Magicono43 »

King of Worms wrote: Fri May 27, 2022 7:35 am Hm, doubt anyone would do that seeing how this issue is being handled, so why even bother?
Not sure what you mean. If somebody realized that some places had worse performance due to the design of the interiors themselves in the Daggerfall data, I'm sure that eventually somebody would take it upon themselves to try and fix these problem places, especially if pointed directly at the ones causing issues.

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

Re: High GPU Usage Tavern

Post by pango »

Well, I feel that some kind of occlusion culling would help in such situation were overdraw is costly (complex lighting, but more detailed 3D models will be an issue too) and should be avoided for good performance;
But in Daggerfall Unity all scenes are dynamically built and Unity does not do occlusion culling in that case, because it's a hard problem to begin with...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: High GPU Usage Tavern

Post by pango »

I think that for hardware that has trouble with many close lights, one thing to try would be to lower the maximum number of "pixel lights": https://unity3d.college/2017/07/06/pixe ... s-unity3d/
Does lowering Video Quality Level help?


For models I came across CullingGroup API:
https://docs.unity3d.com/2019.2/Documen ... upAPI.html

I think it could be used say to avoid rendering furnitures that are totally hidden behind walls; that could be specially beneficial when using mods like HandpaintedModels, that's most costly to render than classic models.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Orbarth
Posts: 61
Joined: Wed Aug 07, 2019 10:37 pm

Re: High GPU Usage Tavern

Post by Orbarth »

In early versions of Daggerfall Unity the huge drop in performance in any house/tavern/shop was maddening to me as there was nothing visually that was justifying such problem and no settings seemed to lower the impact. Even crazier considering there was no performance issue in the wilderness even with high view distance. Made you wonder if all those complaints about the performance of the unity engine you read often on boards were right.

With time and improvement from the amazing devs of Daggerfall Unity the problem nearly disappeared, nearly because there are indeed still some buildings in which you can observe performance issues as the one mentionned in the OP, when you move your view with the mouse, everything feels more "floaty" by example.

For the taverns, check the Tavern Redone by Uncanny Valley and Kamer :
viewtopic.php?t=2979
though it will "only" change (that's already amazing amount of taverns) 50% of the taverns that are redone (i haven't tested yet The White Dog in Chesterwark to see if it's one of the taverns that are changed), there's :
Improved performance on certain heavy taverns
So it's a good idea to use this mod and check if it improve your performance issues in some taverns.
pango wrote: Tue May 31, 2022 12:28 pm I think that for hardware that has trouble with many close lights, one thing to try would be to lower the maximum number of "pixel lights": https://unity3d.college/2017/07/06/pixe ... s-unity3d/
Does lowering Video Quality Level help?
Interesting, looks like to turn off the pixel lights you need to lower the video quality to "Fast" , as everything above will have at least 1 pixel light (up to 4 in "Fantastic" ).

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

Re: High GPU Usage Tavern

Post by pango »

Orbarth wrote: Fri Jun 10, 2022 10:09 am Even crazier considering there was no performance issue in the wilderness even with high view distance.
That's the thing, compact environments with several close source lights can be actually much harder to render than open spaces. At least they're challenging in totally different ways, so one is not necessarily easier than the other.
Orbarth wrote: Fri Jun 10, 2022 10:09 amMade you wonder if all those complaints about the performance of the unity engine you read often on boards were right.
Well, they're standard tricks to get good performance in a 3D engine, frustum culling etc. Everybody does those.
But after that you need tricks that will depend on your case: what kind of environment your game features, what visual effects you use, etc. and that's were general 3D engine can't automatically help, you have to sit down, measure performance, understand what's going on, find tricks what will help in this case, maybe invent some, repeat. And really there's not much an engine can do about it, beside not getting in the way and letting you implement what you need.
So far, for this case, the only benefit Unreal engine seems to have out of the box is some default hardware occlusion culling that Unity3D doesn't have; Unity has some static occluders culling, that cannot be applied to fully dynamic scenes (feel free to correct me).
So yeah, slight but cool advantage out of the box, but after that in both engines performance will depend on the effort put in optimizing stuff with brain juice.
Unity static occlusion culling is not on by default, as it needs extra effort (classify objects as occluder or occludee, occlusion area, portals, then precompute extra data) and not always help with performance. It's possible that Unity then suffers from having a lower cost of entry, so being used for many projects that nobody will spend time/effort optimizing.
Orbarth wrote: Fri Jun 10, 2022 10:09 amFor the taverns, check the Tavern Redone by Uncanny Valley and Kamer :
[...] there's :
Improved performance on certain heavy taverns
So it's a good idea to use this mod and check if it improve your performance issues in some taverns.
I'm pretty sure it means improved performance vs. previous version of the mod, because I don't see how adding objects in the scene would improve performance vs same scene without those objects.
pango wrote: Tue May 31, 2022 12:28 pm Interesting, looks like to turn off the pixel lights you need to lower the video quality to "Fast" , as everything above will have at least 1 pixel light (up to 4 in "Fantastic" ).
Well I didn't necessarily mean you need to get rid of all pixel lights, as it does have an effect on visual quality; But if framedrop comes from overdraws, then making those cheaper by lowering the number of pixel lights should help, and that could be something to keep in mind for future development (say, find a way to selectively lower the max number of pixel lights instead of lowering overall quality setting).
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Orbarth
Posts: 61
Joined: Wed Aug 07, 2019 10:37 pm

Re: High GPU Usage Tavern

Post by Orbarth »

pango wrote: Fri Jun 10, 2022 12:41 pm I'm pretty sure it means improved performance vs. previous version of the mod, because I don't see how adding objects in the scene would improve performance vs same scene without those objects.
The mod is not only about adding objects, most taverns are completely redesigned, so i imagine the author certainly deleted all those dozen of light sources close to each other and set up his own lights.
see by example this one in which you can also notice that the author didn't have lights right next each other :
viewtopic.php?p=49499#p49499

User avatar
Baler
Posts: 225
Joined: Thu May 23, 2019 1:39 am
Location: Earth

Re: High GPU Usage Tavern

Post by Baler »

omg Interkarma I love you! :mrgreen:

AmbientLitInteriors performance option
A quality vs. performance trade-off setting for low-end PCs that struggle with many overlapping interior lights.
Enabling setting disables all point lights in interiors and uses a brighter ambient light instead to compensate for absence of point lights.

https://github.com/Interkarma/daggerfal ... 0457fc2385

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

Re: High GPU Usage Tavern

Post by Interkarma »

Hey Baler! Hope that one helps. :)

Just in case someone comes along later, I renamed this setting in 0.14.0 to "Simplify Interior Lighting" and updated tooltip. I thought this would help describe it better as a performance option.

Post Reply