Jump to content
  • Advertisement
Sign in to follow this  
ThiEF_Jr

shadow volumes of skinning mesh. How to do in shader

This topic is 4769 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All I have read article about how to do shadow volume extraction in the shader http://www.gamedev.net/columns/hardcore/cgshadow/ and see examples in DirectX SDK 9.0C , it's so cool !! But i have some problem. How i do shadow volume of skining mesh in shader? I cant use shadowmap for cast shadow because i am writing indoor game with many omni directional lights (point light). Shadowmap require 6 times for render depth-map on each face of cube texture. it so expensive (thought). thanks you! ^__^

Share this post


Link to post
Share on other sites
Advertisement
Just create the silhouette from the transformed vertices. It should work pretty much the same as a static mesh really.

Share this post


Link to post
Share on other sites
Thx for reply ^^.

"create the silhouette from the transformed vertices", i can do it in CPU, but in GPU(shader), i dont know how to do it.

silhouette detection requires face normal.

face normal requires vertex neighbor information.

But ,in vertex shader, i cant know vertex neighbor position.


OR, i must transform skined vertices in CPU, and Do shadow volume extraction in shader. ?!?


Can i do alls (skinning and silhoette extracti) in shader ????


- - - - - - - - - - -


DOOM3 use skeletion for animate mesh, and shadow with shadow volumes.
Someone told me they do alls in shader.

How ??

Share this post


Link to post
Share on other sites
Doom 3 does all of their skinning and shadow extrusions on the CPU. Carmack has lamented about this several times in the past, saying that it makes Doom 3 much more CPU bound than he would like.

As for the GPU skinning, they crutch up around the fact that vertex shaders have no knowledge of neighboring verticies by effectively doubling hte amount of geomerty they are processing (building degenerate quads between triangle edges) and extruding back any vert who's normal faces away from the light. This results in a lot of wasted tris, though, and I'm still yet to be convinced that it works properly on meshes that have smoothed normals (rather than flat shading). I suppose one could simply store one smooth-shaded model without the extra triangles for rendering and a flat-shaded version with all the degenerate edges for the shadow volume, but at that point you're more than tripling the amount of polygons that you're storing for a single mesh! Hardly what I'd call effecient.

Overall shadow buffers are a much more GPU friendly algorithim.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!