Game Development Community

Problem with shadows, if you mount lights - NOT A BUG

by D Fasel · in Torque 3D Professional · 11/17/2011 (8:53 am) · 1 replies

Hi, i get some different problems, if i use point or spot lights, mounted to a model like a street lamp.
The point light make a full shadow over all light, if it is mount to a shape.
The spot light make light, but no shadow.

This happens only if it is mount to a shape. I try out diferent settings, also i try out different shapes, and always i get this problems.

This happens in T3D1.1 and 1.2

here the code i use for the lights.

%obj.YelowLight = new SpotLight()
{
range = "20";
innerAngle = "70";
outerAngle = "95";
isEnabled = "1";
color = "0.988235 0.882353 0.537255 1";
brightness = "1.3";
castShadows = "1";
priority = "1";
animate = "0";
animationPeriod = "1";
animationPhase = "1";
flareScale = "1";
attenuationRatio = "0 1 1";
shadowType = "Spot";
texSize = "512";
overDarkFactor = "2000 1000 500 100";
shadowDistance = "400";
shadowSoftness = "0.6";
numSplits = "1";
logWeight = "0.91";
fadeStartDistance = "0";
lastSplitTerrainOnly = "0";
representedInLightmap = "0";
shadowDarkenColor = "0 0 0 -1";
includeLightmappedGeometryInShadow = "0";
rotation = "1 0 0 0";
canSave = "1";
canSaveDynamicFields = "1";
};

and

%obj.YelowLight = new PointLight()
{
radius = "15";
isEnabled = "1";
color = "1 0.882353 0 1";
brightness = "1.3";
castShadows = "1";
priority = "1";
animate = "0";
animationPeriod = "1";
animationPhase = "1";
flareScale = "1";
attenuationRatio = "0 1 1";
shadowType = "DualParaboloid";
texSize = "512";
overDarkFactor = "2000 1000 500 100";
shadowDistance = "400";
shadowSoftness = "0.6";
numSplits = "1";
logWeight = "0.91";
fadeStartDistance = "0";
lastSplitTerrainOnly = "1";
representedInLightmap = "0";
shadowDarkenColor = "0 0 0 -1";
includeLightmappedGeometryInShadow = "0";
rotation = "1 0 0 0";
canSave = "1";
canSaveDynamicFields = "1";
};

%obj.mountObject(%obj.YelowLight, 0);

I really dont know is that a bug, or i did some thing wrong. Maybe some one can help?
Ty

About the author

Working in the team of Winterleaf Entertainment as an Lead Level Designer and Environmental Artist. Selling content and art packs ready for T3D at my shop www.game3d.ch/shop


#1
11/18/2011 (3:56 am)
Oke, after a lot hours searching i found out what i did wrong.
I have to make the lamps so it don't need to be scaled in the world. otherwise it make this problems i talk about. It seems to make problems to the mountpoints, when you change the size of the model by attaching lights.

So it was not a bug i think. Anyway, maybe some one find this helpfull if they get the same problem with lights mounted.