FPS drop down from 60 to 0-1

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
lantis
Posts: 64
Joined: Thu Jun 17, 2004 2:46 pm

FPS drop down from 60 to 0-1

Post by lantis »

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

Post by hybrid »

Yes, you're right. It seems as if the collision does far too much in 1.3.1. So it basically sucks up all CPU time. There were, however, not too many changes to this code, so it might be due to the triangle3d/plane3d fixes applied.
Hmm, who's gonna fix the collision tests :?
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

i think the problem with his application bec i ran the terrain example in 1.3.1 sdk and it ran with high fps!?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, but you also don't read or understand the full text. There's no problem with gravity of (0,0,0), but with different values. So use them and see how the FPS degrades.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

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.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

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 :cry:
what is this thing...
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Bitplane maybe you can make the bounding box automatically set to the mesh of the scene node when the scene node is created? But I am guessing its 100x more complicated than this...
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

well... there's probably a simple fix, but I gave up searching for the problem as CXAnimationPlayer will be replaced by Luke's new animation system.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply