Page 1 of 1

gile[s] , MY3D and Irrlicht

Posted: Thu May 12, 2005 7:42 pm
by kmleonix
Hi all,

I'm new with Irrlicht and 3D realtime engine. So i have test several possibility to import lighmap in Irrlicht. The best (and easly) way/result is to import 3D scene in gile[s], create lightmap and export to my3d format.
But, I have encountered many problems, and there is 2 of them who blocks me
1) the texture under directX (8 & 9) are strange but look fine under opengl
2) the transparent texture are black

Some pictures is better to understand ;)
http://www.mapt4c.freesurf.fr/divers/gi ... irectx.jpg
http://www.mapt4c.freesurf.fr/divers/gi ... opengl.jpg

do you someone have an idea ? Bad export of gile[s] ? Bad inport with my3d ? Bad code of me ? :wink:

Your help is welcome. Thanks

Posted: Thu May 12, 2005 8:33 pm
by Guest
maybe the texture gets displayed in 16 bit under dx8/9 or it might have an alpha channel which gets displayed differently? Hmm, just guessing.

Posted: Thu May 12, 2005 10:04 pm
by Guest
Yes the texture look to be in 16 bit :?
This look to happen only if i use a transparent texture :shock:

This is the code test i use to load the scene

Code: Select all

	device = createDevice(video::EDT_DIRECTX9, core::dimension2d<s32>(640,480),24,false,false);
	if (device == 0)
	{
        return 1; // could not create selected driver.
	}

	driver = device->getVideoDriver();
	smgr = device->getSceneManager();

	smgr->getStringParameters()->setParameter(scene::MY3D_TEXTURE_PATH, "./test/");
	scene::IAnimatedMesh* mesh=smgr->getMesh("./test/test.my3d");
	scene::ISceneNode* node;
	if (mesh) smgr->addOctTreeSceneNode(mesh);

    scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(0, 100, 100);
	device->getCursorControl()->setVisible(false);
Do i have forget something ?

Posted: Fri May 13, 2005 12:28 am
by afecelis
try:

Code: Select all

driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);

Posted: Fri May 13, 2005 12:43 am
by ZDimitor
It must resolve 1st problem.

2nd problem) My3d importer not support EMT_TRANSPARENT_ALPHA_CHANNEL material yet.

Wait next update (i want to make it as soon as i can).

Posted: Fri May 13, 2005 7:18 pm
by Guest
Thanks a lot, it's perfect with ETCF_ALWAYS_32_BIT :D

Posted: Fri May 13, 2005 7:24 pm
by afecelis
gooooooooood! 8)