Shadow cast
Hope you guys had a great 4th July weekend!
I've implemented shadow cast based on texture projection, and virtual screens or PBuffers, but I'm not happy at all with the approach because is too expensive!
Any pointers on how to get good shadow cast would be great.
I don't mean to do shadow cast for all the objects in the scene only characters, vehicles, etc.
thanks
I've implemented shadow cast based on texture projection, and virtual screens or PBuffers, but I'm not happy at all with the approach because is too expensive!
Any pointers on how to get good shadow cast would be great.
I don't mean to do shadow cast for all the objects in the scene only characters, vehicles, etc.
thanks
could you post a screenshot?
Wow, I just implemented this yesterday and today!
So far, yes it's a hog. I've set up some additional clipping planes to clip anything outside of the light frustum because my algorithm requires drawing all of the geometry of the scene once per projected shadow
One optimization I thought of was to draw four shadows at a time with multitexturing, but then I have to get rid of the clipping planes.
Looking forward to hearing what other people have to say.
Tod.
So far, yes it's a hog. I've set up some additional clipping planes to clip anything outside of the light frustum because my algorithm requires drawing all of the geometry of the scene once per projected shadow

One optimization I thought of was to draw four shadows at a time with multitexturing, but then I have to get rid of the clipping planes.
Looking forward to hearing what other people have to say.
Tod.
Is too early, but as soon I have enough stuff working I'll post a demo!
seems like we were doing the exact same thing except that I did not play with multitexture.
One thing I did with the PBuffer is that I disable writting the RGB and kept alpha on, that may help performance.
One bad thing is that I have a PBuffer per shadow. Ouch that's gotta hurt!
One thing I did with the PBuffer is that I disable writting the RGB and kept alpha on, that may help performance.
One bad thing is that I have a PBuffer per shadow. Ouch that's gotta hurt!
PBuffer huh? I've have a hell of a time getting those to work. Would I be able to bother you about them later? I'm rendering all of my shadows to the back buffer before the frame and calling glCopyTexSubImage. I'd rather not have to do that. If you are feeling particularily helpful, would you mind looking at http://homepage.mac.com/tod_baudais/ in the downloads section there is a main.cpp file that has some very minimal PBuffer stuff that doesn't work and I'm not sure why. Any hints would be appreciated.
I'm thinking that I might also try squishing combining nearby objects into one texture and save a pass or a few. I dunno how it'll look, but it might speed up instances where a character is carrying something, etc.
I'm gonna try the disabling RBG thing.
Tod.
I'm thinking that I might also try squishing combining nearby objects into one texture and save a pass or a few. I dunno how it'll look, but it might speed up instances where a character is carrying something, etc.
I'm gonna try the disabling RBG thing.
Tod.
The code I have working is a modification of a sample code at the ADC site.
download at:
http://developer.apple.com/samplecode/Ca...hared.html
download at:
http://developer.apple.com/samplecode/Ca...hared.html
I just posted working pbuffer code to my site for anybody that is interested.
http://homepage.mac.com/tod_baudais/
main.cpp in the downloads section
Tod.
http://homepage.mac.com/tod_baudais/
main.cpp in the downloads section
Tod.
im working too on some shadow things
i found all these links:
http://www.paulsprojects.net/tutorials/smt/smt.html
http://www.opengl.org/resources/code/ren...index.html
http://www.r3.nu/~cass/shadowsandstuff/
http://www.opengl.org/resources/features...sld034.htm
http://developer.nvidia.com/attach/6832
http://www.ampoff.org/modules.php?name=F...412bb553cf
http://texel3d.free.fr/opengl/shadowvolu...volume.htm
http://www.3ddrome.com/articles/shadowvolumes.php
http://w3imagis.imag.fr/Membres/Franck.S...emple.html
http://www.paulsprojects.net/opengl/shad...owmap.html
i found all these links:
http://www.paulsprojects.net/tutorials/smt/smt.html
http://www.opengl.org/resources/code/ren...index.html
http://www.r3.nu/~cass/shadowsandstuff/
http://www.opengl.org/resources/features...sld034.htm
http://developer.nvidia.com/attach/6832
http://www.ampoff.org/modules.php?name=F...412bb553cf
http://texel3d.free.fr/opengl/shadowvolu...volume.htm
http://www.3ddrome.com/articles/shadowvolumes.php
http://w3imagis.imag.fr/Membres/Franck.S...emple.html
http://www.paulsprojects.net/opengl/shad...owmap.html
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| 2d shadow blending problems | tesil | 1 | 4,746 |
Mar 17, 2011 10:12 AM Last Post: Skorche |
|
| Replacing edges with degenerate quads (for shadow volumes) | Coyote | 9 | 6,460 |
Jan 15, 2010 07:08 PM Last Post: Coyote |
|
| Shadow Mapping - Self-Shadowing Z-Fighting Artifacts | Bachus | 16 | 16,938 |
Feb 11, 2009 12:24 PM Last Post: arekkusu |
|
| GPU shadow volume extrusion with GLSL | TomorrowPlusX | 12 | 10,868 |
Jan 24, 2007 03:21 PM Last Post: JoNo21 |
|
| Help! shadow map bug in NVIDIA! | dfmoore | 13 | 6,053 |
Nov 1, 2005 07:26 PM Last Post: OneSadCookie |
|

