Drew,

Absolutely stunning stuff by yourself and Steempipe! Awesome!

I have a couple of notes. I noticed in the mat_lighting.wdl that you had commented that only two lights work. I think this is because the shader code in normalmap_level_ps2.0.fx only makes provisions for two lights, i.e.:

Code:
 float4 PS_PASS0( PS_INPUT0 psInStruct ):COLOR


{

float4 color = tex2D(sColorMap, psInStruct.Tex); // fetch color map
float3 bumpNormal = 2 * (tex2D(sBumpMap, psInStruct.Tex) - 0.5); // fetch bump map
float4 gloss = tex2D( sBumpMap, psInStruct.Tex );

//LIGHT 1
float3 LightDir1 = normalize(psInStruct.Light1);
float3 ViewDir1 = normalize(psInStruct.View1);
float4 diff1 = saturate(dot(bumpNormal, LightDir1)); // diffuse component
float shadow1 = saturate(4 * diff1);
float3 Reflect1 = normalize(2 * diff1 * bumpNormal - LightDir1); // R
float4 spec1 = pow(saturate(dot(Reflect1, ViewDir1)), 15);
float4 Attenuation1 = saturate(dot(psInStruct.Att1, psInStruct.Att1));

//LIGHT2
float3 LightDir2 = normalize(psInStruct.Light2);
float3 ViewDir2 = normalize(psInStruct.View2);
float4 diff2 = saturate(dot(bumpNormal, LightDir2)); // diffuse component
float shadow2 = saturate(4 * diff2);
float3 Reflect2 = normalize(2 * diff2 * bumpNormal - LightDir2); // R
float4 spec2 = pow(saturate(dot(Reflect2, ViewDir2)), 15);
float4 Attenuation2 = saturate(dot(psInStruct.Att2, psInStruct.Att2));

return (
(0.1 * color) + //ambient
((shadow1 * (color * diff1 + (spec1*gloss.w)) * (1 -Attenuation1))*vecLightColor[1])+
((shadow2 * (color * diff2 + (spec2*gloss.w)) * (1 -Attenuation2))*vecLightColor[2])
);
}



I guess its just a case of copying the code and pasting, then changing things like LightDir2 to LightDir3 and ViewDir2 to ViewDir3 etc.

Also, I altered the code within the light_pos_object action in mat_lighting.wdl to accomodate the new template scripts, since the demo came with the old ones.

Code:
 
var light_dist=2700; //Distance Light LOD...how far away from a light you can be until it shuts off/on


action light_pos_object
{
wait(5);
my.invisible=on;
my.passable=on;
//NewtonCreateGravityEntity (wood_material);
while(1)
{

if vec_dist(my.x, plBiped01_entity.x )<light_dist// or camera
{

my.light=on;
my.lightrange=1800; //could be set also to a skill

my.red= my.skill1; //just put in the r,g,b values
my.green= my.skill2;
my.blue= my.skill3;

my.cast=on; //casts a shadow when on
}

else
{
my.lightrange=0; //if too far away turn it off
my.light=off;
my.cast=off;

}

wait(1);

}



Hopefully this is the start of something BIG for 3DGS. I've been using it on and off since A4.12 but only recently got up a head of steam. It must be said that the Commercial Edition, at $199 is a total bargain considering what this development studio is capable of!