Game Development Community

Real-time shadows

by Ryan McKenzie · in Torque Game Builder · 01/27/2007 (10:40 am) · 3 replies

I am going for an effect that is shown to be impressive but difficult. Yet I am determined to make this work.
Using OpenGL, I should be able to render dynamic shadows through out my game. I manged to locate this tutorial...

http://www.gamedev.net/reference/programming/features/2dsoftshadow/

I am not too sure how you are suppose to use opengl (which i'm sure holds an issue) but, I just need to understand, how do render these effects into TGB? Or in other words, my game?

What I am currently creating is a top-down view of a racing game. One of my sets will have many lamposts, each would have a light source and the cars would each be shadow casters.

#1
01/27/2007 (10:45 am)
Well, you would need 1) a pro license to TGB to access the source code and 2) somehwhat extensive C++ programming knowledge in the structure of TGB and in OpenGL to merge the two in the right way. I say somewhat extensive because you will need to make some core changes to how TGB renders according to the algorithms presented (not to mention optimization). It's a nice system, but as there is not a base 2D lighting system integrated into TGB right now. It would take some programming prowess to get it there.
#2
01/27/2007 (10:57 am)
It's probably easier to fake it in 2d. My first thought is to try stretching, rotating, and fading in/out a 2d shadow on the opposite angle(s) of the car(s) from the light(s). It won't be 100% accurate (TGB can't skew sprites), but as it's a soft shadow it should come close enough to look good.
#3
01/27/2007 (11:12 am)
@David. You made me throw my determination out the window there :)) It does sound like alot of work and understanding, I wouldn't push myself that far for just now. Faking it does sound alot easier on the other hand and less time consuming though. I think I'll work on that and see how it goes.