bitmap shape

Hi,

I am developer in Wormux Team . We decided to use Box2D to replace our old home made physical engine. However, in Wormux, the map is based on a bitmap and there is no shape existing for simulate collision with bitmap in box2d. For moment, we generate polygones to represent map (see attached file) but the map need a lot of polygone and lot of memory.

Do you think that a Bitmap Shape could be add in Box2D in a future version ?
http://en.nicoptere.net/?p=10
also viewtopic.php?f=8&t=463
It is unlikely that a bitmap shape will be added to Box2D. However, as makc suggested, there are more efficient methods of using polygons. You may also be interested in edge shapes, which are in Box2D's SVN now:
viewtopic.php?f=3&t=1577
Considering you are likely to blow chunks out of the scenery with high frequency, and your input is in bitmap form, I'm not so sure polygon tessellation is definitely better than the setup you've got at the moment (quadtrees). They've both got considerable advantages and disadvantages. Perhaps some hybrid approach where you still split up into boxes as before, but then fit each box to the landscape e.g. marching cubes styles, so you have smooth surfaces for box2d to work with.
As a bonus, seeing as you've already got a quadtree, you may want to write your own broadphase to take advantage of it (Box2D's broadphase is a pluggable component).

But yeah, there won't ever be a bitmap shape, it conflicts too much with the way the engine is set up. There have been a few suggestions in the past over how to hack it in, though, you might have better luck with that.

In other words, you have some tough design issues ahead of you, imho.

Original thread: https://box2d.org/forum/viewtopic.php?t=1829