Page 1 of 1

problem with light

Posted: Thu Jul 21, 2005 5:34 pm
by irado
I added a light, but it this not illuminating, what i must do so that it illuminates some mesh?

scene::ILightSceneNode* light1 =
smgr->addLightSceneNode(0, core::vector3df(0,100,1000),
video::SColorf(0.5f, 1.0f, 1.0f, 1.0f), 200.0f);

scene::ISceneNode* bill =
smgr->addBillboardSceneNode(light1, core::dimension2d<f32>(120, 120));

bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
bill->setMaterialTexture(0, driver->getTexture("particlered.bmp"));

Posted: Thu Jul 21, 2005 8:02 pm
by rsdl
you have to enable lighting on the mesh
someMesh->setMaterialFlag(video::EMF_LIGHTING, true);

Posted: Thu Jul 21, 2005 11:01 pm
by irado
the mesh is illuminated when I place this I command, but I wanted that it the illumination was equal to the example: 11.PerPixelLighting.

I already studied the example but I did not obtain the equal illumination of the example. I want to say the light in the walls of the mesh to follow the light.