Logo

Username:    Password:    Remember me     Signup

Main Menu
 Home
 IRC
 Wiki
 

Welcome

Username:

Password:


Remember me

[ Signup ]
[ Forgot password? ]


ToDo/Bugs/Requests
Total tickets: 263
Open tickets: 119
Not assigned: 123

Online
Guests: 4
Members: 0
On this page: 1
Members: 362, newest: coooolihdbril


Forums
Lightfeather 3D Engine -> Forums -> Bugs
<< Previous thread | Next thread >>  

 Model Animation, crash

Moderators: Matthias, Electron
Author Post
Offline24
Thu Jun 17 2010, 09:26PM Quote
Registered Member #372
Joined Thu Jun 17 2010, 08:23PM
Location: Poland
posts 3
Hello,
I think i found bug in CModelAnimator.
This is fragment of code(setupScene function):
<div class='indent'>
//This work perfect, i see my model on screen
ModelSceneNode *modelNode = new scene::CModelSceneNode(model);
smgr->addSceneNode(modelNode);
modelNode->setPosition(core::vector3df(0.0f,-10.0f,0.0f));
modelNode->drop();

CModelAnimator *anim = model->getAnimator();
//with this line i have problem
anim->activateAnimation(0, 1, EALT_LOOP, 0.02f, 0, 0);
anim->grab();
</div>
When i call
anim->activateAnimation(0, 1, EALT_LOOP, 0.02f, 0, 0);
all work good (model have animation). But if i want animation from 3 to 13 frame ( call anim->activateAnimation(0, 1, EALT_LOOP, 0.02f, 3, 13); ) application running 1-4 seconds and crash: screen

When I click 'retry' debuger sending me to math.h file to 384 line ("Microsoft Visual Studio 9.0\VC\include\math.h") screen

Examples:
Work:
<div class='indent'>
CModelAnimator *anim = model->getAnimator();
anim->activateAnimation(0, 1, EALT_LOOP, 0.02f, 0, 0);
anim->grab();
</div>
Not work:
<div class='indent'>
CModelAnimator *anim = model->getAnimator();
anim->activateAnimation(0, 1, EALT_LOOP, 0.02f, 3, 13);
anim->grab();
</div>
work:
<div class='indent'>
CModelAnimator *anim = model->getAnimator();
anim->activateAnimation(0, 1, EALT_LOOP, 0.02f, 1, 13);
anim->grab();
</div>
not work:
<div class='indent'>
CModelAnimator *anim = model->getAnimator();
anim->activateAnimation(0, 1, EALT_LOOP, 0.02f, 10, 11);
anim->grab();
</div>
.. I don;t know what i make bad (i think it is bug).
[sorry for my bad English, i still learning]
Back to top
Matthias
Fri Jun 18 2010, 10:28AM Quote

Location: Hamburg, Germany
posts 399
hm. i have a few thoughts and a few questions:
is it possible, that your animation doesnt have that many frames and so it crashes when a startframe is set which doesnt exist ?
when the program runs for a few seconds before it crashes: does it show the animation during that time ?
can you upload the model somewhere so i could try myself ? alternatively, can you post the lfm file with the animation definitions ?
have you tried loading the model in the modelviewer and check the animation there ?

Back to top
Website
Matthias
Fri Jun 18 2010, 10:29AM Quote

Location: Hamburg, Germany
posts 399
and a sidenote: you dont need to grab() the animator pointer since it belongs to the model and you can always access it through the model.
Back to top
Website
Matthias
Fri Jun 18 2010, 10:31AM Quote

Location: Hamburg, Germany
posts 399
and another thought: do you use lf in debug mode so that assertions would fire ? if not, try that, it might point you directly to the problem.
Back to top
Website
Offline24
Fri Jun 18 2010, 12:04PM Quote
Registered Member #372
Joined: Thu Jun 17 2010, 08:23PM
Location: Poland
posts 3
Matthias wrote: ...

is it possible, that your animation doesnt have that many frames and so it crashes when a startframe is set which doesnt exist ?

In orginal file (before convert to lfm) model get frames from 2 to ~360. In Irrlicht works fine.

Matthias wrote: ...

when the program runs for a few seconds before it crashes: does it show the animation during that time ?

yes i see animation on screen. Sometimes program running ~30 sec and i see full, good animation.

Matthias wrote: ...

can you upload the model somewhere so i could try myself ?

This is the model

Matthias wrote: ...

have you tried loading the model in the modelviewer and check the animation there ?

Yes i tried and model don't have animation (or i don't know how check it)

Matthias wrote: ...

do you use lf in debug mode so that assertions would fire ? if not, try that, it might point you directly to the problem.

I use LightFeather in debug.

Now i check .lfm file and in "[animationtiming]" section i see this:
<div class='indent'>
[key]
time=0
pose=0
[/key]
[key]
time=1
pose=1
[/key]
[key]
time=3
pose=2
[/key]
...
</div>
There is no time=2 and maybe it is problem ?(now i think it is problem...)

Thanks you for fast reply.
Back to top
Matthias
Fri Jun 18 2010, 12:15PM Quote

Location: Hamburg, Germany
posts 399
will look at it after the soccer game (sorry, but germany is playing in about 1 hour) :)
Back to top
Website
Matthias
Fri Jun 18 2010, 11:25PM Quote

Location: Hamburg, Germany
posts 399
I tried it in the modelviewer and the animation plays fine there. to try it, start
modelviewer dwarf1.lfm
then press [i] to switch on animations and use +/- to set the speed. there is no way to set limits in the modelviewer but since it plays everything, it kinda looks like an error in your code to me. maybe you can send me your code so i can try it ?!
Back to top
Website
Offline24
Sat Jun 19 2010, 01:21AM Quote
Registered Member #372
Joined: Thu Jun 17 2010, 08:23PM
Location: Poland
posts 3
Thanks you again, now i know how check animation in model viewer ; D
This is my code (source code + visual2008 project [to check 'project options']): click
[ Edited Sat Jun 19 2010, 01:40AM ]
Back to top

Jump:     Back to top



Random Image

Latest Forum Posts
calav3ra on 04 Sep : 15:21
You are absolutely right about both parts being wr[more ...]

Matthias on 04 Sep : 10:42
I will have time to look into this and the other t[more ...]

legerdemain on 04 Sep : 06:45
Hi again, i'm trying to track down a strange crash[more ...]

legerdemain on 03 Sep : 11:03
In CGUITextArea.cpp, lines 657-658 and 679-680, th[more ...]

Matthias on 27 Aug : 13:20
Hm.. thats odd - i will look into it. Hope you can[more ...]

Backend
Our headlines can be syndicated by using either our rss or text feeds.
news.xml - news.txt


Render time: 0.2313 second(s).