I am having problem with lights.
Ok in my scene I have ambient light, and one spotlight, but I thought that some of my meshes seemed to be too light.
So as a test I turned off my spotlight and only left with ambient light. Now the scene goes dark as it is supposed to but my house meshes seem to be lit. They are not going dark.
In 3ds max I added a little specular and glossiness. Could this be causing it?
Here is my meshloading code. Bear in mind the room is loaded using the same function as the houses, and yet the houses light but the room doesn't.
Here is my meshloading code
Code: Select all
void LoadMesh::loadMesh(ISceneManager* smgr,IVideoDriver* driver,const wchar_t* modelname)
{
mesh = smgr->getMesh(modelname);
node = smgr->addMeshSceneNode(mesh);
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, true);
node->setPosition(core::vector3df(0,0,0));
node->addShadowVolumeSceneNode();
}
}
Code: Select all
smgr->setAmbientLight(SColor(255, 180, 180, 180));
/*
ILightSceneNode* mySpotLight = smgr->addLightSceneNode();
mySpotLight->setPosition(vector3df(0.0f, 140.0f, 0.0f));
mySpotLight->setRotation(vector3df(-90.0f, 0.0f, 0.0f));
SLight spotLightData;
spotLightData.Type = ELT_SPOT;
spotLightData.OuterCone = 300;
spotLightData.InnerCone = 100;
mySpotLight->setLightData(spotLightData);
*/