Shadows from terrain hills

Started by
15 comments, last by okonomiyaki 21 years, 8 months ago
quote:
Correct me if I''m wrong, but an ortho view is easily achieved with matrix translations

Once you setup an ortho projection matrix, you can simply slide around by translating the matrix, yes.

quote:
And then since I''m using directional, it should be even easier then the paper, no? Because they have to worry about the projection while I just can take the depth buffer as it is.

It''s slightly easier, esp. in the final rendering pass. You still need to reproject your depth texture back onto your scene, but the math is simpler, since there is no perspective projection involved. Same thing goes for the computation of the r coordinate. And there are no perspective alias problems, that''s a great advantage for the quality.
Advertisement
The paper that Yann was talking about (I think) can be found at:
http://www-sop.inria.fr/reves/publications/data/2002/SD02/PerspectiveShadowMaps.pdf

__________________________________________________________________________________
The wind shear alone from a pink golfball can take the head off a 90-pound midget from 300 yards.
-Six String Samurai




[edited by - Mordoch Bob on July 31, 2002 1:20:54 AM]
_________________________________________________________________________________The wind shear alone from a pink golfball can take the head off a 90-pound midget from 300 yards.-Six String Samurai
Thats a pretty good paper, thanks for that.

I''ve found another paper on my PC ( I have rather a few, I download them, read them, then forget I have them ), which is about projective shadows, you may want to take a look at that ( it''s an nvidia presentation, so it''ll be on the nvidia developers page )...

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
I found this article on GameDev. Try it, it''s good (I didn''t use the source code, only the idea...)

http://nervus.go.ro/common/fctsm.htm
Have FUN,FeeL E!
Yeah, I saw that article before, but I was thinking something along the lines of raycasting (I''m calling that a method along the lines of raycasting, but it''s not really) would be too slow for dynamic lighting, updated every frame. I''m having some troubles using the shadow mapping techniques though, I have to go back and learn exactly what a depth buffer is and how to capture it as an image. For now I may try that technique, and I suppose the sun moves really slowly, I guess I don''t have to update it every frame
Thanks for reminding me of that article..
Why does it have to be every frame? Why can''t you have an second buffer that you update slowly ( over many many many frames ), and then swap that one with the shadow map that you use for rendering... If you get what I mean...

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
Yes, that's what I'll end up doing for sure. My initial response was that the user might see the shadows quickly change when it switches to the updated one, but I guess I could do some kind of morphing to ease the transition between 2 shadow maps. The sun does move very slowly.

I implemented something earlier today that expanded on the concepts in that last article (not shadow mapping). It's a very crude form of shadow casting, and it's not very dynamic, but the sun doesn't move fast and it produced actually really decent results. The screenshot below shows what happened when I used the technique in the article filisoft showed (the green areas are the added areas of shading due to shadow casting. the dark areas are the fixed T&L pipeline shading). I may stick with this, it was so easy. I'll still learn shadow mapping for other uses though.
Sorry for the size of the image. This is a new computer and I don't have any imaging programs to resize it.



Edit: crappy jpeg...

Actually, I just thought of a way to make it much more dynamic. It's slow because it uses noise to produce the land. I could EASILY use lookup tables and it would take less than a second to recalculate the diffuse component of each vertex when you move a lighted object (that's how I darkened.. heh, the diffuse, it worked..... -_- ) but when there won't be very many vertices, so it shouldn't be slow.

[edited by - okonomiyaki on August 5, 2002 1:02:18 AM]

This topic is closed to new replies.

Advertisement