What could cause a low fps? It starts around 10 then degrades eventually to 0. I am running long cineamtic btw.
1- if the number of object in the scene is the same (just moving around)
2- memory consumption on the heap is around 2-3GB but it’s like that from the beginning
3- number of vertices is 3712556 but again it’s the same from the beginning
4- I am optimizing using BatchNode it is working just fine.
please give me an idea
thanks
edit: is the larger/longer the cinematic event is the lower the fps goes?
If the debug stats basically don’t change then you may want to look to see if your GPU is overheating.
not an expert in GPUs but the load on it ranges from 49% to 65% and the temperature is fluctuating around 76
and If I crank the cinematics speed up to 5x I get
[java]Nov 30, 2012 4:23:23 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at com.jme3.animation.AnimControl.controlUpdate(AnimControl.java:330)
at com.jme3.scene.control.AbstractControl.update(AbstractControl.java:90)
at com.jme3.scene.Spatial.runControlUpdate(Spatial.java:540)
at com.jme3.scene.Spatial.updateLogicalState(Spatial.java:658)
at com.jme3.scene.Node.updateLogicalState(Node.java:154)
at com.jme3.scene.Node.updateLogicalState(Node.java:154)
at com.jme3.scene.Node.updateLogicalState(Node.java:154)
at com.jme3.scene.Node.updateLogicalState(Node.java:154)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:246)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:149)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:182)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:223)
at java.lang.Thread.run(Thread.java:662)[/java]
Uh… what version of JME are you running? Line 330 of AnimControl.java doesn’t correspond to anything that could cause an NPE.
I am using a nightly for a lot of reasons…
the line 330 is :
[java] /**
- Internal use only.
*/
@Override
protected void controlUpdate(float tpf) {
if (skeleton != null) {
skeleton.reset(); // reset skeleton to bind pose
}
TempVars vars = TempVars.get();
for (int i = 0; i < channels.size(); i++) {
channels.get(i).update(tpf, vars);// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< line 330
}
vars.release();
if (skeleton != null) {
skeleton.updateWorldVectors();
}
}[/java]
it’s like it cannot keep up with the animation channels as the animation runs great on cinematic.speed(1)
Somehow a null channel is added or you are adding/removing channels from a separate thread and the array list is in a confused state.
AnimationFactory takes by default 30 fps shouldn’t help if I reduce that number to say 15?
you are adding/removing channels from a separate thread and the array list is in a confused state.
I am doing that... I didn't know that add/removing channels from another thread isn't recommended. I thought only modifying the scene itself (adding/removing nodes)
@garnaout said:
I am doing that... I didn't know that add/removing channels from another thread isn't recommended. I thought only modifying the scene itself (adding/removing nodes)
Sigh. I thought you'd been through the code. I thought you'd seen that the list is just an array list.
In general, unless threading is SPECIFICALLY SUPPORTED. Then threading is NOT SUPPORTED.