Page 1 of 1

Terrain shadow technique

Posted: Tue Jul 19, 2011 2:53 am
by appel
I'm just curious, has anyone tried out my terrain shadowing technique?
http://www.bz2maps.com/phpBB/viewtopic.php?t=3026

It provides much deeper and realistic terrain look than the BZ2 engine does, at no cost. I think it's a shame that only myself have used it :ugeek:

Re: Terrain shadow technique

Posted: Tue Jul 19, 2011 3:07 am
by Zax
It looks like it makes things way too dark, and knowing how BZ2 loves itself some blotchy lighting..

Re: Terrain shadow technique

Posted: Tue Jul 19, 2011 3:10 am
by GSH
BZ2 was built with the idea of dynamic lights. There's console commands dating back to 1.0 that adjust the lighting angle. I wouldn't say that BZ2's dynamic lighting ever was polished up enough to be good, so we've got neither a good dynamic lighting, nor a good static (prebaked) lighting system.

-- GSH

Re: Terrain shadow technique

Posted: Tue Jul 19, 2011 6:41 am
by Red Devil
appel, if you would like to see what dynamic lighting/sun 'movement' controlled by the DLL looks like, load up G66 and turn it on in the 2nd options page.

Re: Terrain shadow technique

Posted: Tue Jul 19, 2011 1:32 pm
by appel
Red Devil wrote:appel, if you would like to see what dynamic lighting/sun 'movement' controlled by the DLL looks like, load up G66 and turn it on in the 2nd options page.
I think majority (90%+) of the maps have static lighting, which means the dynamic lighting is a waste of CPU/GPU cycles, as you can easily put the lighting into a texture.

Anyway, just an academic discussion I think.

Zax is right on maps becoming too dark. I experienced this difficulty initially when casting shadow onto my maps, but managed to thin out the blackness I believe. You can see the effect in my maps in the mega map pack #4 (e.g. Amino, Dedux, Giza), most noticeable if you turn off lighting.

This won't matter much in 1.3 however, the performance is far greater than in 1.2. But in 1.2 I noticed a considerable responsiveness drop in the framerate/mouse-input when I had lighting turned on, even on pretty good hardware.

Re: Terrain shadow technique

Posted: Tue Jul 19, 2011 2:57 pm
by TheJamsh
I like Appel's technique and I would use it myself on any map I made with static lighting, but I wouldn't filter quite as much of the shadows in as in that tutorial, and probably wouldn't use solid black as the colour either. Maybe the ambient map color with a bit of dark grey or something.

Re: Terrain shadow technique

Posted: Tue Jul 19, 2011 3:41 pm
by MrTwosheds
Similar effects can be created using the shellmap command and bz2's own lighting to create the shadows.
the bitmap created will certainly need some adjustment in photoshop or whatever you use, but you can get the shadows and terrain color detail that way.

Re: Terrain shadow technique

Posted: Fri Jul 22, 2011 1:03 pm
by Slaor
Bryce makes really pretty ray cast shadows too...

Re: Terrain shadow technique

Posted: Fri Jul 22, 2011 1:31 pm
by TheJamsh
Shame we can't cast such ray-based shadows on buildings and objects in realtime :P

I always hate rendering something in 3DS Max with shadows only for it to look nothing alike in-game...

Re: Terrain shadow technique

Posted: Fri Jul 22, 2011 3:10 pm
by Red Devil
the problem with using static lighting is that they look out of place/glow when the sun goes down. adjusting how dark the dynamic lighting gets when the sun is down solves that.

to see the effect, you can just set the time of of when the mission starts. none == off, 4 == 4 AM, 16 == 4 PM, etc.

edit: using dynamic lighting also allows you to fade the stars in and out, control the length of days/nights, weather, etc.

Re: Terrain shadow technique

Posted: Fri Jul 22, 2011 7:03 pm
by MrTwosheds
The art of it is to do the static lighting very subtly, without any really dark shadows at all or just a slight alteration in tone or colour, so that it gives the terrain a lit look when lighting is set to none, but if you turn on the dynamic lighting, its settings will be stronger than the map colouring. This of course all starts to get a bit tricky if you start adding dynamically lit terrain objects too.

Re: Terrain shadow technique

Posted: Sun Jul 24, 2011 5:49 am
by Zax
appel wrote: Zax is right on maps becoming too dark. I experienced this difficulty initially when casting shadow onto my maps, but managed to thin out the blackness I believe. You can see the effect in my maps in the mega map pack #4 (e.g. Amino, Dedux, Giza), most noticeable if you turn off lighting.
Hmm...have you tried working the shaft?