I am new to Irrlicht but not to programming.
I followed few tutorials and got to learn a few things. Now when i export my Blender models to OBJ format and load them in Irrlicht, i get a completely white object no matter if the mesh is UV-mapped or with a plain color shader. this happens with every mesh I take in Irrlicht.
I also loaded my models in MeshViewer application that comes with Irrlicht but got the same result, the mesh was completely white with the terrain in the background.
I am wondering if this is problem with Blender's ability or something. since i searched some threads here, people seem to get Blender to export correctly and perhaps its only me
please help. Here is the code of my file:
Code: Select all
#include <irrlicht.h>
using namespace irr;
IrrlichtDevice* device = 0;
int main()
{
device = createDevice(video::EDT_OPENGL, core::dimension2d<s32>(640, 480), 16, false, false, false);
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
scene::IAnimatedMeshSceneNode* mynode = smgr->addAnimatedMeshSceneNode(smgr->getMesh("ship.obj"));
mynode->setPosition(core::vector3df(0,0,10));
mynode->setMaterialFlag(video::EMF_LIGHTING, false);
smgr->addCameraSceneNodeFPS(0, 100.0f, 100.0f);
device->getCursorControl()->setVisible(false);
while(device->run())
{
driver->beginScene(true, true, video::SColor(155,155,155,155));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
i can put up the OBJ mesh if required.
Thanks a lot.
Kamran.