Contour + Box2d

hello all,

i’m working on a shape tracking + physics patch
and i’m stuck… :)

in fact when i saw this video

Box2d + contour
i thought it was possible to do similar things in vvvv
since we’ve these two nodes in vvvv…

the vvvv Box2d plugin need to be initialized to refresh the contour shape changes…but when sending a reset bang to the WorldNode the whole scene is affected…

perhaps it’s not the good approach
what about the ODEGeos or any other method?


MovingContour+box2D.v4p (38.1 kB)


this is right for the moment there is no node to “destroy” a bdy from the world without need for reset.

This will be on the next release as there are a few issues to take into account when doing that (making sure a destroyed body is not used in another node afterwards).

For contours, the polygon node must be convex and have a maximum of 8 vertices (box2d specification), so in order to create a complex shape, you need to triangulate that. You can look at “ear clipping” algorithms to achieve that.

One interesting feature in box2d are static edges (not implemented yet as it’s quite a complex one), which i think in your case would definitely the best option. Hope will have that one at some point.

Hope that helps

hi vvvvux,
thanks for the explanations…
need to investigate in an another method (attractor + fake gravity!)
until the next release
take care

hi circuitb,
recently i’ve done something similar you need using ode. i created the scene with 3d objects (like planes for the borders) and then i used the points of contour to generate some 3dballs (for collisions). Then i put the camera very distant with a large amount of zoom, just for “flatting” the scene. is not perfect but it works.

thanks for the tip screamer,

i’ll try to create 3d objects on the contour shape
and see what happen :)

EdgeChain (Box2d)
oh yeah baby!
many thanks to vux!!!

hello there, yesterday i was trying screamer solution, but didnt know how to correctly avoid the third dimension. i was creating boxes for the borders, but sometimes the objects cross the borders and fly away in the third dimension. sounds funny, but how can i avoid this ?