2 World Shadows [Canopy Shadows]

Started by
30 comments, last by Guoshima 18 years ago
hmm it seams that I already used a technique like this. The only problem is that each object which will be influenced by the tree shadow needs to have the shadow texture. If a lot of trees are close to each other, the object might even need a few tree shadow textures, which can become rather expensive to compute. That's why I tried to create regions for the shadows (50m by 50m), instead of a shadowmap for a single tree. Like this I only have to sample one shadow map, and don't have a problem with shadow overlapping or anything. I think FarCry is doing something like this, if you take a look at this screenshot.

I can even precompute the shadows for a certain region, and perhaps store them for later use. The problems for the regions is of course, that I can't share any textures, and I presume, if you use a single texture for each tree, then you can easily reuse that texture.

With the moving of the texture, you only have to compute a little uv offset when sampling the texture right? And do you use default depth maps, or shadow color maps put on top of an object?

Regards,
Kenzo

[Edited by - Guoshima on April 19, 2006 4:41:10 AM]
Advertisement
AFAIK cry engine3 also uses those 'canopy shadows'

regards,
m4gnus
"There are 10 types of people in the world... those who understand binary and those who don't."
I presume I can only use those canopy shadows only for trees and foliage and stuff like that, and not for my buildings. So during my shading, I need to take the contributed shadow from the canopy shadow map and a normal shadow map (LiSPSM or whatever), and then beldn those 2. Correct ?

As for CryEngine 3, I would say they use a canopy shadow containing a simple alpha color, which is blurred then. Is it possible to have self shadowing with this, or simply don't use the canopy texture on the leaves but only on the branches ? (the problem with self shadowing and storing color values is that you can't use a little offset or anything anymore, so after projection it will always self shadow .. or am I thinking wrong here ?)

Regards,
Kenzo
you cannot have selfshadowing with canopy shadows, so you're thinking right.

regards,
m4gnus

[Edited by - m4gnus on April 19, 2006 8:04:42 AM]
"There are 10 types of people in the world... those who understand binary and those who don't."
Does anyone know the shadowing system True Crime: New York City uses? It has no self shadowing, it looks like this (soft, faded) and it is dynamic. The shadows are only visible from a close distance, beyond they fade out.
Quote:Original post by Brian Lawson
But what if you could have real shadows?? :)

Alan Wake looks like it doesn't use canopy shadows/projected textures for the tree shadows.

The shadows look accurate to the direction of the light and the trees don't look like speedtree generated ones.

If you watch the video it gives a better impression of the accurate dynamic shadows on pretty much everything [smile]
Richard 'ViLiO' Thomasv.net | Twitter | YouTube
Quote:Original post by Guoshima
If a lot of trees are close to each other, the object might even need a few tree shadow textures, which can become rather expensive to compute. That's why I tried to create regions for the shadows (50m by 50m), instead of a shadowmap for a single tree.

I think that's the way to go, indeed. They mention something about Canopy Shadows for forests in the link I gave you in my first post, and it seems they do the same thing.

Quote:With the moving of the texture, you only have to compute a little uv offset when sampling the texture right? And do you use default depth maps, or shadow color maps put on top of an object?
Yes, or you could translate your frustum you use for projective texturing, whatever goes easier or faster in your engine.

Quote:So during my shading, I need to take the contributed shadow from the canopy shadow map and a normal shadow map (LiSPSM or whatever), and then beldn those 2. Correct ?

Exactly. I guess, the hardest part will be to make sure the shadow-colors are the same so they blend right and you can't see the "borders" of your Canopy-map through the shadows in the environment...

Quote:Is it possible to have self shadowing with this, or simply don't use the canopy texture on the leaves but only on the branches ?

Do you mean, can the tree cast "shadows" on itself? Sure, just make sure you render the tree aswell in your projective-texturing-pass. Wheter you want shadows on your leaves aswell, I guess that's a question of testing out how it looks. It's certainly possible, but I think shadows on the tree alone will be more then enough to give the illusion and the projected shadows on the leaves *may* look strange.

Kenzo, how small can this world possibly be :)
Quote:
Do you mean, can the tree cast "shadows" on itself? Sure, just make sure you render the tree aswell in your projective-texturing-pass. Wheter you want shadows on your leaves aswell, I guess that's a question of testing out how it looks. It's certainly possible, but I think shadows on the tree alone will be more then enough to give the illusion and the projected shadows on the leaves *may* look strange.


if you want correct self-shadowing with canopy shadows you'd need to cull all parts/leaves/whatever of the tree that cast shadows. Accomplishing that should be pretty hard and a common solution that problem is shadow mapping. So Selfshadowing with canopy shadows is hardly possible.

regards,
m4gnus
"There are 10 types of people in the world... those who understand binary and those who don't."
well an easy solution to this, is storing a shadow color in red channel and depth into blue channel for example. Then you can use same texture as projected and shadow map. Don't know if it will be interesting though, but I am playing with these things right now ..

Regards,
Kenzo
Quote:Original post by ViLiO
Quote:Original post by Brian Lawson
But what if you could have real shadows?? :)

Alan Wake looks like it doesn't use canopy shadows/projected textures for the tree shadows.

The shadows look accurate to the direction of the light and the trees don't look like speedtree generated ones.

If you watch the video it gives a better impression of the accurate dynamic shadows on pretty much everything [smile]


Oh, I know! I was simply asking a leading question... :) It's definitely do-able, even at highly interactive frame rates. It really just comes down to a data organization problem and an order of operations problem.

However, the topic/question at hand is a great middle of the road compromise if you don't need fully dynamic true to life shadowing (including self-shadowing).

Alan Wake looks very impressive.

Quote:...of the accurate dynamic shadows on pretty much everything [smile]


And I can think of another game coming out somewhat soon that is doing the same thing... [smile]

This topic is closed to new replies.

Advertisement