Add mesh code
Code: Select all
ISceneManager* smgr = device->getSceneManager();
IAnimatedMesh* mesh = smgr->getMesh("./5K_3DS/PLANE.3ds");
IMeshSceneNode * node = smgr->addMeshSceneNode(mesh->getMesh(0),0,-1, vector3df(0,-250,0), vector3df(0,0,0), vector3df(1,1,1),false);
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
scene::ISceneNodeAnimator* anim =
smgr->createFlyStraightAnimator(core::vector3df(1000,0,60),
core::vector3df(-100,0,60), 2500, true);
if (anim)
{
node->addAnimator(anim);
anim->drop();
}
}
Add light code
Code: Select all
scene::ISceneNode* scnode = smgr->addLightSceneNode(0, core::vector3df(0,0,0),video::SColorf(0.7f, 0.7f, 0.7f, 0.7f), 12000.0f);
Hey, Mr twilight17, I think you are right, my light is inside my model!
after moving it out, the model looks much better.
and my another friend told me to use 2 light sources, and here is the improved result.
but I still what to know more about this topic.
I understand it is not simple.
so there are many ways, shader and texture mapping, etc.
where can I dug up more information on these using irrlicht?
Is there any tutorial? or google only?