|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| Stencil Shadow Volumes with round surfaces |
|
![]() Roland Member since: 5/23/2001 From: Cologne, Germany |
||||
|
|
||||
| I'm trying to use stencil shadow volumes on objects with round surfaces(Chess Pieces). But they look bad, because the selfshadows have borders which are along the edges of the triangles and don't look smooth. Since tesselating the objects enough to solve this problem would slow down the program too much, I would like to know if ther is an other solution to this problem? Thank you, Roland [edited by - Roland on January 16, 2003 6:17:02 AM] |
||||
|
||||
![]() Yann L Moderator Member since: 2/6/2002 From: Breizh |
||||
|
|
||||
quote: I don't really see what you mean. Do you have a screenshot ? |
||||
|
||||
![]() Bender77 Member since: 1/17/2003 From: Lyon, France |
||||
|
|
||||
| As I know you can't get rid of this problem with shadow volume (or the method is to be discovered). Personnaly, for something like a chessboard I'd rather use shadow maps : smoother shadows (including self shadowing) because chess pieces is something quite small (don't need a very high res shadow map) and their count on a chessboard is relatively small, shadow map fits well. PS: Of course, I would rather shadow them one at a time than the whole chessboard in one pass |
||||
|
||||
![]() Roland Member since: 5/23/2001 From: Cologne, Germany |
||||
|
|
||||
| I used shadow maps first. But there are several problems. On the one hand the quality is not good, too. You don't get smooth borders. On the other hand it is only supported by quite modern Geforce cards as far as I know. I dont understand what you want to say, with shadowing them one by one. I'll try to upload a picture soon. |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| Yes... this problem also occurs in doom3... you can see the shadows messing up on the guys face (closeup when at the begining of the first level). this is caused by the interpolation of the vertex normals making the lighing act on the polygon as if it were round while the shadow volume acts on it as if it were a normal polygon... There is no easy solution other than higher teselation of the mesh or to not use self shadowing... |
||||
|
||||
![]() Roland Member since: 5/23/2001 From: Cologne, Germany |
||||
|
|
||||
| Doom 3 has it, too? Perhaps its not that bad after all ;-) OK, you say there is no other solution than tesselating the mechs, but would you recommend an other shadowing algorithm for chess pieces, too? As I said, I uploaded a picture at http://www.mynetcologne.de/~nc-ruitergu/Bilder/Figur.jpg, though it seems there is no real solution to this problem. Thank you all, Roland |
||||
|
||||
![]() MisterOreo Member since: 1/11/2003 |
||||
|
|
||||
| The wonders of projected textures comes to the rescue here... All you need to do is pop open photoshop, create a black and white (with smoothly greyed edges) silhouette of your pieces, and you can use texture projection to cast shadows..... NVidia developers page has a GREAT article about projected textures, they're pretty easy to implement.... I created a thread here about the matrix math involved with them, I recommend you check it out ("Matrix Question" I believe it's called)... Shadow maps are a good solution for scenes with robust, static geometry. Projected textures are a good solution for scenes with detailed, static geometry.. and for scenes with a lot of fast moving, detailed geometry, well... stencil shadows are about as good as it gets.... -Mr.Oreo |
||||
|
||||
![]() Ysaneya GDNet+ Member since: 1/7/2000 From: Brussels, Belgium |
||||
|
|
||||
| You can.. lessen... this problem, by adjusting your shadow volume. Extrude the shadow volumes near the surface too, by a little offset.. Y. |
||||
|
||||
![]() Yann L Moderator Member since: 2/6/2002 From: Breizh |
||||
|
|
||||
quote: Shadowmaps are independent of the robustness of the geometry, they are an imagespace method. Actually shadowmaps are by far the best choice for highly detailed geometry, especially moving one. They take over, where stencil shadows can't be used anymore. But they are not supported on all hardware. |
||||
|
||||
![]() Roland Member since: 5/23/2001 From: Cologne, Germany |
||||
|
|
||||
| If I understand projective shadows correct, they can't be used for self-shadownig. Furthermore I would need to redraw all objects on which shadows should be projected for every object that throws shadows. I can't use shadow maps, because they work only on a few modern 3d accellerators. |
||||
|
||||
![]() Yann L Moderator Member since: 2/6/2002 From: Breizh |
||||
|
|
||||
quote: Basically correct. Prjective shadows do not contain information about the shadow boundaries themselves (as eg. shadowmaps and stencil shadows do). That means that self shadowing is very hard to achieve, and lots of updating is needed every frame. quote: Hmm, GeForce3, 4, (fx), the new Radeons. It can be somewhat simulated on GF2 and below, with lower accuracy. If that's no option for you, then you're pretty much stuck with stencil shadows, I guess. |
||||
|
||||
![]() Roland Member since: 5/23/2001 From: Cologne, Germany |
||||
|
|
||||
| I think it should be available on older Radeons, too. So I guess I can't use shadow maps. I'll have to accept the problems with stencil shadow volumes. Perhaps its possible to find a better tessellation of the mechs. I'll experiment a bit. I thank you all very much for your help. Roland |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|