I’ve never used ode modules but now I help a friend to build a experimental multitouch audio sequenzer interface for his diploma (have a look here). what we wanna do is to drop a ball onto a deformed funnel/mesh (the the attached one). that ball should roll and act like a ‘normal’ one in ‘real’ world. … I played a little with dikis sandkasten patch and would really like to use the ode modules for the project. Then I looked at the ode modules but only found primitives like cylinder/plane … now I’m afraid that it is not possible to use the wonderful ode modules for my task. Maybe anybody of the guys around which already used the ode modules can answer my question (tonfilm diki??). … maybe it’s even not possible in vvvv to archive the goal without be a math genius!?
would be nice if anybody out there could help me a little and give me some starting points.
no math genius here, but two workarounds i can think of:
do not use use the ode. instead, use Intersect (3D Mesh Ray) and cast a ray from the position of the ball downwards into the mesh. use the face index to grab the normal vector from the mesh (as seen here). you can then use that vector to calculate a reflection vector - which is done here - (in case of the ball hitting the ground fast, like a flummi) or a direction vector (in case of the ball rolling over the ground) whenever the intersect node tells you that the ball is hitting the mesh.
use a big spread of Box (ODE) s to recreate the surface of your mesh; perhaps most easily done using one of @dottores surface constrains as seen here.
did some first tests with dottores surface constrains - this way seems heavy cpu consuming, maybe I have to think about a different solution. I also think that the multitouch tracking should run on a different computer because of cpu dropouts.
did some further test with dottoes surface constrain and mapping of ode StaticBoxes. Still heavy cpu consuming (40x40 staticboxes for mesh collision detection) but now gets some better results. now I’m trying to optimize the whole thing but most of the ode parameters are undocumented - I even can’t find them on the of ode docu - for an example: what means “density”, “time Step”, “Steps”, “Disable Stills” …