Shadows

Everything about development and the OpenMW source code.
User avatar
lysol
Posts: 1513
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: Shadows

Post by lysol »

Br0ken wrote: 06 Apr 2018, 21:12 Any chances to see that magic in 0.44.0?
viewtopic.php?f=20&t=4813&start=20#p53436
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

I'm at a point where I understand everything that's going on in the sample program that came with the original LiSPSM paper, but OpenSceneGraph's convex hull and polytope implementations are missing features that I need, so I need to write a new one of those. When that's done. I can get to work replacing a huge chunk of code that I don't like and think is broken, and that might magically get rid of most of the remaining issues.
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Shadows

Post by raevol »

If you have the time/motivation, a write-up of what you've done (when you're done) would be REALLY interesting (for at least me) to read!

I know you're already putting in a ton of work, so don't do this unless it's interesting to you too, haha. But I've been doggedly following the pull request and poring over the code, and it's definitely over my head.
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

When there was discussion of a dev-lead newspost, I offered to do something in sort of an interview format as I think if I'm actually explaining what I've been doing to a normal person who can ask questions and then reorder the responses it should produce something a lot easier for a layperson to understand. If I just write stuff, then it'll likely take a lot longer and I can only do it as a person who already has a pretty good idea about what I've been doing.

By the way, if anyone's super eager to do some work while I'm asleep, I'd appreciate someone writing an OSG-compatible convex hull class which allows regions to be added by specifying a vertex to ensure is within the hull and regions to be removed by specifying osg::planes to clip with, and then once the hull has been computed, to be able to get a vector of all the vertices at the extreme points of the hull. The OSG classes only meet the requirement that you can use planes to remove regions and don't even let you add new vertices, which is, in my opinion, the most vital feature of a convex hull class as without it you can't actually compute the convex hull of anything.

Can anyone tell that I'm cross this isn't something OSG has for me?
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Shadows

Post by raevol »

AnyOldName3 wrote: 07 Apr 2018, 01:51 I think if I'm actually explaining what I've been doing to a normal person who can ask questions and then reorder the responses it should produce something a lot easier for a layperson to understand.
I'll try to get some questions written up!
User avatar
Br0ken
Posts: 243
Joined: 02 Apr 2012, 05:54
Location: Siberia

Re: Shadows

Post by Br0ken »

What kind of shadow mapping techniques uses in current implementation?
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

PSSM with LiSPSM applied to each split. Right now, there are enough issues that neither comes close to being adequate on its own.
User avatar
Br0ken
Posts: 243
Joined: 02 Apr 2012, 05:54
Location: Siberia

Re: Shadows

Post by Br0ken »

Interesting.
As a Master of Shadows, can you please explain a difference between Parallel-Split Shadow Map and Cascaded Shadow Map?
And what about soft shadows in your implementation?
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

PSSM and CSM are more or less the exact same thing and in a lot of cases, the terms are used interchangeably. Sometimes, though, CSM implementations do things which are less common in PSSM implementations. For example, it's rare to see something claiming to be PSSM using a shader to decide which single shadow map to use - instead taking data from each (and letting shadows be cast by either shadow map in regions of overlap) is more common. It's also sometimes the case that CSM implementations have the nearer shadow maps be contained within the area of the far ones (the attached diagram should help if the explanation isn't clear).
Untitled.png
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.
imec
Posts: 37
Joined: 13 May 2012, 22:03

Re: Shadows

Post by imec »

Thank you for your illustration AnyOldName. I also had a question about shadows. I've noticed that shadow resolution has almost no discernible effect on performance in OpenMW, while this is usually one of the most performance intensive settings to raise in other games. Why is this?
Post Reply