Box2d - Body Limits to 1024?

Hi VVVVers,
I need help!

While working with box2d I noticed that there’s a 1024 limit on number of bodies you can play with…

I found this limitation very annoying because the performance are quite fast even with 1024 bodies, and I need more than those to simulate a sand bottle animation.

Here http://www.blitzbasic.com/Community/posts.php?topic=94264 I see that someone is playng with more than 4000 bodies.

Any workaround for this?
Or other technique to have collision like this?

Attached patch.

Thanks
robe

sand.v4p (32.0 kB)

Hi Vux,
Hi anyone who can help me.
Hi everyone who’s interested.

I can’t find any “b2Settings.h” in VVVVgit \vvvv45\addonpack\src\nodes\plugins\2d\Box2d

But I found in vvvv-sdk-develop\vvvv45\addonpack\src\nodes\plugins\2d\Box2d\Box2dNodes\Nodes:
b2_maxProxies” in a commented for loop in Box2dCreateBodyNode.cpp and in a commented if statement in Box2dCreateShapeNode.cpp.

::Is there a way to set the maximum number of bodies to for example 300000::
::and would this be evaluable by the Box2d Engine (not realtime)?::

Do you know other techniques to achieve something like the previous attached patch?

@Vux: I know you’re busy with the brand new DirectX 11 features (I’m watching the new tutorial right now)…
…If you find time to help me on this would be VVVVery much appreciated!

Cheers
robe

Yeah that’s right, I think default is 512 and I already increased to 1024.

I could increase to more, it’s just change a value and recompile, I’ll maybe post dll here so can be tested (hopefully at some point will have time to port to latest box2d which had no limit at all).

Here is a build with 4096 limit instead, please try )

Box2dNodes.zip (161.4 kB)

Tnx Vux!
I tried to do it by my self, but I wasted lot of time configuring VCstudio express and so on.

I tryed the new .dll:
Even with 4096 little bodies my frame rate is around 25fps.
And I need really to fill the screen and make a NRT rendering.

Could you recompile with 65536 limit?

In those days I will try to recompile it by myself again…
My problem is that I don’t know how to let the builder understand what is VVVV and V1 namespace, but this is another topic :) I’m studing.

Tnx Again a lot
robe

PS: What version of Bullet have you ported?