Page 27 of 32

Re: Shadows

Posted: 21 Nov 2018, 22:24
by AnyOldName3
Morrowind's data doesn't have stuff like occlusion planes, so there's no way to tell which things could be culled if it's only because they're behind other objects. It might just be that things are doing more than you think, so instead of it being one effect destroying performance, it might be a last-straw-that-broke-the-camel's-back scenario.

Re: Shadows

Posted: 04 Dec 2018, 05:32
by Ravenwing
AnyOldName3 wrote: 01 Nov 2018, 15:21 Blurring everything at the edges is an option, but it's not one I like. Shadow map resolution actually has a very, very small performance impact compared to what you might expect, so turning it up is almost always an option if shadows are too pixelated. Try the shadows on an OGRE build of OpenMW (e.g. 0.36.1) and you'll see how it can look terrible to just blur things at the edges.

Blurring based on distance to the shadow caster is another option, though, and would be a much better approximation of how real shadows look. The obvious technique for that is Percentage-Closer Soft Shadows, which is widely used and relatively simple to implement. The only problem with that is that I have a strong suspicion that it'll be more complicated than I'd like to make it work with our light-space perspective transform, and I can't find much online about people integrating PCSS and LiSPSM (except for the phrase "friends don't let friends use perspective shadow maps", which isn't helpful as while we could achieve the same quality by throwing more CSM splits at the problem, that would have a huge performance impact).
Having done a lot more play-testing and generally messing around, I have pretty much decided that I will never be able to get certain angles to have un-aliased shadows. At probably 60% of angles, the edges are totally crisp. At another 20%, there is some aliasing but it's very hard to notice. For the remaining 20% though, the aliasing can be quite distracting. I simply don't see a way around this without blurring the edges at least a little bit. The worst bit is when the aliasing races around the edge. I think the percentage closer soft shadows sounds great, but maybe a configurable blur would be sufficient until you're able to work on them.

Also, I know we're planning on this anyway, but I think if this is to be merged with the master, it absolutely must include a GUI component, because damn is messing around with the settings tedious. We just need to make it clear this is a feature in beta.

Re: Shadows

Posted: 04 Dec 2018, 09:12
by psi29a
Just make it clear that we're not 'done' with Shadows. :) Just like OpenMW, we're continuously improving.

However, after playing with Fallout4... their shadows SUCK in comparison with what we have now. Seriously... if people are going to complain about what we have, as a FOSS project, then jesus... they should be asking for their money back from Bethesda.

Example: I see bloody square 'shadow' the size of an apple floating by on the ground because of particle effects of 'smoke' coming out of a building or through a tree. In addition to that... every few minutes, the shadows literally move because of the time of day change. It is _not_ seamless... I can literally see the shadows every minute or two shift to the next 'phase' of the day.

Re: Shadows

Posted: 04 Dec 2018, 16:20
by Ravenwing
Perhaps I came off more critical than I intended, because we are in complete agreement. I’ve been playing Assassins Creed and their shadows don’t hold up too well under inspection and that’s Ubisoft. If AAA studios can’t get them perfect, then there should be no expectation that we will.

Unfortunately I know there will be people who won’t understand this, hence calling it beta or “not done”, at least for a release or two. Distant land is still under beta I believe yes? Obviously we’ll always be seeking to improve them even after this.

And goddamn those periodic shadow updates in Fallout :?

Re: Shadows

Posted: 12 Dec 2018, 01:44
by jagerarts
Hi!

Is there any chance we get a preview video with the current build of shadows? I'm really curious how they look in OpenMW but not tech savvy enough to compile it myself.

Re: Shadows

Posted: 12 Dec 2018, 02:00
by terabyte25
jagerarts wrote: 12 Dec 2018, 01:44 Hi!

Is there any chance we get a preview video with the current build of shadows? I'm really curious how they look in OpenMW but not tech savvy enough to compile it myself.
Here's the build for windows.
https://ci.appveyor.com/api/buildjobs/b ... fb58e1.zip

Shadows also need configuration in your settings files, here's the ones I use:

Code: Select all

[Shadows]
enable shadows = true
object shadows = true
actor shadows = true
player shadows = true
number of shadow maps = 3
shadow map resolution = 2048
compute tight scene bounds = true
split point uniform logarithmic ratio = 1.0
polygon offset factor = 16
polygon offset units = 72.0
use front face culling = false

Re: Shadows

Posted: 12 Dec 2018, 22:48
by Capostrophic

Code: Select all

polygon offset factor = 16
polygon offset units = 72.0
Please don't do this.

Re: Shadows

Posted: 13 Dec 2018, 06:31
by akortunov
Capostrophic wrote: 12 Dec 2018, 22:48 Please don't do this.
Any better idea how to prevent flickering? AnyOldName3 suggested to use huge values.

Re: Shadows

Posted: 13 Dec 2018, 17:19
by AnyOldName3
After googling something subtly different to what I'd googled last time (thanks, Google, for being really shit recently) I found more results. I might be able to do something like this https://www.gamedev.net/forums/topic/66 ... nt-5210793 where I bias the sampled depth with a little bit of the normal, which might help.

The real solution would be for Morrowind to not use any thin geometry, or at the minimum, do something to tag meshes which have thin geometry so I can handle them separately.

Re: Shadows

Posted: 13 Dec 2018, 18:16
by akortunov
AnyOldName3 wrote: 13 Dec 2018, 17:19 or at the minimum, do something to tag meshes which have thin geometry so I can handle them separately.
In theory, we can use NiStringExtraData to tag such nodes in NIF files, but I doubt that modders actually will use it.