i need a favor re: imperfect shadow maps

Started by
11 comments, last by Lightness1024 11 years, 6 months ago
imperfect shadow map reference:

http://www.mpi-inf.mpg.de/resources/ImperfectShadowMaps/
http://levelofdetail.wordpress.com/2008/12/19/imperfect-shadow-maps/

point-based GI code sample:
http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter14.html

i want GI and radiosity done cheaply in real-time. accuracy is not crucial, but look and function are. imperfect shadow maps seem an ideal solution, but i've never seen in practice in a real-world context.

that brings me to the favor i have to ask: does anyone have a modest game up and running they could transplant some of that sample code into? i'd love to see this stuff up and working in a game i could actually play, or at least watch. it'd be a hugely appreciated effort.
Advertisement
I'm in the process of making a point based GI/lighting technique.

It's pretty similar to this:
http://graphics.pixar.com/library/PointBasedGlobalIlluminationForMovieProduction/Slides.pdf

Which I guess is pretty similar to the NVidia doc you linked.

Mine works instead with a constant buffer filled with the most relevant vertices to whatever is being rendered.

Instead of turning models into disks, I just work with vertices.

Mine is all a vertex shader, so it's vertex lighting only. As a plus though, I can free up the pixel shader for other effects.

You could make some fairly dense vertex models to get better lighting.

I'll probably share my shader when I'm done with it, I think it still needs some polish.
Something I just thought about. My vertex shader is primarily for doing GI/Shadows. Direct diffuse light could be done in the pixel shader mixed with the vertex shading. So normal maps could still be used.
Ruled out light propagation volumes? That's shipped in games and so long as you have sufficient voxel resolution you can get pretty nice results.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.
not ruled it out so much as i've never seen convincing results. and i don't know much about the technique. but what games use it besides crysis 2 and a handful of upcoming ce3 games? even crysis 3's indirect lighting is remarkably flat, but i imagine their tradeoffs are steep.

if i experiment with the sdk can i hope to see results like what i posted?
looks like LPVs are an optimized variant of point-based/fuzzy GI? i was convinced they were doing general light transfer without considering the shadow problem, but i guess that's kind of impossible given if you have enough bounces in any solution you're gonna get some indirect shadow, right? though that might depend on how you handle your ambient light.

i don't yet have enough programming experience in this area to properly make sense of these techniques. i mean, i realize crytek is dealing with vast geometry and effect overhead, so whatever the effect its use is gonna be limited in their games, but it seems i was pretty mistaken about their methods.

^edited this a bunch. sorry if it's a mess for anyone reading.

imperfect shadow map reference:

Notice the severe Peter Panning effect at 3 minutes. The result is that it looks as if the ring is flying above the table, never touching it.

Edit: The paper actually states that "While ISMs may contain incorrect depth values, the resulting errors in the indirect illumination are
small but the computational gains...". Inaccurate depth values leads to the requirements of high depth test delta, which leads to Peter Panning. But I suppose the purpose is to use this for indirect illumination, which is indeed what is stated, in which case it may be ok? There are some cases that have to be avoided, like thin geometry.
[size=2]Current project: Ephenation.
[size=2]Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/
from what i can tell the ring isn't touching that surface at all, which is not merely an illusion of the reduced shadow accuracy since it looks like they're using direct and indirect shadow maps there. i mean, you can see a mild peter pan effect during the camel's run, for example, but that's acceptable as far as i'm concerned.
edit: quote edit goof
Whoops, forgot to get back to you! LPVs aren't *quite* the same thing as point-cloud GI. You're basically chopping up the world into a voxel grid and figuring out how much light is flowing through each voxel; you inject some source light via reflective shadow maps or just plain point emitters (as I understand it, this was experimented with in Crysis, though I guess it was dropped. Apparently Crytek don't know how do do specular with it or something?) and then diffuse everything out across the volume.

In practice, you can get pretty fantastic results, though there are still a few areas that can stand to be improved over what shipped in Crysis/possibly the video. The big one, like you point out, is the lack of specular highlights-- this isn't so much a shortcoming of the technique inasmuch as Crytek never seem to have put the effort into doing it. While the idea had been around since around the turn of the millennium, you can project BRDFs into the spherical harmonic basis and use that to compute reflectance by convolving it with the sampled LPV result. Halo 3/Reach actually do something fairly similar, though they actually sample the lightmap at a character's feet-- things are also a little smoothed over since you're using the same lighting data for the whole model.

The other issue is that light can bleed around corners somewhat, since you can't actually linearly blend between SH samples! The Dangerous Curves breakdown by the ATI demo team goes into detail on this, but you actually need to use irradiance gradients for proper blending.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

This topic is closed to new replies.

Advertisement