Xith3D + ODE slowness

Hey,

I am currently trying to build a simulation using ODEJava (A physics engine for those not familiar with it). The download came with a number of classes and test programs for converting ODE Objects in Xith3D objects.
After installing all the plugins (JAR’s and DLL’s) I am able to run the test programs, however it seem to hang a lot. It will animate a small part, then stop for ages, then start and show another little bit then stop.

I am not sure if this is because of ODE or Xith3D or something else. Has anyone else experienced this, or have any ideas of what might be wrong?

How many bodys are there in your simulation ?

Do you use the stepFast() function of ODE ? This would improve performance a lot.

Just one body and the ground plane.

I tried it using stepFast() and quickStep() and it does the same. However testing with purely text output seems to indicate it MAY be a graphics related problem.

[quote]It will animate a small part, then stop for ages, then start and show another little bit then stop.
[/quote]
my xith/ode app shows the same behavior on a friend’s machine. he has an ati radeon graphics card.
the app works fine on different nvidia systems. maybe it’s a graphics related problem (jogl??)…

have you tried using the LWJGL renderer?

Will.

I do have an ATI Radeon so it is possible that the problem is to do with that.

I tried it with LWJGL (Just changing the import …render.lwjgl.*) but I get the error:

java.nio.BufferOverflowException at org.lwjgl.opengl.BufferChecks.checkBuffer(BufferChecks.java:69) at org.lwjgl.opengl.GL11.glLoadMatrix(GL11.java:1089) at com.xith3d.render.lwjgl.CanvasPeerImpl.setGLViewMatrix(CanvasPeerImpl.java:507) at com.xith3d.render.lwjgl.CanvasPeerImpl.setView(CanvasPeerImpl.java:488) at com.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:912) at com.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1050) at com.xith3d.scenegraph.View.renderOnce(View.java:590) at com.xith3d.scenegraph.View.renderOnce(View.java:523) at uk.ac.ed.s0199188.BlimpSim.BlimpSim.render(BlimpSim.java:396) at uk.ac.ed.s0199188.BlimpSim.BlimpSim.main(BlimpSim.java:418)

I read in an old thread about buffer rewinding…but there was no indication of where these buffers could be found.

In a slightly realted topic…I notice that LWJGL has progressed several version since the one available from the Xith site. I don’t intend to try using the newer version, but I was wondering how rapid the Xith development team is in updating (indications would be not much recently). I am not particularly bothered about being up-to-date, as long as I can do what I need to do just now.

[quote]have you tried using the LWJGL renderer?

Will.
[/quote]
I didn’t even managed to get the testcase for the xith-tk geometry package running with lwjgl so no chance to check for the possible ati related problem :-/

trying to look into it tomorrow…

So it’s a display problem.
Slowness can be due to the absence of optimized OpenGL drivers.
The drivers delivered with any OS aren’t the OpenGL optimized drivers. And the DirectX drivers for windows don’t do OpenGL hardware acceleration.
To download the good drivers, have a look at : http://www.opengl.org

I have the latest ATI drivers installed already, so I dont think it will be that.

I have downloaded the whole of Xith3d out of CVS and am going to try and build it…as it seems that there have been a number of changed made to the LWJGL bits since the last “public” build.

Update:

I have built the most recent version of Xith3d from CVS, and installed it alongside the latest build of LWJGL (0.95 alpha) and it appears to have solved the problem, although as my simulation is a bit unstable its hard to tell, but it seems to run a lot faster.
Also I will need to rewrite my input commands to use the LWJGL ones…but I dont see that as a big problem.

For those interested…the main problem I had compiling (after getting the latest LWJGL) was with the test program Xith3DLineAttributesTest.java which seemed to be using a method of the Keyboard class that couldnt be found (although LWJGL Javadocs says it exists). Seeing as it was unrequired i just didn’t compile it.

Yes, sorry about that - Elias removed the enableBuffer() method from Keyboard as it is now always enabled.

Cas :slight_smile:

do you have polled input still?

It will be nice when the LWJGL API stabalises!

Regarding Xith3d/LWJGL, I need to do a new release with the updated packages, my apologies. Until then you will need to compile it from CVS as you are now.

Will.

[quote]I do have an ATI Radeon so it is possible that the problem is to do with that.

I tried it with LWJGL (Just changing the import …render.lwjgl.*) but I get the error:

java.nio.BufferOverflowException at org.lwjgl.opengl.BufferChecks.checkBuffer(BufferChecks.java:69) at org.lwjgl.opengl.GL11.glLoadMatrix(GL11.java:1089) at com.xith3d.render.lwjgl.CanvasPeerImpl.setGLViewMatrix(CanvasPeerImpl.java:507) at com.xith3d.render.lwjgl.CanvasPeerImpl.setView(CanvasPeerImpl.java:488) at com.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:912) at com.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1050) at com.xith3d.scenegraph.View.renderOnce(View.java:590) at com.xith3d.scenegraph.View.renderOnce(View.java:523) at uk.ac.ed.s0199188.BlimpSim.BlimpSim.render(BlimpSim.java:396) at uk.ac.ed.s0199188.BlimpSim.BlimpSim.main(BlimpSim.java:418)

I read in an old thread about buffer rewinding…but there was no indication of where these buffers could be found.

In a slightly realted topic…I notice that LWJGL has progressed several version since the one available from the Xith site. I don’t intend to try using the newer version, but I was wondering how rapid the Xith development team is in updating (indications would be not much recently). I am not particularly bothered about being up-to-date, as long as I can do what I need to do just now.
[/quote]
The latest community build fixes this problem.

Will.

I’m having a similar porblem to the one mentioned at the top of this thread. To restate, the window displays the correct image, but it doesn’t repaint nearly as often as it should. I even have a counter inside the loop that calls the paint function (view.renderOnce) that is displaying values that should be relatively correct (they seem to be indicating reasonable framerate).

I’m not using ODE, so that’s not the issue. Also, I’ve tried several JOGL demos that don’t use Xith, so that’s not the problem. Several friends have tried it, and it has run just fine on their machines. The cause appears to be the ATI radeon graphics card that I have (spefically, a Radeon 9200SE). I have the newest drivers, so I’m pretty sure that’s not the problem. Any suggestions?