I have a problem with loading object with tiling texture in irrlicht from dae file.
The sample file -
sample code:
Code: Select all
#
#include "irrlicht.h"
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main()
{
IrrlichtDevice *device =
createDevice( video::EDT_OPENGL, dimension2d<u32>(640, 480), 16, false, false, false, 0);
//createDevice( video::EDT_SOFTWARE, dimension2d<u32>(640, 480), 16, false, false, false, 0);
if (!device)
return 1;
device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IAnimatedMesh* mesh = smgr->getMesh("D:/3Dscene/tail/test.dae");
//IAnimatedMesh* mesh = smgr->getMesh("D:/3Dscene/tail/test.3ds");
if (!mesh)
{
device->drop();
return 1;
}
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
}
smgr->addCameraSceneNode(0, vector3df(0,50,0), vector3df(0,0,0));
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
When i export model from 3dsmax to dae with openCollada i got:
but with software render i got correct:
You can also check it using example 09.Meshviewer from irrlicht.
Try to load my dae file with software, burningvideo and opengl driver.
dae file - http://rghost.ru/37002696
directX driver works same as opengl.
all of that i try to do with irrlicht 1.7.2 with CColladaFileLoader from 1.8.0 (from svn-4093)
previous versions of irrlicht simply do not load textures from dae files.
and also i try on irrlich from svn-4093 and have same result.