Welcome, Guest. Please login or register.

Pages: [1]
Print
Author Topic: Discussion - shadows  (Read 3115 times)
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« on: March 11, 2009, 02:54:05 AM »

The use of binary alpha shadows was mentioned in the wiki.

I think there's no reason with modern computing power to limit ourselves that way.

Besides the hard-edged shadows tend to look like high noon in some equatorial place.

Most likely the shadows of a nuclear winter scandinavia will tend to be more defused.  Also glitches are less likely to be noticeable when shadows fall across non flat objects.

Here's basically what i think we should do:
(not endorsing any particular angle)



* shadows.jpg (27.28 KB, 117x91 - viewed 318 times.)
« Last Edit: November 11, 2009, 09:55:04 PM by Gaspard » Logged
Lamoot
Community member

Posts: 161


View Profile
« Reply #1 on: March 12, 2009, 09:48:01 PM »

They shouldn't exactly be called shadows. More like "masks" to tell the engine to apply a specific effect on that part of the ground tiles. By using regular alpha-ed images for shadows, the effect would be cumulative, with many shadows overlapping you get darker an darker shadows. The masks on the other hand don't add to the effect, they simply join together to form larger masks.

These two examples show this nicely (you'll need to copy paste the links into the address bar):

http://www.talvisota.net/screens/screen_0002.jpg

http://www.talvisota.net/screens/screen_0003.jpg

Some trees stand alone, some are grouped together. The shadow "thickness" does not increase when the shadows of multiple trees overlap.

There are no problems in using 8-bit alpha, but 2-bit approach has been done before so I went for a safe proposal approach. If 8-bit alphas can be combined in the same way with not too big impact to the rendering speed, I'm all for it.
Logged
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #2 on: March 12, 2009, 11:23:31 PM »

They shouldn't exactly be called shadows. More like "masks" to tell the engine to apply a specific effect on that part of the ground tiles. By using regular alpha-ed images for shadows, the effect would be cumulative, with many shadows overlapping you get darker an darker shadows. The masks on the other hand don't add to the effect, they simply join together to form larger masks.

Good point, i hadn't thought of the cumulative effect.  Though i'm not sure that a cumulative effect would be bad... it depends on exactly how it was implemented.


There are no problems in using 8-bit alpha, but 2-bit approach has been done before so I went for a safe proposal approach. If 8-bit alphas can be combined in the same way with not too big impact to the rendering speed, I'm all for it.

For static objects i think it would be pretty straight-forward.  I can't immediately wrap my mind around how to do multiple moving object shadow-masks in a non-cumulative way... but that goes for 2-bit and 8-bit.
Logged
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #3 on: March 13, 2009, 12:00:58 AM »

These details are probably premature now anyway.

Depending on what gameplay and mechanics we want to introduce, tile-base shadows/lighting might be the better way to go:

http://basiliskgames.com/images/eb2_screen6.png

This kind of approach is not as pretty in screenshots, but it is easier to make it dynamic, i.e. the PC carrying a torch (or other dynamic lights) can much more easily provide sensible moving illumination to the world.

If we wanted shadow-oriented skills like sneaking, this approach is also preferred since it is much more clear where exactly the light/shadow is.

You can try the demo or watch a video here, if you haven't see dynamic tile-based shadows in action before...

Since we're going old-school anyway i'd tend to go for the option that's not as pretty, but offers richer/deeper gameplay.

« Last Edit: March 13, 2009, 01:04:58 AM by eleazzaar » Logged
Pages: [1]
Print
Jump to: