How to draw a static scene's shadow?

Started by
15 comments, last by bltiger 22 years ago
there is no simple code for calculating light maps... spend a couple of weeks researching ray tracing if you want to do a really good job of it.

Advertisement
A lot of console games do the vertex method. Off the top of my head I know FFX and Wild Arms 3 does it. I think it looks pretty decent actually, and it still gives room to be a little dynamic.
Given enough vertices, you don''t need a lightmap.

I can''t remember the name of the game that tried this at the moment, but I know it has been done. I think Hardware T&L is a must if you take this approach. This also frees up a texture stage to use for something else (such as a bump map or environment map).

I''m working on algorithms that actually slices polygons where shadows are cast, and changes the diffuse values of the vertices accordingly. This would theoretically be faster than calculating light maps, but it would have to be done before putting the data into video memory (due to the splitting of polygons).

This results in shadows that look like those from older games (like Doom and Duke Nukem 3D) that designers manually put in, but they would be automatic.

If this doesn''t work, I have considered rendering more polygons on top of the scene with alpha blending. It would be based on the same principles as my other idea, but instead of "cutting up" the geometry it would just add layers to it. I think this would look like a high-res light map with sharp edges.

For shadows cast by models, don''t rule out the use of a projection matrix to project the vertices onto a flat surface. However, this will double the count of triangles rendered for each model, and doesn''t work if you want an alpha-blended shadow.

I personally don''t like the look of (most) lightmaps. I don''t like blocky shadows with textels orthogonal to the axes. From a distance things look okay, but dramatic shadows seem to lose their effect when up close. But in many cases lightmaps are the best solution.

This is why I''m really looking forward to Doom 3. Especially teh fact that everything is treated the same (be it the world or the characters). Shadows being cast on the ground and moving across a creature just delights me to no end. Even better, the fact that the shadow can be moved.

Then again, John Carmack knows more about 3-D than I do, and he''s been doing it longer.

--TheMuuj
--TheMuuj
Thanks, I think I have to do it with raytracing....
quote:Original post by bltiger
Thanks, I think I have to do it with raytracing....


If you dare searching through a German page :-)

www.stefanzerbst.de
Tutorials (left side)
then "Lightmapping by Johannes Leimbach" (that''s me :-)
The tutorial is in German, but the source is in English
and _heavily_ commented.

Mail me if you have questions :
johannes.leimbach@gmx.de
Greetz !
That code is very heavily commented

will be putting some of those tuts through a translation site... hope they still make sense

Cheers m8

Gordon.
P|-|34R t|-|3 ||3//||3SS
Thanks,I have got the sample. I''m reading...

This topic is closed to new replies.

Advertisement