Page 2 of 3

Posted: Sat Dec 02, 2006 1:38 pm
by bandinopla
FINALY WORKS!!!!

this was my mistake:

the first thing i do when i start with Ogre was instaling the kiloWatt X exporter, but then, when i instal the panda Direct x exporter i did not read this...

Image

coz i instal pandaDX AFTER i instal kWx, that was my mistake.

so, long story short, i reinstall 3ds max 8 and now it works perfect, o warnings, no errors... :D

Image

so i will say this thread is a [SOLVED] and a BIG THANKS to the one and only belfegor

:D :D

Posted: Sat Dec 02, 2006 2:18 pm
by bandinopla
when i see he .x model in the MView i see it perfect, but when i load it into irrlicht this is what i see

Image

why? :(

this is the code i'm using:

Code: Select all

#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:main")
#include <irrlicht.h>
using namespace irr;
#pragma comment(lib, "Irrlicht.lib")
IrrlichtDevice* device = 0;


int main()
{

device = createDevice(video::EDT_DIRECT3D9,core::dimension2d<s32>(800, 600));

video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
driver->setAmbientLight(video::SColorf(0.1f, 0.3f, 0.3f));
scene::IAnimatedMesh* meshX = smgr->getMesh("testing.X");
scene::IAnimatedMeshSceneNode* meshNode = smgr->addAnimatedMeshSceneNode(meshX);
meshNode->setAnimationSpeed(3000);
meshNode->setPosition(core::vector3df(0.0f, 0.0f, 100.0f));
scene::ICameraSceneNode* cam;
cam = smgr->addCameraSceneNodeFPS(0, 10.0f, 200.0f);
cam->setNearValue(0.1f);
cam->setFarValue(500.0f);
int lastFPS = -1;
while(device->run())
{
driver->beginScene(true, true, video::SColor(255, 128, 128,128));
smgr->drawAll();
driver->endScene();
int fps = driver->getFPS();
if (lastFPS != fps)
{
core::stringw str = L"Irrlicht ver. SVN - Bones Animation [";
str += driver->getName();
str += "] FPS:";
str += fps;
str += "  ///////////  ALT + F4 to close  ////////";
device->setWindowCaption(str.c_str());
lastFPS = fps;
}
}
device->drop();
return 0;
}

Posted: Sat Dec 02, 2006 2:40 pm
by belfegor
Did you save it from "MView"?.Also why did you decrease far value of camera (everything beyond 500 units will be cut off )?

Posted: Sat Dec 02, 2006 2:48 pm
by bandinopla
i save it with MView, and the value of camera i was just testing, but the screenshot was taken with the code u have in the pdf.

Posted: Sat Dec 02, 2006 2:51 pm
by bandinopla
here is a link to the .x file i'm loading

http://bandinopla.ifastnet.com/testing.X

Posted: Sat Dec 02, 2006 3:05 pm
by belfegor
OK give me time to test it out (iam suprised what iv seen on your pic) and see what iv get ( i never get chance to test irrlicht 1.2 just downloaded it, but i dont think it would cause that problem).Hope you solve it earlier.

Posted: Sat Dec 02, 2006 4:33 pm
by bandinopla
what version are u using belfegor, coz i can use that version. cani donwload the version u r using? s still online?

i dont need to have the latest version, i'm learning.

Posted: Sat Dec 02, 2006 4:38 pm
by bitplane
works fine for me in 1.2, I don't even have to resave in mview

Posted: Sat Dec 02, 2006 7:20 pm
by bandinopla
i have irrlicht 1.1

Posted: Sat Dec 02, 2006 7:28 pm
by hybrid
Then update :D

Posted: Sat Dec 02, 2006 7:42 pm
by bandinopla
i just update to irrlicht 1.2 but i see the model like before, no changes.

can u post ur code?

Posted: Sat Dec 02, 2006 7:46 pm
by bandinopla
this is all my folder where i'm working, all the files.

2Mb

http://bandinopla.ifastnet.com/irrlicht_test.rar

u open that with winRAR or winZiP

Posted: Sat Dec 02, 2006 8:32 pm
by hybrid
It loads perfectly with the mesh viewer of the release version, so it should be in your code.

Posted: Sat Dec 02, 2006 9:25 pm
by bandinopla
is something wrong with this code?

Code: Select all

#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:main")
#include <irrlicht.h>
using namespace irr;
#pragma comment(lib, "Irrlicht.lib")
IrrlichtDevice* device = 0;


int main()
{

device = createDevice(video::EDT_DIRECT3D9,core::dimension2d<s32>(800, 600));

video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
driver->setAmbientLight(video::SColorf(0.1f, 0.3f, 0.3f));
scene::IAnimatedMesh* meshX = smgr->getMesh("testing.X");
scene::IAnimatedMeshSceneNode* meshNode = smgr->addAnimatedMeshSceneNode(meshX);
meshNode->setAnimationSpeed(3000);
meshNode->setPosition(core::vector3df(0.0f, 0.0f, 100.0f));
scene::ICameraSceneNode* cam;
cam = smgr->addCameraSceneNodeFPS(0, 10.0f, 200.0f);
cam->setNearValue(0.1f);
cam->setFarValue(5000.0f);
int lastFPS = -1;
while(device->run())
{
driver->beginScene(true, true, video::SColor(255, 128, 128,128));
smgr->drawAll();
driver->endScene();
int fps = driver->getFPS();
if (lastFPS != fps)
{
core::stringw str = L"Irrlicht ver. SVN - Bones Animation [";
str += driver->getName();
str += "] FPS:";
str += fps;
str += "  ///////////  ALT + F4 to close  ////////";
device->setWindowCaption(str.c_str());
lastFPS = fps;
}
}
device->drop();
return 0;
}
coz thats all the code...
what code whould u use?

Posted: Sat Dec 02, 2006 9:43 pm
by bandinopla
ok now it works, it was the code, i 'm loading the model with the "Movement" tutorial that comes with irrlicht and it animates well and all.

thanks to bitplane & hybrid for the help.

now is a [SOLVED] finaly!!!