Game Development Community

Material file with normal map corrupts lightmapping

by Andy Hawkins · in Torque Game Engine Advanced · 08/03/2008 (5:31 pm) · 3 replies

Using TGEA 1.7.1 with Constructor 1.0.51 I get a good light mapped room here in the top pic.

However looking at the bottom pic using the code below causes problems with the lightmapping. The normal map renders well (its the floor) but it disturbs the lightmaps. Maybe a texture UV problem??? Any ideas how I can fix this please?

new Material(Floor)
{
   mapTo = Floor43;
   
   baseTex[0] = "Floor4.jpg";
   bumpTex[0] = "Floor4_nrm.jpg";

   pixelSpecular[0] = true;
   specular[0] = "0.3 0.3 0.3 0.1";
   specularPower[0] = 48.0;
   //translucent = true;
  	//translucentBlendOp = LerpAlpha;
	//emissive[0] = true;
	//glow[0] = true;
   //shader = DrewFX_Cobblestone;
};

Before (no normal mapping)
www.drewfx.com/Torque/errors/Without_normalMap.jpg
After (with normal mapping)
www.drewfx.com/Torque/errors/With_normalMap.jpg

#1
08/03/2008 (5:45 pm)
Just curious, but how does it look if you turn off specular?
#2
08/05/2008 (7:31 pm)
It still looks the same if I turn off specular. Guess I can't have normal maps on the floor?
#3
08/05/2008 (8:22 pm)
It looks like it's screwing up on geometry boundaries. (Impossible to know without a wireframe view, but..). That would suggest that the vertex normals could be wrong there? It'd be annoying to confirm. But you could use PIX to look at the vertex data pretty quickly. For those verts, the normal should be around 0,0,1. Since it's a flat surface. I'd look to see if you have any 0,0,0 normals?

This is a total guess, hope it helps a little.