Smooth 2.5D Area Light Shadows

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43
Contact:

Smooth 2.5D Area Light Shadows

Post by Oogst »

Question: Does something like this already exists?

I have come up with a new technique to render area light shadows: Smooth 2.5D Area Light Shadows. I am wondering whether what I came up with is really new, so I hope you guys can tell me whether something similar already exists. Here's a video of what I implemented so far:

[youtube]F_MeY5iBnLc[/youtube]

I have built a little prototype of my technique, but it is far from finished yet. Let me first explain what area light shadows are, since I guess not everyone knows that:

Image

Area light shadows are currently never used in games, because techniques to render them are incredibly slow, so they don't really work for real-time graphics.

The technique I came up with, is not a general solution: it only works for games that are viewed from the top, like Diablo and Torchlight. That is why I call it Smooth 2.5D Area Light Shadows. It is, however, very fast to render, so I think this technique would really be a big addition to these kinds of games.

Here are some results of my work:

Image

The most important thing that is missing right now is working correctly with height. I have a simple solution for that, but I have not implemented that yet. This image shows what I mean:

Image

So, how does my technique actually work? The basic idea is to render shadows to a render-texture from a top-down perspective. So the shadows are kind of similar to a height map:

Image

This means that the main downside of my technique is that there cannot be several layers of shadow above each other:

Image

I hope this explanation of how this technique works is clear enough. Feel free to ask any questions, and obviously I am looking forward to suggestions for improvements! :)

Anyway, right now my main question is whether this really is something new. Because if it is, then I am going to put a lot of work into the prototype and hope to present it at GDC Europe, so it would be great to know about that beforehand.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
User avatar
aguru
Goblin
Posts: 236
Joined: Tue Feb 26, 2008 5:48 pm
x 3

Re: Smooth 2.5D Area Light Shadows

Post by aguru »

Interesting. But what about more complex shapes, e.g. a pyramid?
User avatar
CoreDumped
Gremlin
Posts: 177
Joined: Sun Aug 05, 2007 3:55 pm
x 14

Re: Smooth 2.5D Area Light Shadows

Post by CoreDumped »

Nice. How far do these shadows go? What happens when they hit a wall?
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43
Contact:

Re: Smooth 2.5D Area Light Shadows

Post by Oogst »

aguru wrote:Interesting. But what about more complex shapes, e.g. a pyramid?
Right now I only support vertical planes, but I intend to support freely rotated boxes and cylinders. If the pyramid is on the ground, then the top half of a diagonal box would represent that well enough.
CoreDumped wrote:Nice. How far do these shadows go? What happens when they hit a wall?
Shadow receivers can be any shape, so walls are totally okay, as are animated characters. I have not implemented height yet, though, so in the current version the shadow would go up the wall infinitely and not stop at the correct height.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Re: Smooth 2.5D Area Light Shadows

Post by tuan kuranes »

Nearest technique I know of (seen in terrain renderer):
-> Render terrain + Object casting shadow from above as a heightmap (using a RTT)
-> using resulting RTT heightmap in order to do some "heightfield self shadowing" (=> see below for a list)
-> then render terrain + object using resulting shadow map

heightfield self shadowing techniques:
hronet
Gnoblar
Posts: 1
Joined: Tue Mar 29, 2011 10:31 am

Re: Smooth 2.5D Area Light Shadows

Post by hronet »

Looks somewhat related to Eric Haines shadows using plateaus as well

http://erich.realtimerendering.com/plateaus.pdf
Sgw32
Greenskin
Posts: 100
Joined: Mon Aug 30, 2010 9:35 am
x 11

Re: Smooth 2.5D Area Light Shadows

Post by Sgw32 »

Do you plan to release your leghting in to public? :)
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43
Contact:

Re: Smooth 2.5D Area Light Shadows

Post by Oogst »

hronet wrote:Looks somewhat related to Eric Haines shadows using plateaus as well

http://erich.realtimerendering.com/plateaus.pdf
I took a quick look at this one, and it seems my algorithm is a greatly improved version of what he is doing. The basic idea is the same, but he cannot handle shadow volume height and arbitrary retriever meshes. Very interesting link!
tuan kuranes wrote:Nearest technique I know of (seen in terrain renderer):
-> Render terrain + Object casting shadow from above as a heightmap (using a RTT)
-> using resulting RTT heightmap in order to do some "heightfield self shadowing" (=> see below for a list)
-> then render terrain + object using resulting shadow map

heightfield self shadowing techniques:
Interesting, I am going to check these to see how many useful concepts I can grab from them. :)
Sgw32 wrote:Do you plan to release your leghting in to public? :)
Sure, it's not that much code anyway. When I have more, I'll release the demo and source. But I think anyone who seriously wants to use it, would make his own implementation in the end. The technique is more interesting than the implementation.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Sgw32
Greenskin
Posts: 100
Joined: Mon Aug 30, 2010 9:35 am
x 11

Re: Smooth 2.5D Area Light Shadows

Post by Sgw32 »

It's very interesting. What's is the perfomance of it?
it only works for games that are viewed from the top, like Diablo and Torchlight.
Does it work fast on them? Why we can't use it in other type of games, for example, shooters? :)
Post Reply