Archived

This topic is now archived and is closed to further replies.

adriano_usp

Questions about SHADOW VOLUME

Recommended Posts

Hello people, I''m using a false shadow (shadow mapping) in my scenes because my video card doesn''t support shadow volume. I have read the comments about stencil buffers in this forum and seemed easier to set shadow volume in Direct3D... so I''m thinking to buy a good card to use this resourse, but before I would like to get your opinions about the following questions: 1) What do think about shadow volume? Is it really the best way to make real time shadows now? 2) What was the first NVIDIA card to support shadow volume? 3) What FPS do you get on the DX SDK ShadowVolume Sample (or another equivalent application)? Please, what is your system hardware configuration? Sorry by my poor English, OK?! Thank you.

Share this post


Link to post
Share on other sites
answering 3)
my rig is athlon XP 1700+ with 9700P,it has about 300FPS on the SV demo in DX sdk with original window size,the fps drops as the window gets larger but gets back to ~300 since you can''t make the model continuly move.

Share this post


Link to post
Share on other sites
You might want to check the Graphics Algorithms forum. There is a lot of info on shadows over there.

As far as what shadow technique is the best, that all depends on your particular app. If you want to cast detailed shadows on arbitrary surfaces, then you basically have to pick between two types: shadow mapping or shadow volumes. Here is a small run down of each.

Shadow Mapping - Render the scene from the position of your light source(s). This will be rendered into a seperate render target (i.e. not the back buffer). Instead of writing out a color for a pixel, you write out it''s depth. Then you render your scene as you normally would from your camera. Except that when you go to render the scene, you calculate each pixel''s depth value and use that to compare against that same pixel''s depth value that you stored when you rendered from the light. That comparison tells you if the pixel is in shadow or not.

Shadow Volume - For each light source, you calculate the area where the shadow falls for each mesh in your scene. This will create new geometry every frame for every mesh in your scene. Then you render your scene normally, then render the new computed shadow geometry to represent the shadows of your meshes.

I know my explanation isn''t the best in the world. Neither one is really as hard as I make it out to be, and each technique has its limitations. As far as which one is best, again it depends on your app. Shadow Mapping is very pixel intensive. Shadow Volumes are vertex intensive. If your app doesn''t do much pixel processing, then Shadow Mapping may be a good choice. Then again, if your app doesn''t push the geometry rate of the hardware too much, then Shadow Volumes may be the way to go. Both ATI and NVIDIA have white papers on shadow mapping and shadow volumes. Those papers should give you everything you need to know to implement either technique.

I believe the first NVIDIA card to support shadow volumes was probably the GeForce 3.

As far as FPS on the ShadowVolume sample, I get about 125-130. I''m running on a Pentium 3 800Mhz, 512MB RAM, Radeon 9600 Pro, with Win XP Pro.

Share this post


Link to post
Share on other sites
It all depends on how much money you want to spend. If you want a good DX9 card without having to see a loan shark, there are two cards you should take a look at. One is the NVIDIA GeForce FX 5600 Ultra. The other is the ATI Radeon 9600 Pro. Both should sell for just under $200.00.

I also upgraded from a TNT2. I chose to go with the Radeon 9600 Pro because it renders a little faster when you enable things like anti-aliasing and ansiotropic filtering (don''t think that''s spelled right but oh well).

Also, when coding in DX9, the 9600 allows you to activate 4 render targets at the same time. Last time I checked, the 5600 only allowed you to activate 1. I don''t know if that was a hardware limitation or a driver problem but I had the chance to play with a 5600 Ultra back in May and found that I could only have one active render target and that the driver had disabled floating point textures because of a bug somewhere. I would imagine that NVIDIA has fixed the floating point texture issue by now but I was making this decision back in May so I went with the Radeon.

If the price is just too high, you can look at the GeForce FX 5200 Ultra. I think it''s the most inexpensive card out there that supports DX9. You should be able to find it for less than $150.

Share this post


Link to post
Share on other sites
Thank you again.

The problem with the price is that I live in Brazil and imported products are very very expensive here.

...but only to compare the performance: how many FPS did you get with the TNT2 and now with the ATI Radeon 9600 Pro?

Share this post


Link to post
Share on other sites
Sorry, but I don''t remember what kind of performance I got with the TNT2. Before I upgraded, I did all of my development work on my laptop, which has a GeForce2 Go.

I know international orders are more expensive. You might want to go to www.pricewatch.com and look under Video Cards. That site looks for the best price for a given part from a ton of different websites.

Another web site i buy stuff from is www.tigerdirect.com. I looked on there and they have a GeForce FX 5200 Ultra for $99. They also allow international orders. You can call them up and see how much it would be to send it to Brazil.

Good luck,
neneboricua

Share this post


Link to post
Share on other sites