Horde3D
http://www.horde3d.org/forums/

[solved] Animation bug
http://www.horde3d.org/forums/viewtopic.php?f=3&t=261
Page 1 of 1

Author:  Spectator [ 23.03.2008, 16:19 ]
Post subject:  [solved] Animation bug

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" ?

Author:  marciano [ 26.03.2008, 19:48 ]
Post subject: 

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.

Author:  marciano [ 28.03.2008, 13:23 ]
Post subject: 

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 :)

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/