Shadows

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

Re: Shadows

Post by AnyOldName3 » 07 Nov 2017, 21:35

And I just pushed the necessary changes to use three shadow maps per light.

User avatar
scrawl
Posts: 2085
Joined: 18 Feb 2012, 11:51
Contact:

Re: Shadows

Post by scrawl » 07 Nov 2017, 22:47

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: 563
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 » 07 Nov 2017, 23:06

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: 2085
Joined: 18 Feb 2012, 11:51
Contact:

Re: Shadows

Post by scrawl » 08 Nov 2017, 01:19

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: 563
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 » 08 Nov 2017, 01:31

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: 2085
Joined: 18 Feb 2012, 11:51
Contact:

Re: Shadows

Post by scrawl » 08 Nov 2017, 01:50

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: 2498
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Shadows

Post by raevol » 08 Nov 2017, 06:10

You guys are my heroes, just wanted to throw that out there.

User avatar
AnyOldName3
Posts: 563
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 » 08 Nov 2017, 14:39

The local map and character preview are now working as intended.

Bulbulator
Posts: 7
Joined: 22 May 2014, 16:21

Re: Shadows

Post by Bulbulator » 12 Nov 2017, 10:52

Good to hear! What still needed before final implementation?

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests