Night Elf
03-09-2007 18:03:04
If I use a triangle mesh floor (just a big plane made up by two triangles), my game runs at 3-4 FPS. The same scene using a floor ("floor: yes" in the world creation parameters) instead, runs at 25 FPS. Is this a normal behaviour?
I tried tessellating the terrain mesh and using several smaller meshes and the results are the same...
betajaen
03-09-2007 18:37:56
No that isn't normal. Can I see your actor code?
Night Elf
03-09-2007 19:38:57
It's quite simple, actually:
nxActor = g_nxScene->createActor(meshName, new NxOgre::TriangleMeshShape(meshName), Ogre::Vector3::ZERO, "static: yes");
Let me know if you need any other part of the code.
betajaen
03-09-2007 19:49:55
No that's normal. What happens if you use other meshes?
Night Elf
03-09-2007 19:59:14
I tried using other meshes, tessellating this one, etc. but the result is the same...
betajaen
03-09-2007 20:13:36
This line works perfectly fine for me:
mScene->createActor("test", new TriangleMeshShape("cube.1m.mesh"), Ogre::Vector3::ZERO, "static: yes");
Is there anything strange in your NxOgre log?
Night Elf
03-09-2007 20:27:21
Is there anything strange in your NxOgre log?
Well, now that you mention it, I'm seeing a lot of these lines:
NxOgre::Error::reportError#78 T8.466 F1331
PhysX Error (NXE_DB_WARNING) 'createActor: Dynamic triangle mesh instantiated!' in line 1108 of g:\scm\release\PhysX_2.7.2\novodex\SDKs\Physics\src\Actor.cpp
betajaen
03-09-2007 20:35:32
And that is the reason for the FPS loss, if in doubt - check the NxOgre log.
Me thinks you have a TriangleMesh attached to an actor somewhere without a "static: yes".
Night Elf
03-09-2007 20:41:26
Well, I had many kinematic objects using triangle meshes... But I changed them to convex hulls and, while all warnings in the log went away, the performance problems remain.
nxBody = g_nxScene->createBody(
meshName,
new NxOgre::ConvexShape(meshName),
NxOgre::Pose(position, orientation),
"kinematic: yes");
betajaen
03-09-2007 20:52:46
You get 4-5 FPS, with kinematic bodies using Convexes!?