Home » Community » Forums » Graphics Programming and Theory » Stencil Shadow Volumes with round surfaces
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

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
Post New Topic  Post Reply 
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]

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:

But they look bad, because the selfshadows have borders which are along the edges of the triangles and don't look smooth.


I don't really see what you mean. Do you have a screenshot ?

 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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...

 User Rating: 1015    Report this Post to a Moderator | Link

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

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

You can.. lessen... this problem, by adjusting your shadow volume. Extrude the shadow volumes near the surface too, by a little offset..

Y.


 User Rating: 1731   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

quote:

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....


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.


 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:

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.


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:

I can't use shadow maps, because they work only on a few modern 3d accellerators.


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.


 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: