How to get EXP Shadows and Terra to work?

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
Nickak2003
Gremlin
Posts: 194
Joined: Thu Jun 10, 2004 4:19 am
x 11
Contact:

How to get EXP Shadows and Terra to work?

Post by Nickak2003 »

I would like to try out EXP shadows on terra, but I cant seem to figure it out. If I merely enable EXP, disable backfaces, it gets all weird and wrong. I know that terra has its own shadow node thing and I did notice that there are some blurs being done in there, but I don't know where to begin.

When I say it doesn't work, I mean with shadow-casting items. Sometimes their shadows are inverted or otherwise wrong, and if I approach an object it darkens. There also seems to be other problems.

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4511
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 943
Contact:

Re: How to get EXP Shadows and Terra to work?

Post by dark_sylinc »

Exponential shadows and outdoors aren't a good fit.

However sometimes it works well. Assuming this is the case:

The exact problem is caused by Terra not casting regular shadows; which works fine with most solutions like PCF, but it doesn't with exponential shadow maps dislike large depth discontinuities (which are caused by having no 'floor' in the shadow map)

To workaround the problems you're having, you could try drawing a very large plane (or multiples ones if you have lots of mountains) below the terrain, casting shadows but invisible to screen (use visibility masks or render queues to have it only cast shadows without being on screen).

That should solve the exponential shadow map issues; but I can't guarantee exp. shadow maps will look good on exteriors. YMMV.

Cheers
Matias

Post Reply