Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 06:14

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [solved] Animation bug
PostPosted: 23.03.2008, 16:19 
Offline

Joined: 22.05.2007, 17:42
Posts: 4
Just quickly looking through the new animation system...

In Horde 0.13 and earlier, SceneNode::onUpdate() method was called (and was based on pre-calculated rel. and abs. transforms) from SceneNode::update() mainly to track transform-dependant node features.
In current (0.14) version, with changed animation system, MeshNode::onUpdate() and JointNode::onUpdate() methods are (erroneous) used to find relative transforms.
So, calculations of abs.transform and relating things in SceneNode::update() for meshes and joints are based on incorrect not-updated yet rel.transforms.
Such lag can be easily seen, for example, in fast animation with simultenious skinning and joint-attached nodes, like Knight sample.
(the simplest way to see - use large time scale in ModelNode::setAnimParams(...), and to get significant inter-frame time interval on modern hardware, increase "maxCount" and "emissionRate" values in particleSys1.scene.xml).
Possible solution - move "if( _animUpdateStamp != 0 ) { ... }" in MeshNode::onUpdate() and JointNode::onUpdate() to a new virtual method of AnimatableSceneNode class and call the method before calculations of the abs.transforms.

BTW, in MeshNode::onAttach(...) you still can get zero-sized box; did you mean "bBMax.x += 0.1f...bBMax.y += 0.1f...bBMax.z += 0.1f" ?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 26.03.2008, 19:48 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Thanks Spectator for reporting that issue. Unfortunately I didn't have time yet to look at it in detail (very busy at the moment) but I will keep you updated.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 28.03.2008, 13:23 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Ok, I have fixed this problem by introducing onPreUpdate and onPostUpdate events. Thanks again for your detailed analysis!

I'm always amazed by your good eye for potential problems, so don't hesitate to continue reviewing our work :)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group