Post news Report RSS Character shadows

The existing Overgrowth shadows worked well for static shadows and ambient occlusion, but didn't have the detail required for character shadows. To achieve high-quality character shadows, we needed a new hybrid system. Here's a picture of the new shadows in action!

Posted by on

The existing Overgrowth shadows worked well for static shadows and ambient occlusion, but didn't have the detail required for character shadows. To achieve high-quality character shadows, we needed a new hybrid system. Here's a picture of the new shadows in action!

Character shadow

Some might complain that this is a waste of time at this point, but I need shadows in order to test out the physics appropriately. Without detailed shadows, it's difficult to tell whether or not objects are in contact with the ground. With shadows, it's much easier. Here's an example -- if you look closely, you might be able to tell if this physics object is touching the ground or not.

Character shadow

I say this is a hybrid system because it works using decals. I've already explained how the decal projection works, so now we just have to make the decal look like a shadow! To do that, we first take a picture of the character from the perspective of the light, and project it onto the ground.

Character shadow

Next, we remove the white so that only the shadow is visible. Despite its simplicity, it is already looking pretty shadow-like.

Character shadow

However, it's still too dark to match the baked shadows, so we have to make it more transparent. The shadow's transparency should equal the brightness of the ambient light.

Character shadow

There's still one small problem -- some areas are getting shadowed twice! To fix this, we can subtract the baked shadows from the decal shadows. Here's the finished composite:

Character shadow

This has the side effect of fixing a common problem with this kind of system -- shadows going through walls. Surfaces on the other side of the wall are always in shadow, so the second projected shadow is removed.

Character shadow

I thought that combining character shadows with our baked lighting would be very complicated, but it actually turned out to be fairly straightforward. We sure dodged a bullet with that one!

Character shadow

Or is he dodging that forced pun?


There are still some tricky shadow problems left to solve, including casting baked shadows onto characters, and handling multiple dynamic shadows overlapping. However, nobody seemed to notice that they were never solved in big titles like Halo 3 and Gears of War 2, so I think we can save them for later! For now, I can just use them to test out the physics and animation contacts.
These pictures were all taken on Hale's Riverhurst level because it provided a lot of complex spaces to test out different shadow situations. If you guys could make more levels, it would help us test out new features and optimize the engine!


Track us on ModDB (visit our page)

Please join us here too:
Facebook icon ModDB icon Steam icon Twitter icon YouTube icon

Post comment Comments
AlekZanDer
AlekZanDer - - 2,695 comments

Cool.

Reply Good karma Bad karma+6 votes
P4TRICK
P4TRICK - - 526 comments

I must leave a comment for once..

this is a very awesome shadow system, i like how it works..

good job!

Reply Good karma Bad karma+7 votes
Martanz
Martanz - - 479 comments

Looks awsome! Keep it up!

Reply Good karma Bad karma+5 votes
feillyne Staff
feillyne - - 5,816 comments

Wow... :-) Shadows look perfect. ;-) Hopefully physics will get much better, too!

Reply Good karma+3 votes
Captain-Arse
Captain-Arse - - 467 comments

I belive this is only going to get better everytime there is a Dev-post.
Nahh that is it. I am so pre-ordering this.

Great work.

Reply Good karma Bad karma+5 votes
SinKing
SinKing - - 3,119 comments

that's smart! what about shadows from multiple light sources, e.g. four lights from corners of a room? Will they multiply where the shadows overlap, or do we get 4 times the same shadow?

Reply Good karma Bad karma+5 votes
SIGILL
SIGILL - - 1,157 comments

I was wondering the same.. good question (:

Reply Good karma Bad karma+4 votes
SneakySoft
SneakySoft - - 340 comments

I think baked shadows are used on the weapons in ut3, so there engine has the technology to the so, I think the characters where also included. Can you maybe show an example of the multiple dynamic shadows not working? Because I don't really understand what you mean by that.

Reply Good karma Bad karma+2 votes
Velox
Velox - - 83 comments

great !
i have to buy it

Reply Good karma Bad karma+3 votes
Jam3s007
Jam3s007 - - 1,217 comments

Awesome stuff as always.

Reply Good karma Bad karma+2 votes
Croco15
Croco15 - - 1,240 comments

Cool.

Reply Good karma Bad karma+1 vote
jesterspawn
jesterspawn - - 21 comments

Looks great. Nice solution.

Reply Good karma Bad karma+2 votes
Nebcake
Nebcake - - 443 comments

Great demonstration you guys showed

Reply Good karma Bad karma+2 votes
Dragonlord
Dragonlord - - 1,934 comments

Why using a slow software mode shadow mapping if there exists accelerated hardware shadow mapping? Calculating decals is not too fast compared with a z-buffer test.

Reply Good karma Bad karma+2 votes
chris_sloany
chris_sloany - - 2,830 comments

looks great!

Reply Good karma Bad karma+2 votes
DOLBYdigital
DOLBYdigital - - 623 comments

Great update as always team!
This project is really starting to take off even though you guys have been busting your ***** for awhile now. I want to remind everyone that you can pre-order this game and get access to the alpha releases to play around with the engine and help them make a phenomenal game.

Wolfire.com

spread the word!!

Reply Good karma Bad karma+1 vote
Myloman
Myloman - - 884 comments

Brilliant looking shadows. Nice update :D

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: