I have a problem with jBullet. When I run the Hello Physics Tutorial with the BulletAppState.ThreadingType.PARALLEL my processor load is really low, while around 800-1000 bricks (arranged like a hill) are rendered, but the fps are going down (it has nothing to do with my graphic board, because I use a NVIDIA GeForce GTX 680). Do you have any idea how I could solve this problem or is it only a problem in the settings of my JRE?
So its most probably the rendering and not the physics.
I thought that the rendering and the physics have their own threads and so there should´t be such a problem. Also I tested Hello Physics Tutorial without any added Geometries and got the same results. How many Threads are opened, when I use BulletAppState.ThreadingType.PARALLEL, because in my case I need 8 for my processor.
You can’t just open more threads to have more performance for one physics space and you also cannot increase the rendering performance with more threads. Also unless you want to do a brick stacking game this isn’t really a realistic setting for an application or game I guess. You shouldn’t render 1000 separate geometries as bricks at all in a real game.
But how can I tell the JME to use all my processor cores for the jBullet-Physics? When my fps are going down and are around 5, my processor load is around 15%.
<cite>@javafriend said:</cite> But how can I tell the JME to use all my processor cores for the jBullet-Physics? When my fps are going down and are around 5, my processor load is around 15%.As I said, you have a misconception there, just throwing cores at an algorithm doesn't make it faster. There is limited multithreading support for one physics space in native bullet but the physics reacts and looks different. Also you are going the wrong way, you should optimize your own code. Again, ask the question what it is that you want to do and then take apart the problem. Read the wiki on how to concept a game and physics use in general, we have lots of information there.