D3D shadows & reflections
D3D question: I am implementing shadows and reflections in my engine, and it is no problem for simple static objects, I use light maps, or some alpha blending. But I''m having trouble doing these things for animated objects like characters, especially reflections.
So the question is, how do they do the reflections in this example (typical NBA Live screenshot)?
http://www.sports-gaming.com/cgi/view2.cgi?NBA%20Live%202000%20(PC)&/basketball/nba_live_2000/2&5&16
Hopefully the answer is something other than rerender every character from below and blend the results into the scene.
If that''s what EA is doing there, then I must say I am impressed.
Has anyone done this before? What do you guys think?
P.S. My characters are single meshes around 300 faces, in case that matters.
Hi !!
Well, this is one method of doing that, but with a lot of characters you may become problems with the Z-Buffer due to intersections and stuff like that.
But there is another great way of doing reflections. basically you just render the scene to a texture, and this texture is then used for the final frame image. So, you would mirror the camera on the ground plane, then you would render the scene to a texture, then you set the camera back and set the render target back to the back buffer. Then you use the texture you just rendered for the ground (using multitexturing with the base texture, so that typically basketballgorund). Voila, a great mirrored scene. Another great thing about that is, that you can change the detail of the shadow by simply setting the size of the "mirror-texture". This brings some great effects on slower system and amazing and very sharp effects on High-End PCs.
There was an article at gamasutra (www.gamasutra.com) "Rendering to a texture", which describes the technique I described here and comes with source, too !!
Hope that helped a bit.
Good Luck,
Phillip
Well, this is one method of doing that, but with a lot of characters you may become problems with the Z-Buffer due to intersections and stuff like that.
But there is another great way of doing reflections. basically you just render the scene to a texture, and this texture is then used for the final frame image. So, you would mirror the camera on the ground plane, then you would render the scene to a texture, then you set the camera back and set the render target back to the back buffer. Then you use the texture you just rendered for the ground (using multitexturing with the base texture, so that typically basketballgorund). Voila, a great mirrored scene. Another great thing about that is, that you can change the detail of the shadow by simply setting the size of the "mirror-texture". This brings some great effects on slower system and amazing and very sharp effects on High-End PCs.
There was an article at gamasutra (www.gamasutra.com) "Rendering to a texture", which describes the technique I described here and comes with source, too !!
Hope that helped a bit.
Good Luck,
Phillip
Phillip Schuster
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement