Sign in to follow this  
Jason Z

Paraboloid Mapping Article

Recommended Posts

For those who are interested, I have written an article on dual-paraboloid mapping. The article includes theory and implementation on how to generate and access paraboloid maps in real-time using DirectX/HLSL. I posted the article in my journal HERE. Feedback is always welcome, so let me know what you think!

Share this post


Link to post
Share on other sites
Nice write up. Thanks for taking the time.

Not sure if you know this, but Delpi3D also has source code avaliable for a
"Delphi" implementation of DPSM, however no real explanation behind it other than a reference to the same paper that you referenced.

http://www.delphi3d.net/

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi,

I like the idea of dual parabaloidal shadow mapping, but I read on the delphi3D site that it requires high mesh tesselation. Just wondering if there is a work-around for low poly meshes?

It would be refreshing to see parabaloidally projected texels on a scene

Share this post


Link to post
Share on other sites
Yes, I actually tried using the article at Delphi3d, but it was written in assembly and not really all that user friendly. That was part of the reason that I decided to write it in HLSL, so that it would be easier for everyone to understand.

AP: The needed tessellation is dependant on the scene needs. It is discussed briefly in the article...

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Hi,

I like the idea of dual parabaloidal shadow mapping, but I read on the delphi3D site that it requires high mesh tesselation. Just wondering if there is a work-around for low poly meshes?

It would be refreshing to see parabaloidally projected texels on a scene


That is my DREAM that Nvidia and ATI design their pixel shaders to allow the programmer to change where the current pixel is plotted in the frame buffer.

Share this post


Link to post
Share on other sites
Quote:
Original post by oconnellseanm
Quote:
Original post by Anonymous Poster
Hi,

I like the idea of dual parabaloidal shadow mapping, but I read on the delphi3D site that it requires high mesh tesselation. Just wondering if there is a work-around for low poly meshes?

It would be refreshing to see parabaloidally projected texels on a scene


That is my DREAM that Nvidia and ATI design their pixel shaders to allow the programmer to change where the current pixel is plotted in the frame buffer.


That's so very not-possible due to the way how the triangle assembly system works. So almost the whole GPU core would need a revamp and things like early Z fail optimization and hierarchial Z (ATI) would have to go.

Share this post


Link to post
Share on other sites
Thank you for all the feedback! I hope the article will help spread the use of paraboloid mapping, which seems to be under-realized right now for some reason. If there is anything that you guys think could make it better just let me know!

Share this post


Link to post
Share on other sites
I think it would be great to add a section on Dual-Paraboloid Shadow maps ... this is the most obvious case you want to use the dual-paraboloid projection.

The reason why DP shadow maps are not much used in games is, that you do not want to increase the tesselation too much, because it affects the overall performance and then you might also consider shadow volumes a better solution.
As far as I know ATI had a dual-paraboloid projection in hardware at some point ... which would be ultra-cool, but NVIDIA never had. I wonder if it is still in there.

- Wolf

Share this post


Link to post
Share on other sites
<offtopic>
btw what's about tetrahedral shadowmapping? should need only 4 renders instead of 6(cubemap) and doesn't need high tesselation like parabolid maps. Only probably wastes some pixel in the textures...
</offtopic>

regards,
m4gnus

[Edited by - m4gnus on March 21, 2006 12:54:12 PM]

Share this post


Link to post
Share on other sites
<<<
tetrahedral shadowmapping?
<<<
I would think the same problem is true here? We need to do the projection in the vertex shader and therefore the level of tesselation is responsible for the quality of the projection ....
You might even project a point light into a 2D texture .... but same problem applys here.

- Wolf

Share this post


Link to post
Share on other sites
no you would not need the high tesselation because the sides of the tetrahedra aren't curved. but you'd waste some space in the texturespace because the sides are triangles and not squares.

regards,
m4gnus

Share this post


Link to post
Share on other sites
I think you would get distortion problems around the edges of the triangles if the angle between the triangles is less than 90 degrees. Even so, it might be an interesting method - you'll have to let me know how it turns out [smile].

I think it would be good to add a section on dual paraboloid shadow mapping. It isn't really all that much different, but it could be added for completeness.

Thanks again for the replies!!

Share this post


Link to post
Share on other sites
Quote:
Original post by oggialli
Quote:
Original post by oconnellseanm
Quote:
Original post by Anonymous Poster
Hi,

I like the idea of dual parabaloidal shadow mapping, but I read on the delphi3D site that it requires high mesh tesselation. Just wondering if there is a work-around for low poly meshes?

It would be refreshing to see parabaloidally projected texels on a scene


That is my DREAM that Nvidia and ATI design their pixel shaders to allow the programmer to change where the current pixel is plotted in the frame buffer.


That's so very not-possible due to the way how the triangle assembly system works. So almost the whole GPU core would need a revamp and things like early Z fail optimization and hierarchial Z (ATI) would have to go.


Yeah, it is called scattering, something GPUs suck at, as opposed to gathering (texture look-ups). There are some ways to achieve some fast limited scattering, though.

Share this post


Link to post
Share on other sites
Quote:
Original post by wolf
<<<
tetrahedral shadowmapping?
<<<
I would think the same problem is true here? We need to do the projection in the vertex shader and therefore the level of tesselation is responsible for the quality of the projection ....
You might even project a point light into a 2D texture .... but same problem applys here.

- Wolf


Tetrahedral shadow mapping should work decently enough, and be able to use fully linear projections. However, a good chunk of your textures will end up being unused though, plus you'll have to use a wide FOV meaning you'll have to utilize even higher resolution textures to maintain good shadow quality.

Quote:
Original post by Jason Z
Thank you for all the feedback! I hope the article will help spread the use of paraboloid mapping, which seems to be under-realized right now for some reason. If there is anything that you guys think could make it better just let me know!


The stupidly high tesselation required to get even semi-decent results is a pretty good reason in my book [grin]

Quote:
I think it would be great to add a section on Dual-Paraboloid Shadow maps ... this is the most obvious case you want to use the dual-paraboloid projection.

The reason why DP shadow maps are not much used in games is, that you do not want to increase the tesselation too much, because it affects the overall performance and then you might also consider shadow volumes a better solution.


Keep in mind that it'll also lower the texel density at the same time, resulting in a lot more shadow map aliasing which is not a good thing.

Share this post


Link to post
Share on other sites
Quote:
Keep in mind that it'll also lower the texel density at the same time, resulting in a lot more shadow map aliasing which is not a good thing.
That is not really a killer if the light source and associated shadows are relatively far from the camera though.

Dual Paraboloid mapping does have its uses. In particular, environment mapping is a good candidate and it really doesn't take all that much tessellation to get good results. Shadow mapping may not be the best case, but it is still useable as well.

In any case, it is good to experiment with the mapping to better understand it and what it can do. Do you think there is anything that could be added to the paper to make it a better description of the mapping itself?

Share this post


Link to post
Share on other sites
We recently implemented DPSM here. Something to consider (that I don't think is mentioned anywhere else) is that you only need to have well tesselated casters. You can have extremely low poly receivers, as long as you modify the implementation slightly from what was originally published. I keep waiting for someone else to realize this and say it, but I guess I'll just say it. If you do the shadow map lookup (during the lighting pass) in the pixel shader, rather than the vertex shader, the non-linear transformation happens after rasterization, and you avoid all the problems.

Of course, if you're doing fully general shadows, this might not help much, but if your casters and receivers tend to be different geometry (eg, characters and world geometry), this can make the technique much more feasible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this