Game Development Community

Any way to fake 3d shadows?

by Nick Sinnott · in Torque Game Builder · 05/10/2007 (9:36 am) · 2 replies

I'm working on a platform adventure game prototype (similar to Flashback or Abe's Odyssey), and I'm looking for a way to fake 3d stencil shadows on a 2d character in TGB, hopefully without having to change anything on the character sprite itself:

nicksinnott.com/img/misc/shadows.jpg(rendered in maya--not the actual character)

It doesn't have to look exactly like this, but having some sort of psuedo-dynamic environment lighting is crucial to the game. I don't have/want TGE, and it needs to run on a Mac, so TXE is out.

#1
05/10/2007 (6:55 pm)
Nick, from the looks of it ... the shadow is just the sprite, slightly larger ... and offset ... so ... what you could do is use the blending options to change the color of the sprite ... and the opacity, etc ... then offset a copy of the sprite in the location of the shadow ... rotate it and resize it if necessary, etc ...

without creating new sprite artwork to do it 100% correct, thats about the best I can think you can do ...
#2
05/10/2007 (8:24 pm)
Yeah, the character's shadow is relatively simple--I'm more concerned with how to cast a shadow on the character itself.

I've thought of rendering out a copy of the sprite with shadows already on it and blending it up, but then I have to have a version of every single frame of animation in every single lighting situation, and tons of code to swap between them... which makes it a bit too tricky to tweak at the later stages.