Shadows
- AnyOldName3
- Posts: 2686
- Joined: 26 Nov 2015, 03:25
Re: Shadows
Increasing shadow map resolution should increase the load for the rasteriser and fragment shaders, but shouldn't change much else. We've not got complicated meshes, so rasterisation isn't that hard, and our fragment shaders aren't that complex (although if I could get it working, they could be optimised further for shadow casting), so the performance hit might not be as large as for other games. There's also the other issue that the shadow system currently does a load of scene traversals which run on the CPU, so turning on shadows means you're spending a lower ratio of your time waiting for the GPU, so increasing GPU load will have a smaller impact on framerate than one might expect.
Re: Shadows
Very interesting, I had no idea that it was related to GPU wait times. Thank you!
Re: Shadows
Thanks for your answer!
For example:
Hard vs. soft shadows
Made in the Shade: How NVIDIA Helped Cast More Realistic Shadows in ‘Grand Theft Auto V’
But hard shadows are quite rare IRL.AnyOldName3 wrote: ↑09 Apr 2018, 21:18 Regarding soft shadows, I might implement PCSS filtering, but I might not. Usually it's an effect used to hide low-resolution shadow maps instead of making things look more realistic. In my investigations, I've been outside and looked at the shadows cast by real objects, and they don't really get soft until it's extremely cloudy, at which point shadows are really faint anyway, so it doesn't matter so much.
For example:
Hard vs. soft shadows
Made in the Shade: How NVIDIA Helped Cast More Realistic Shadows in ‘Grand Theft Auto V’
- AnyOldName3
- Posts: 2686
- Joined: 26 Nov 2015, 03:25
Re: Shadows
When you see soft shadows in games, they're often significantly softer than in real life to the point that hard shadows would have been more realistic. PCSS is a technique that can be realistic if used correctly, hence why I said I might consider implementing it, and also why it was featured in that GTAV article. The non-GTAV article's example image for soft shadows is a gazillion times softer than any shadow the sun has ever cast (or at least cast on Earth - I imagine that it casts softer shadows on Mercury, but OpenMW isn't primarily designed for games set on Mercury).
Re: Shadows
Yes, PCSS seems to be a most good-looking soft shadow technique. May it be combined with current shadow maps like PCF or another rework is needed?
- AnyOldName3
- Posts: 2686
- Joined: 26 Nov 2015, 03:25
Re: Shadows
PCSS basically just uses data about the scene and shadow map to determine which size of PCF filter to use, so it shouldn't be too difficult. IIRC it should also only require changes to the shaders, so shouldn't be too hard to add to whatever system we end up with in the end.
Re: Shadows
How is this progressing?
Any chance we will get shadows on OpenMW 0.44 or it's more like OpenMW 0.45?
Thank you for your good work.
Any chance we will get shadows on OpenMW 0.44 or it's more like OpenMW 0.45?
Thank you for your good work.
- AnyOldName3
- Posts: 2686
- Joined: 26 Nov 2015, 03:25
Re: Shadows
The last six days have produced amazing results and suddenly it looks like shadows might be mergeable really soon. I need lots of people to start picking fault with things when using this branch: https://github.com/AnyOldName3/openmw/t ... hadow-maps
If I don't get lots of people testing this across the whole surface of Nirn at all times of day both indoors and out, such a big set of changes is bound to introduce regressions. We don't like those, so they must be eradicated.
If I don't get lots of people testing this across the whole surface of Nirn at all times of day both indoors and out, such a big set of changes is bound to introduce regressions. We don't like those, so they must be eradicated.
Re: Shadows
Oh. Ok, well I guess I could try them out for you then...AnyOldName3 wrote: ↑18 May 2018, 23:04 The last six days have produced amazing results and suddenly it looks like shadows might be mergeable really soon. I need lots of people to start picking fault with things when using this branch: https://github.com/AnyOldName3/openmw/t ... hadow-maps
If I don't get lots of people testing this across the whole surface of Nirn at all times of day both indoors and out, such a big set of changes is bound to introduce regressions. We don't like those, so they must be eradicated.
Just kidding. Sounds amazing, I will build this immediately.
- lgromanowski
- Site Admin
- Posts: 1193
- Joined: 05 Aug 2011, 22:21
- Location: Wroclaw, Poland
- Contact:
Re: Shadows
It would be awesome if you would make some short demo-movie on YT with new shadowsAnyOldName3 wrote: ↑18 May 2018, 23:04 The last six days have produced amazing results and suddenly it looks like shadows might be mergeable really soon. I need lots of people to start picking fault with things when using this branch: https://github.com/AnyOldName3/openmw/t ... hadow-maps