This topic is 2693 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have read many papers on shadow mapping, trying to gather all the good ideas together for my own shadows

Two things seem like good ideas to me, but I find no mention of them:

a) split scheme based on aspect ratios:

near = 1; far = 100;a = far^(1/3) near^(2/3) - near;b = far^(2/3) near^(1/3) - far^(1/3) near^(2/3);c = far - far^(2/3) near^(1/3);N[{a, b, c}]Result: {3.64159, 16.9028, 78.4557}

this gives 3 sub-frustums with equal aspect ratios

b) projecting occluders outside of tight shadow frustum onto near plane, as opposed to wasting z resolution

is there any value in those ideas?

##### Share on other sites
The second idea (projecting to the near plane) was mentioned by the Bungie folks in (I think) Advances in Real-Time Rendering, 2009 (The SIGGRAPH course). I've seen many different discussions of how to choose frustum splits for cascades, although we usually end up doing it per-level or scene, so the artists can tweak the quality distribution to match up with how the scene geometry is distributed across the Z range.

##### Share on other sites
Both are good ideas. As for (a) you can also partition the frustum dynamically depending on where the camera is looking. That way you can allocate more resolution where you need to. As for the exact algorithm to do that, I think it will very game-specific and will need to be tweaked for the kind of game you are making.

##### Share on other sites

whilst looking for the bungie stuff I found "final_alex_siggraph.ppt" about LittleBigPlanet which is packed full of good ideas

here is the code for 4 way split:

near = 1; far = 100a = far^(1/4)*near^(3/4) - near; b = Sqrt[far]*Sqrt[near] - far^(1/4)*near^(3/4); c = far^(3/4)*near^(1/4) - Sqrt[far]*Sqrt[near]; d = far - far^(3/4)*near^(1/4); N[{a, b, c, d}]{2.16228, 6.83772, 21.6228, 68.3772}