Author Topic: Deferred Lighting and soft shadows  (Read 31782 times)

0 Members and 1 Guest are viewing this topic.

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
Oh btw, did you run debug or release?

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Deferred Lighting and soft shadows
From some more testing I can confirm the warp-out clip & glowpoint issues exist in trunk, I've updated my previous post accordingly.

As for release/debug question, mostly debug in my case.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Linux OBS Packages: FSO 3.7.0 | FSO BP Build | wxLauncher (?) | PCS2 (?) | wxVPView (?)
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline DahBlount

  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Deferred Lighting and soft shadows
I ran the debug build after I crashed using the normal build.
<Axem> yet still more insightful than #hard-light

<Axem> jad2.23 will just be cat videos

<DahBlount> So
<DahBlount> JAD2.2 is like that
<Axem> maybe
<Axem> it can be whatever you like!
<DahBlount> A Chocolate Sundae?
<Axem> sure

My models: GTF Gilgamesh - GTD Nuadha [Redesigning] - Ningirama [WIP] - GTG Zephyrus

 

Offline T-Man

  • 210
  • I came... I saw... I had a cuppa!
Re: Deferred Lighting and soft shadows
Hey, sorry for the delay in new tests (logs below if of use). Assuming that the 'release' build is the other build given in the download, I ran tests using both, and did so for this run. I find only a couple of FPS difference between them, with the release faster by about 5 or so fps normally at times, and a couple of FPS faster in intensive moments. An aspect I completely forgot about earlier (sorry) is my graphics card has dedicated memory (2GB I think it is) to use alongside the system's 4 so graphics may be enjoying that boost.

Here's some more clips.

I found with shadows off gameplay was significantly faster, and went back to what felt like normal for my system (even with deferred lighting switched on) on both release and debug for both the normal and the BP, though it did fluctuate quite a bit as it played (I've not run the FPS checker much on release builds before so I never fully realised). On Media VPs especially there was barely one or two stutters (whereas before it was constantly stuttering), and on BP stuttering was still constant but far less than before.

In low-demand scenes (like viewing one ship in the lab, or in game just looking at space) it would hover around 60FPS. If a few ships were in view or I was viewing a complex model it went down to 30FPS and hovered there, dropping down to the low 20s or 10s when things got serious graphically (for a lot of Icarus it was in this region). Only in the most extreme moments (Icarus mainly with the Solaris) did it drop below 10. On the old test it would be 10s for most of it and drop to 4/5 for lots of Icarus, so it seems a noticeable degree faster.

Noticing how much it actually took while on I did another run with FRAPS off, but found it not much different (it was a couple of FPS faster at times, but no more).

The node was missing again on my normal mission, and Icarus had that 'wet hull' look again. I also noticed some of the FS fighters when viewed in BPs tech room (debug or release) had invisible cockpits (both the glass and most if not all of the cockpit models within were missing), but this wasn't the case on my Media VPs, nor when in-game on BP. This does not occour with other builds to my knowledge.

Hope these help. Let me know if you need anything more.

EDIT: Had a thought this afternoon to do two more tests on debug with the shadows on but deferred lighting off for comparison's sake (added logs below). Extreme stutter throughout again, with mostly 9-12 FPS in both lab and levels for both Normal and BP. Went as low as 4fps during Icarus' Solaris shots. It seems to be the shadow side of things that is causing the slowdowns my end therefore (the deferred lighting was fine), though that said from what I have seen the shadows seem to be working perfectly graphics wise amidst the slowdown. I dunno my PC could be simply running out of memory for the shadows (atm old gal's got to run FSO+Win7+2 security programs+Steam etc on one core) but that's a total n00b's guess so take with pinch of salt.

[attachment deleted by an evil time traveler]
« Last Edit: March 27, 2014, 12:02:58 pm by T-Man »
CAUTION: Rabid Imagination!

self-confessed UEF fanboy.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
Quote
In low-demand scenes (like viewing one ship in the lab, or in game just looking at space) it would hover around 60FPS. If a few ships were in view or I was viewing a complex model it went down to 30FPS and hovered there, dropping down to the low 20s or 10s when things got serious graphically (for a lot of Icarus it was in this region). Only in the most extreme moments (Icarus mainly with the Solaris) did it drop below 10. On the old test it would be 10s for most of it and drop to 4/5 for lots of Icarus, so it seems a noticeable degree faster.

Is this with shadows on or off?

 

Offline T-Man

  • 210
  • I came... I saw... I had a cuppa!
Re: Deferred Lighting and soft shadows
Quote
In low-demand scenes (like viewing one ship in the lab, or in game just looking at space) it would hover around 60FPS. If a few ships were in view or I was viewing a complex model it went down to 30FPS and hovered there, dropping down to the low 20s or 10s when things got serious graphically (for a lot of Icarus it was in this region). Only in the most extreme moments (Icarus mainly with the Solaris) did it drop below 10. On the old test it would be 10s for most of it and drop to 4/5 for lots of Icarus, so it seems a noticeable degree faster.

Is this with shadows on or off?
Sorry, that was with shadows off (and deferred lighting on).
CAUTION: Rabid Imagination!

self-confessed UEF fanboy.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
Well that's not good. How does your machine perform on those scenes normally on a build that's not mine?

 

Offline T-Man

  • 210
  • I came... I saw... I had a cuppa!
Re: Deferred Lighting and soft shadows
Well that's not good. How does your machine perform on those scenes normally on a build that's not mine?
The Normal VPs when run on the 23 Feb nightly release (SSE20140223_r10475, which is what I've been running recently) with graphics at full gives me 60FPS for most of the mission (didn't realise how much in fact) but occasionally drops down to 30FPS or high 20s at high graphic moments, and sometimes at moments where there seemed to be no real explanation (it seemed to if I looked at suns for one, so might have been while doing the light shafts). Lowest figure I ever saw to my knowledge was 19.

I run BP using the most up-to-date BP release build (14th December I think? I'm confident it's the latest whichever) with the lighting turned down to level three but all other effects on full. That gives me 30FPS for most of the mission, dropping to 20s or high 10s when things get heavy and slightly below 10 occasionally (lowest I saw was 6/7 briefly, but 14 or so was common). Not amazing but not unplayable (if I try to run at lighting 5, the results are much like the results I've found with your builds.

Would you like logs for those?
CAUTION: Rabid Imagination!

self-confessed UEF fanboy.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
No, the data you've given me has been very useful so far, thank you.

Okay, so that makes a lot more sense since the BP builds have deferred lighting support. Luckily, I made sure that the engine can run with deferred lighting disabled (Something not available in the BP builds) so that you aren't forced to run at a lower framerate if having more lights isn't that important to you.

I don't know of any additional ways to improve the performance of deferred lighting but I'll have to likely implement cheaper shadow filtering methods that people on lower end machines can switch to.
« Last Edit: March 27, 2014, 10:00:12 pm by Swifty »

 

Offline DahBlount

  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Deferred Lighting and soft shadows
So what about the problem of Deferred lighting screwing up shaders and such?
<Axem> yet still more insightful than #hard-light

<Axem> jad2.23 will just be cat videos

<DahBlount> So
<DahBlount> JAD2.2 is like that
<Axem> maybe
<Axem> it can be whatever you like!
<DahBlount> A Chocolate Sundae?
<Axem> sure

My models: GTF Gilgamesh - GTD Nuadha [Redesigning] - Ningirama [WIP] - GTG Zephyrus

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
how are they screwing up shaders?

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
Re: Deferred Lighting and soft shadows
No, the data you've given me has been very useful so far, thank you.

Okay, so that makes a lot more sense since the BP builds have deferred lighting support. Luckily, I made sure that the engine can run with deferred lighting disabled (Something not available in the BP builds) so that you aren't forced to run at a lower framerate if having more lights isn't that important to you.

I don't know of any additional ways to improve the performance of deferred lighting but I'll have to likely implement cheaper shadow filtering methods that people on lower end machines can switch to.

One of the changes I made in the BP builds was to have the lighting detail slider control how many lights were created, this should probably make it into these builds as well.
**** every cause that ends in murder and children crying. ― Iain Banks
Join the fun at the HLP IRC channel. Get the latest spam and gossip as long as it's fresh!

 

Offline DahBlount

  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Deferred Lighting and soft shadows
how are they screwing up shaders?

For me at least, normal maps do not work with deferred lighting on.

And as far as I can tell team color shaders don't work either.
<Axem> yet still more insightful than #hard-light

<Axem> jad2.23 will just be cat videos

<DahBlount> So
<DahBlount> JAD2.2 is like that
<Axem> maybe
<Axem> it can be whatever you like!
<DahBlount> A Chocolate Sundae?
<Axem> sure

My models: GTF Gilgamesh - GTD Nuadha [Redesigning] - Ningirama [WIP] - GTG Zephyrus

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
Re: Deferred Lighting and soft shadows
Small point: Those are shader features, not shaders. And the team color thing is already known; the normal map thing is just weird though. Can you take comparative screenshots from the F3 lab? Like, take a screenshot of one of the MediaVPs modelsusing both the normal and the deferred lighting build?

In addition, do note that according to your last posted log, you only have an Intel HD GPU. Those are not guaranteed to actually work with some of the more complicated shader stuff we're doing.
**** every cause that ends in murder and children crying. ― Iain Banks
Join the fun at the HLP IRC channel. Get the latest spam and gossip as long as it's fresh!

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
You should also try disabling deferred lighting to see if normal maps work there.

 

Offline Spoon

  • 212
  • ♪ ♬ ヾ(´︶`♡)ノ ♬ 淫画
Re: Deferred Lighting and soft shadows
This is harder to notice on smaller objects: http://youtu.be/A9YhTZB3w0w
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Kolgena

  • 211
Re: Deferred Lighting and soft shadows
Looks like the shadow slope bias (?) is set too high? Shadow disappears when the angle of surface shadowed is too small of an angle to the camera. If so, this should happen even with older hard shadows, and doesn't have much of a workaround if you want to avoid shadow acne.

 

Offline Spoon

  • 212
  • ♪ ♬ ヾ(´︶`♡)ノ ♬ 淫画
Re: Deferred Lighting and soft shadows
No this definitely did not happen with the old shadow build

I would have noticed a long time ago when I was recording this http://youtu.be/8E3a_RL2XkE

Edit: It's also noticable in the briefing ship selection
« Last Edit: April 01, 2014, 09:22:04 am by Spoon »
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
I just figured out why that's happening. I'm forgetting to give the main shader all four projection matrices for the cascades. So that bug should be fixed soon. :D

 

Offline Spoon

  • 212
  • ♪ ♬ ヾ(´︶`♡)ノ ♬ 淫画
Re: Deferred Lighting and soft shadows
Hooray \o/

Edit: I think I forgot to mention anywhere that I used this shadows build to record the video in here
« Last Edit: April 07, 2014, 08:59:25 pm by Spoon »
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them