Modelling foam - calling all ace coders

Blitz3D Forums/Blitz3D Programming/Modelling foam - calling all ace coders

Hi all

Playing with the idea of foam - how it moves/expands/sticks to stuff. Would like to model it in my game, but also think it would be a great addition to the code library.

Spent some time last night using spheres with collision radi - but for the number of spheres needed, it's just too slow.

The other idea that comes to mind is to use a heavily subdivided mesh that conforms/covers the area where the foam will be contained. The foam 'balls' use the vertices of the mesh as 'waypoints'- with code that 'flows' the balls between the vertices.

Haven't come up with an idea for the 'flow' code though?

Any ideas?