problem with light

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
irado
Posts: 22
Joined: Mon Jun 20, 2005 4:46 pm

problem with light

Post 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"));
rsdl
Posts: 13
Joined: Wed May 05, 2004 6:57 am
Location: Soviet Canuckistan

Post by rsdl »

you have to enable lighting on the mesh
someMesh->setMaterialFlag(video::EMF_LIGHTING, true);
irado
Posts: 22
Joined: Mon Jun 20, 2005 4:46 pm

Post 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.
Post Reply