Cube map shadows

Started by
13 comments, last by Woodchuck 18 years, 1 month ago
Hello everyone, what is the advantages and disadvantages of using cube map shadows in games? Or maybe perspective shadow maps is more efficient then cube map shadows? Thank you.
----My dev blog: http://slypot.com/blog
Advertisement
Well cube mapped shadows gives you the possibility of having projected shadowing with point lights, not just with spot lights. The disadvantage is that it is 6 times slower ebcause it has to be done through 6 directions.

Dave
Quote:Original post by Dave
Well cube mapped shadows gives you the possibility of having projected shadowing with point lights, not just with spot lights. The disadvantage is that it is 6 times slower ebcause it has to be done through 6 directions.

Dave



Well, the shadow _generation_ is about 6x slower. Shadow cubemaps (and derivations of) are basically the only way to make shadow mapping with omnidirectional (aka point) lights work. Perspective shadow maps is for directional lights exclusively (even though the PSM paper suggests that they could be used for omni lights, which I think is an absolute joke. Offscreen omni lights do NOT produce the same results as directional lights).
Cube maps aren't the only way, Cypher. There's also dual paraboloid shadow maps - thats 2 renders, which is a bit better. Daver, as everyone has says - cube maps give you 360° coverage around a point, which means that a point light can be used.
Ollie"It is better to ask some of the questions than to know all the answers." ~ James Thurber[ mdxinfo | An iridescent tentacle | Game design patterns ]
Has anyone here implemented dual paraboloid shadow mapping? I had a really hard time finding any decent articles about the paraboloid map generation. I finally just got the map generation working correctly, hopefully in the next day or 2 I'll have to time to to finish it all up. I'll post some screens showing quality and speed comparisons between dual paraboloid maps and cube maps for point light shadowing in the next couple days.
Quote:
Has anyone here implemented dual paraboloid shadow mapping?


There is a demo at Delphi3D demonstrating the technique. It might help if you don't mind reading Delphi code.

HellRaiZer
HellRaiZer
Quote:Original post by acid2
There's also dual paraboloid shadow maps - thats 2 renders, which is a bit better


Yes, but i have been read that: "...Sphere and paraboloid maps uses only 78% of the actual texture resolution available in the texture map image..."
and in that Delphi3D demo I found unprofitable results:
http://img208.imageshack.us/img208/9550/paraboloidshadows5bc.jpg

Also "paraboloid mapping ... is more expensive because it requires two texture units or two rendering passes", so if I have only one spare texture unit (0-color map, 1-normal map, 2-height map for parallax mapping, 3-spare), I have to draw all scene twice (this is expensive if I have a huge amount of polygons in the scene).

So what is the best solution (speed and quality) of soft shadows in the next-generation engine?

And what do you think about shadow volumes that is blured in screen space (like in Unigine)?

Quote:Original post by Leafteaner
I'll post some screens showing quality and speed comparisons between dual paraboloid maps and cube maps for point light shadowing in the next couple days.


Oh, it would be great :)
----My dev blog: http://slypot.com/blog
Quote:Original post by acid2
Cube maps aren't the only way, Cypher. There's also dual paraboloid shadow maps - thats 2 renders, which is a bit better. Daver, as everyone has says - cube maps give you 360° coverage around a point, which means that a point light can be used.


I hardly feel that DPSMs are practical for scenarios in the real world.

They may be 2 renders, but they're really only useful for either:
-Fairly faraway lights and used as a level of detail control or
-Ridiculously high poly environments (and even in this case, the resulting shadow detail of DPSMs are still absolutely horrible. Plus, what's the point in having 1/3 of the render calls when you need >100x the number of vertices to get correct shadows most of the time?)

The argument of 2 passes just isn't very compelling to me considering the tradeoffs you have to make with regards to resulting detail and extra transformation in the general case scenario. I will totally give you the argument of using them as a LoD system, but even then I'll need some hard results in order to be fully convinced that they're robust enough for even that manner of use.

The main reasoning behind my gripe is the fact that you need to do a curved projection for DPSMs, not a linear one. Plus, you end up getting a ridiculously low quality, as Daver's screenshot of the DPSM demo demonstrates.

Oh, and for the Delphi3d demo, did you check out the wireframe shot of the environment?


Quote:Also "paraboloid mapping ... is more expensive because it requires two texture units or two rendering passes", so if I have only one spare texture unit (0-color map, 1-normal map, 2-height map for parallax mapping, 3-spare), I have to draw all scene twice (this is expensive if I have a huge amount of polygons in the scene).


4 Texture units? I thought most hardware had 8?

Quote:Original post by Cypher19
4 Texture units? I thought most hardware had 8?



All modern shader model 2.0 hardware and greater have at least 16.
Quote:Original post by Brian Lawson
All modern shader model 2.0 hardware and greater have at least 16.


Holly cow, I didn't know!!! :))):O I thouth for example geforce 6200 have only 4, because according this: http://delphi3d.net/hardware/

----My dev blog: http://slypot.com/blog

This topic is closed to new replies.

Advertisement