scene::IAnimatedMesh* mesh = smgr->getMesh("fighter_outside.obj");
scene::ISceneNode* node = 0;
scene::ILightSceneNode* light = 0;
if (mesh)
{
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
node = smgr->addLightSceneNode();
}
if (node)
{
node->setPosition(core::vector3df(-1,-5,5));
}
if (light)
{
node->setPosition(core::vector3df(50,5,-7));
}
Does anyone have suggestions on how to fix this?
[Edited by - Scavenger23 on August 19, 2005 4:54:18 PM]
model's normals are problem
Image
I imported a .obj into Irrlicht and created a light, and this is what I got.
This is the creation code:
You could replace "node" with "light" at the appropriate positions, this might work wonders.
~matt();
~matt();
You mean like this?
That doesn't work either. The model acts like the normals are inverted, but when I flip the normals on the model it is still the same. The light actually lights up the right parts, though.
scene::IAnimatedMesh* mesh = smgr->getMesh("fighter_outside.obj"); scene::ISceneNode* node = 0; scene::ILightSceneNode* light = 0; if (mesh) { node = smgr->addOctTreeSceneNode(mesh->getMesh(0)); light = smgr->addLightSceneNode(); } if (node) { node->setPosition(core::vector3df(-1,-5,5)); } if (light) { light->setPosition(core::vector3df(50,5,-7)); }
That doesn't work either. The model acts like the normals are inverted, but when I flip the normals on the model it is still the same. The light actually lights up the right parts, though.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement