Tokamak: Popcorn Machine Convex Hulls?

Blitz3D Forums/Blitz3D Userlibs/Tokamak: Popcorn Machine Convex Hulls?

Picklesworth(Posted 2006) [#1]
I'm still working on establishing decent stability and graphics quality with this project here:
http://www.blitzbasic.com/Community/posts.php?topic=56792

One recent decision was to use more rounded objects as the platforms... they are now flattened half spheres allowing for lighting effects to actually look nice.

The obvious physics problems are being dealt with by generating convex hulls for each platform when a level loads. Since convex hulls seem to be limited to 255 faces and edges, I have created a low poly version of my platform mesh to use for physics.

This approach works up until the simulation is run.
The objects are clearly colliding properly -- they (theoretically) run along the platform in a convincing manner in terms of collisions. (Much better than before, too).

However: The physics are now behaving VERY poorly.
Sometimes boxes will fall through the convex hulls, other times the platforms will shake uncontrollably, and objects on top of the platforms will jump around like popcorn. (Hence the crappy thread title).
This problem occurs even if the convex hulls are based on very simple, flat objects.

Adjusting the substep value in TokSim_Advance does not seem to help.


Has anyone else encountered / overcome issues with convex hulls being really unstable?
Is there another 3d physics engine I could use which supports half spheres (specifically shaped spheres are fine) or convex hulls? (I don't need anything complicated -- just box -> platform collision with reasonably realistic reactions).
I suppose a verlet engine would work well... Please, Bouncer?? I'll give you a free shipment of printer paper!



Edit:
Looks like the download in that old thread was removed.
For an example of what I am working on, here is a download of the old version: http://crumbsoftware.f2o.org/files/zsortproblem.zip (Sorry about the z-sort problem!).

The build with today's problem. Ignore the gfx troubles.
http://crumbsoftware.f2o.org/files/PlatformTest_05_12_06.zip
Sorry about the subliminal messages there, btw... Check out my custom window title on cmd.exe done with the RunProgram DLL! (I hope I didn't release it like that...) :P



Edit Again:
I'm considering Newton Game Dynamics now, which appears to do convex hulls and also runs more smoothly than Tokamak.
Shouldn't be too much of a pain to wrap compared to the others; someone has already nearly (or maybe entirely?) got it working in B3d with just a Decls file.
Besides, I don't need to wrap it -- just put the physics modules in there.
Still would be great to have a native Blitz solution, though, since I'm not exactly good with C++.