Game Development Community

How to get NON-parallel shadow?

by Tobias Niva · in · 11/16/2007 (7:12 pm) · 1 replies

Hi.

First off - I'm in TGEA 1.0.3...

I'm wondering if there's a way to get a DYNAMIC light to cast a shadow that's NOT "parallel"? (like the shadow created in lightmaps if the light is STATIC).

I've been fiddeling with the parameters of a dts datablock (e.g. shadowProjectionDistance, shadowSphereAdjust, shadowBias) but the shadow always seems to be as one from a very distant light, thus "parallel" (like a sunlight's shadow).

The reason for wanting this is, that it looks rather odd if you put a point light quite close to an object - say a lamp centered right above a desk - and the shadow is just "top-down"... (same size as board).
One would rather have a shadow that grows out from the edges from the board and covering a much larger area than the actual board...

Another question is;
Dynamic lights seem to light the object the strongest at a certain distance, rather than "closest to object = strongest light". (Also in this case, the static lights seem to act more "realistic"...).

Am I missing something here, in the TLK-gui (F12)...?!

Thanx in advance
Toby

#1
11/28/2007 (12:10 am)
Torque's dynamic shadows are a type of directionally projected (parallel) shadows. Adjusting the shadows to project based on a point source could work, the problem that pops up is how Torque handles shadow clipping against objects, which cannot easily be done in a non-directional way. It might be possible to add a custom object shadow scale to simulate the effect by hand tweaking the shadow scale in-mission, but I'm not sure how good that would look. :/

Dynamic lights on DTS objects use vertex lighting, when the light is very close to the center of a polygon, or the closest polygon is large, the lighting could look dim compared to when moved away from the object, or when compared with static lighting. To avoid dim spots try adding a bit of geometry in lit areas or using dif objects where needed.