harikumar001
|
 |
« on: February 22, 2011, 02:19:17 AM » |
|
Hey guys,
Wanted to do Managed Lighting in my application but some of my meshes use Normal Maps which wont work in Managed Lighting mode. I have to use TV_LIGHTING_BUMPMAPPING_TANGENTSPACE for normal mapping to work.
But the problem is that when I change to TV_LIGHTING_BUMPMAPPING_TANGENTSPACE mode, my scene goes dark. I am using a directional light for my scene and given are the material settings:
IDMat = Mats.CreateMaterial(); Mats.SetAmbient(IDMat, 0.3f,0.3f,0.3f,1); Mats.SetDiffuse(IDMat, 1.0f,1.0f,1.0f,1); Mats.SetSpecular(IDMat, 0.2f,0.2f,0.2f,1); Mats.SetPower(IDMat, 20); Mats.SetEmissive(IDMat, 0.0f,0.0f,0.0f,1);
IDLight = Lights.CreateDirectionalLight(new TV_3DVECTOR(-1, -1, 1), 1, 1, 1, "RoomLight", 1); Lights.SetSpecularLighting(true);
This works fine if I am in Managed Lighting Mode but not in TV_LIGHTING_BUMPMAPPING_TANGENTSPACE mode. Any pointers?
Regards
|