Light, big surfaces
Posted: Mon Apr 17, 2006 9:16 pm
Hello,
I have found some threads, but no one has helped me...
I have a mesh
mesh = smgr->getMesh("./data/models/street_1_1.ms3d");
node = smgr->addAnimatedMeshSceneNode(mesh);
node->setMaterialTexture(0, driver->getTexture("./data/images/street_1.jpg"));
node->getMaterial(0).EmissiveColor.set(0,0,0,0);
node->setMaterialType(video::EMT_SOLID);
node->setPosition(loc);
node->setRotation(rot);
mesh->drop();
and a dynamic light
scene::ILightSceneNode* light1 = smgr->addLightSceneNode(0,camvec,video::SColorf(1.0f, 1.0f, 1.0f, 1.0f), 100.0f);
scene::ISceneNodeAnimator* anim = smgr->createFlyCircleAnimator (camvec,800.0f,0.003f);
light1->addAnimator(anim);
anim->drop();
scene::ISceneNode* bill = smgr->addBillboardSceneNode(light1, core::dimension2d<f32>(60,60));
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
bill->setMaterialTexture(0, driver->getTexture("./data/images/particlered.bmp"));
But when I open the app, there are some problems. The Mesh (just a Box...) seems to have only 4 places to be lighted, the space between stay dark)
Screenshot:
http://www.mn-solutions.net/screen.jpg
Add faces to the box work, but at least 64 faces for one side of the box are unnecessary, hm?
The curbstone seems to be lighted as it should.
Are there any solutions?
I have found some threads, but no one has helped me...
I have a mesh
mesh = smgr->getMesh("./data/models/street_1_1.ms3d");
node = smgr->addAnimatedMeshSceneNode(mesh);
node->setMaterialTexture(0, driver->getTexture("./data/images/street_1.jpg"));
node->getMaterial(0).EmissiveColor.set(0,0,0,0);
node->setMaterialType(video::EMT_SOLID);
node->setPosition(loc);
node->setRotation(rot);
mesh->drop();
and a dynamic light
scene::ILightSceneNode* light1 = smgr->addLightSceneNode(0,camvec,video::SColorf(1.0f, 1.0f, 1.0f, 1.0f), 100.0f);
scene::ISceneNodeAnimator* anim = smgr->createFlyCircleAnimator (camvec,800.0f,0.003f);
light1->addAnimator(anim);
anim->drop();
scene::ISceneNode* bill = smgr->addBillboardSceneNode(light1, core::dimension2d<f32>(60,60));
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
bill->setMaterialTexture(0, driver->getTexture("./data/images/particlered.bmp"));
But when I open the app, there are some problems. The Mesh (just a Box...) seems to have only 4 places to be lighted, the space between stay dark)
Screenshot:
http://www.mn-solutions.net/screen.jpg
Add faces to the box work, but at least 64 faces for one side of the box are unnecessary, hm?
The curbstone seems to be lighted as it should.
Are there any solutions?