[SOLVED] simple 3d char animator

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post 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
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post 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;
}
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post 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 )?
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post 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.
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post by bandinopla »

here is a link to the .x file i'm loading

http://bandinopla.ifastnet.com/testing.X
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post 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.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post 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.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

works fine for me in 1.2, I don't even have to resave in mview
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post by bandinopla »

i have irrlicht 1.1
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Then update :D
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post by bandinopla »

i just update to irrlicht 1.2 but i see the model like before, no changes.

can u post ur code?
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post 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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

It loads perfectly with the mesh viewer of the release version, so it should be in your code.
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post 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?
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post 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!!!
Post Reply