Shadow-Volumes

Started by
4 comments, last by kudi 23 years, 6 months ago
Hello, I would like to implement shadow volumes (with stencil buffer) in my engine, but I dont understand how to create the shadow volume of the objects. I have an object in a vertex buffer and the shadow of this object should appear on my terrain (also a vertex buffer). If my object has 1000 vertices, do I have to make a shadow volume with 2*1000 vertices (1000 for the top, and 1000 for the bottom of the volume)? I think that use much calculating time if I make this for every object. I think there has to be another way to make volumes. Can anybody help me?
The problem of Object Oriented Programming:Everybody tells you how to use his classes, but nobody how not to do it !
Advertisement
Perhaps I found out how to do this. I think I should try to make a polygon "around" the object, but how can I make this polygon?
The problem of Object Oriented Programming:Everybody tells you how to use his classes, but nobody how not to do it !
goto the nvidia developer site theres a couple of programs that use dhadow volumes one use IIRC quake2 models they come with code (opengl btw but u should be able to understand the ideas) warning the code is written by mark kilguard whose not exactly known for writing the clearest code around
Thanks zedzeek, but I still can''t find anything good for me (perhaps I havent found the right file). Actually I understand the idea of shadow volumes, but I don''t know how to create the "sillhouette" of the objects.
The problem of Object Oriented Programming:Everybody tells you how to use his classes, but nobody how not to do it !
I really need some help to make shadow volumes. After I have projected my object in the direction of the light I should make the "silhouette" of the object. But I dont know how to do do this, perhaps with a special algorithm?
The problem of Object Oriented Programming:Everybody tells you how to use his classes, but nobody how not to do it !
I implemented shadow volumes once, and it worked fine, but I decided to to something else for shadows b/c of poor hardware support of the stencil buff. But anyway, you only want to "extend" edges that form the silhouette of your model. Check out this article; It explains how to quickly find these edges.

This topic is closed to new replies.

Advertisement