Game Development Community

Shadowing from normal maps different on players

by Adam Beer · in Torque Game Engine Advanced · 07/15/2008 (2:40 pm) · 4 replies

I have the exact same model in my game, one is a StaticShape, the other is the actual player. One thing I noticed was that the same normal map on the player doesnt seem to cast any shadowing. If you guys really want a picture, let me know. I looked through the player class to see what it might be, but no luck. has anyone else noticed this? How would I fix it?

#1
07/17/2008 (7:02 am)
Anyone have any idea on this? It seems the player/shapebase class isnt being effected by lights the way staticshapes and all other objects are. For instance, if I add a mission lighting filter, everything but the player is effected by that object. I noticed also, if I changed the sun ambiance at runtime, everything but the terrain and player is effected (terrain needs a relight, player shouldnt). So does anyone have any idea as to whats going on, because it makes all the time ive spent on normal maps go to waste.
#2
07/28/2008 (6:08 pm)
Since it seems no one is willing to chime in here, I will add a some screenshots of what is happening. I would appreciate it if someone gave some idea, because this really makes my models look ugly.

I have the normal map being rendered on the second pass, so you can see what effect is is adding to the texture.

www.heartofthebattle.com/GG/screenshot_045-00000.jpg
www.heartofthebattle.com/GG/screenshot_045-00001.jpg
#3
07/30/2008 (4:44 am)
Still not 100% certain there's no missed side-effects on this one, but:

void sgLightManager::setupLights(SceneObject *obj)
{
...
		// players, vehicles, ...
		if(obj->overrideOptions)
		{
			if(outside)
			{
				light->mType = LightInfo::Vector;
				light->mDirection = sun->mDirection;
				light->mColor = sun->mColor;
				light->mAmbient = sun->mAmbient;
			}
			else
			{
				light->mColor = ambientColor * directionalFactor;
				light->mAmbient = ambientColor * ambientFactor;
			}
		}// beyond here are the static dts options...
...
}
#4
07/30/2008 (8:43 am)
Thank you very very very much Kirk. That fixed it.