Shadows

Everything about development and the OpenMW source code.
User avatar
AnyOldName3
Posts: 2666
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

And I just pushed the necessary changes to use three shadow maps per light.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Shadows

Post by scrawl »

Can you start a PR on github (obviously not for merging yet) so it's easier to comment on things? And regarding the branches, we should probably pick one (my preference would be 'method two') which we can still change later if we change our mind.
User avatar
AnyOldName3
Posts: 2666
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

My preference was method one until it stopped working today. Changing the shadows for the minimap and character preview would be far easier if I just toggled a nodemask rather than binding a bunch of textures.

I'll make the PR from the base branch so that I can merge in either one once it becomes clear which is better.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Shadows

Post by scrawl »

Changing the shadows for the minimap and character preview would be far easier if I just toggled a nodemask rather than binding a bunch of textures.
That's not going to work because the shader is still going to attempt to retrieve a shadow map that doesn't exist, just like it does now. Toggling the nodemask would change absolutely nothing.

I've tested the split shadows just now. It seemed to me that they make the resolution more consistent (i.e. less 'freaking out' as Capostrophic called it, at certain angles; but strangely, the resolution that I get at 'normal' angles seems to be a bit lower now - or am I imagining things?)
User avatar
AnyOldName3
Posts: 2666
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

That's actually a good point which I'd forgotten about. However, I wasn't sure if it's the case that we're attempting to render another shadow map specifically for the minimap and character preview but it's failing for some reason and so if we did things without nodemasks, that attempt is still made. I just had a more detailed look, and the VDSM code seems to make the assumption that there's one camera per CullVisitor, so that's a non-issue. Looks like a method-two style solution is what we need for the character preview and minimap.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Shadows

Post by scrawl »

I hadn't considered making the settings configurable at runtime, and am not convinced that osgShadow::VDSM can cope with that.
I don't foresee any problems on the osgShadow side. We can always delete the ShadowedScene and create a new one with new parameters if we can't change the existing ones.
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Shadows

Post by raevol »

You guys are my heroes, just wanted to throw that out there.
User avatar
AnyOldName3
Posts: 2666
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

The local map and character preview are now working as intended.
Bulbulator
Posts: 9
Joined: 22 May 2014, 16:21

Re: Shadows

Post by Bulbulator »

Good to hear! What still needed before final implementation?
Post Reply