i can only tewll you for blender exported *.obj files.
to export from blender:
*mark anything you want to export
*file > export >*.obj
*choose a folder to put in the obj and mtl and gice it a desired name
(i only export usualsy one mesh or even 2,3 which are non animated...)
*mark
~aplly modifiers
~rotate x90
~copyimages!!!!(important)
~edges
~triangulate
~polygroups
~materials
~uv´s
~nurbs
~normal
~HQ
~objects
~groups
~material group
click export
now you have ready to use, *.obj, *.mtl ang the image file.
To build in:
Code: Select all
ISceneNode* myNode = mgr->addMeshSceneNode(mgr->getMesh("../../media/weaponL.obj"), parentNode);
myNode->setRotation(core::vector3df(0,0,0));
myNode->setMaterialFlag(video::EMF_LIGHTING, false);
myNode->setMaterialFlag(EMF_BACK_FACE_CULLING, false);
myNode->setMaterialFlag(EMF_FRONT_FACE_CULLING, false);
no need to load teture or imagem just dont rename obj or mtl file bothe must have the same name and be in the same folder, also dont rename the image(which may is not named like your mesh), because irrlicht loads the *.mtl file that fits the name of the *.obj file and inside the .mtl file the image is listed.
thats it , if you still see nothing you wether saved the .obj in a wrong folder (my example uses the irrlicht media folder), or have to also add a light to the scene;)
btw when u use Blender with these settings to export the mesh should face the right side of your monitor to be sure it faces the + of the Z axis in Irrlicht (looking away from you), if you want it looking toward you you have to make it look to the right side of blender but you will have a rotation of (0,180,0) from the bedinning.