Here modified Terrain example:
http://www.shadow-dimension.com/files/slow_perf_bug.rar
60fps on 1.3 and 0-1 on 1.3.1
Line 190:
scene::ISceneNodeAnimatorCollisionResponse *playerCollision = smgr->createCollisionResponseAnimator(
mainTriangleSelector,playerNode,
radius,
irr::core::vector3df(0,-50.0f,0));
If set grav to 0 except -50 FPS go back to 60.. any graviti drop down fps to 0-1
FPS drop down from 60 to 0-1
-
- Posts: 616
- Joined: Wed Nov 01, 2006 6:26 pm
- Location: Cairo,Egypt
- Contact:
the ellipsoid radius is huge, causing every triangle in the terrain to be tested every frame.
This is down to a bug in CXAnimationPlayer, it's something to do with calling animateSkeleton the very first time with an animation time of -1.
I guess that the double skinning of animated mesh nodes bug caused this bug to remain hidden until 1.3.1
anyway, simple workaround: get the ellipsoid radius from the bounding box of animatedMesh->getMesh(0) instead of the node, as it currently can't be trusted for animated x meshes before the first frame has been rendered.
This is down to a bug in CXAnimationPlayer, it's something to do with calling animateSkeleton the very first time with an animation time of -1.
I guess that the double skinning of animated mesh nodes bug caused this bug to remain hidden until 1.3.1
anyway, simple workaround: get the ellipsoid radius from the bounding box of animatedMesh->getMesh(0) instead of the node, as it currently can't be trusted for animated x meshes before the first frame has been rendered.
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
well, there is one cool , and actualy the fastest, way of testing terain with an animated model "walking on it", (lets leave out objects of physique). Lets assume the closest triangle , which is the one you stand on always, (remember to put oject space center at feet!). Then find clossest vertex and you may set the character position as is the world position of the closest vertex. To find a clossest traingle from a point with vector pointing in the gravity way, you can have a simple routine, not needing z buffer to read from. thats a big gain to FPS. One MORE thing, you have to interpolate for every frame
what is this thing...