Physics lib
BlitzMax Forums/BlitzMax Programming/Physics lib
| ||
lo, ive started working on a phys lib for max (free) er its setup to be used for 3d or 2d, its using a standard verlet method, and heres a lil lil test exe just to check for any probs early on! http://legion.gibbering.net/cyanidenights/files/maxphys.rar just a simple er shape really, move with the mouse, should work fine... nehow (gets back to code) edit: sample updated, crate on a stretchy rope:) |
| ||
Very nice ! :) but easy to use ? |
| ||
very easy to use, its all object based. heres the setup code for the first sample i posted (not the current one)Local Physics_Obj:Photon_Physics_Lib = New Photon_Physics_Lib Local tmpparticle:Photon_Physics_Particle[7] tmpparticle[0] = Physics_Obj.AddParticle([200.0,100.0,0.0]) tmpparticle[1] = Physics_Obj.AddParticle([250.0,100.0,0.0]) tmpparticle[2] = Physics_Obj.AddParticle([250.0,150.0,0.0]) tmpparticle[3] = Physics_Obj.AddParticle([200.0,150.0,0.0]) tmpparticle[4] = Physics_Obj.AddParticle([200.0,200.0,0.0]) tmpparticle[5] = Physics_Obj.AddParticle([200.0,250.0,0.0]) tmpparticle[6] = Physics_Obj.AddParticle([200.0,300.0,0.0]) Physics_Obj.AddConstraint([tmpparticle[0],tmpparticle[1]]) Physics_Obj.AddConstraint([tmpparticle[1],tmpparticle[2]]) Physics_Obj.AddConstraint([tmpparticle[2],tmpparticle[3]]) Physics_Obj.AddConstraint([tmpparticle[3],tmpparticle[0]]) Physics_Obj.AddConstraint([tmpparticle[0],tmpparticle[2]]) Physics_Obj.AddConstraint([tmpparticle[1],tmpparticle[3]]) Physics_Obj.AddConstraint([tmpparticle[3],tmpparticle[4]]) Physics_Obj.AddConstraint([tmpparticle[4],tmpparticle[5]]) Physics_Obj.AddConstraint([tmpparticle[5],tmpparticle[6]]) then just call Physics_Obj.Update() in the main loop edit: there is also now another option in the AddConstraint that enables you to make softbodies and all kinda squishy maddness. |
| ||
Very slick demo there, how fast is it btw? No computing time in millisecs shown onscreen in the provided demo. |
| ||
Nice Demo, but I think there is something missing, like... friction. If you let the cube-thingy fall on the ground, it won't stop slipping around. Will you Lib include pixelperfect Collision-response? That would be great =) |
| ||
I can't wait !! :) |
| ||
I like it. |
| ||
awsome, cant wait for this ! |
| ||
@DocFritz - friction is now in too:) will upload a nicer demo tonight at some point (got the gfs relatives around tonight n tomorrow so might be sometime tomorrow evening at latest) |
| ||
Whoa, this looks nice. |
| ||
Impressive! |
| ||
i like a lot. wish the forums had a feature to track threads . :/ Oh well gues I will have to drag a shortcut to this thread to my desktop.. |
| ||
lo, quick update exe with collin aka the Mr Ragdoll man, this is a sample of using the system in 3d (the demo is draw in 2d thou) but it shows collin spinning around and cool stuff:) windows version: http://legion.gibbering.net/cyanidenights/files/maxphysrag.rar linux version: http://legion.gibbering.net/cyanidenights/files/maxphysrag.zip leftmouse button toggles snap |
| ||
@{cYanide} Are you good at algorithms? I've read the new paper on softbodies from one of the Novodex guys and the concept seems easy, the problem is I don't have a clue on how to translate the algorithms into ordinary code. Check it out, it's awesome. http://www.matthiasmueller.info/ The paper is called 'Meshless Deformations Based on Shape Matching' |
| ||
Awsome, something like this will come in handy ;) keep it up dude :D |
| ||
@ Sweenie: you can already do some softbody things (eg the things in bouncers nano demo... that kinda stuff), but i will have a read of the paper thou |
| ||
hey er i made a lil forum im gonna be posting more samples and diff versions of the module as i progress. link is in my sig (better then me spamming the forums here) it also doubles for a general programming forum, so feel free to use edit: the whole db sys on the server i use seems to have just died, er so it should be back soon i hope |
| ||
you can already do some softbody things (eg the things in bouncers nano demo... that kinda stuff) Yes, i'm aware of that. I have fiddled with the verlet method before. What's so amazing with the new method is that it doesn't depend on the user to set up distance constraints. It simply takes any pointcloud and strive to keep that shape at all times. By adjusting an alpha value you can control how fast it returns to that original shape. An alphavalue of 0.1 makes the object very squishy and bendy while an Alphavalue of 1.0 makes the shape almost completely rigid. And this method is very very stable as well. According to the author it can handle extreme stress without exploding. The basic method is as following(if I understood the paper correctly). You have 2 lists of points(particles). One list keeps the original position of the particles and the other list keeps the moving particles. After one iteration you use the shapematching algorithm to position and orient the original shape based on the positions of the moved particles. After the shapematching step, you translate the moving particles towards the points in the transformed original shape, using the alphavalue to control if the points should move to their goalpoints in one step or not. Sorry if I hijacked your thread. :/ |
| ||
no worries, :D |
| ||
This is looking hot! Cant wait to fiddle around with it. The Mr Ragdoll Man makes me think of three words: Alien Abduction Game. Thatd be hot to swoop a guy up into a UFO with those physics. :) Arms all flailin'.....legs all twisted....gettin the probe....oops did I type that out loud? |
| ||
Any new from this ? |
| ||
im making some examples and docs at the moment:) |
| ||
looking forward :) |
| ||
Coolz ! |
| ||
Wow this is the shiz, any chance your gonna work on a 3D physics library after this? :D |
| ||
actually it should work in 3d already, erm will do a demo in 3d soon, (its currently in pre-release testing/fixing/etc mode with a few peeps) |
| ||
This sounds great! At the risk of getting told off for posting the same idea in multiple threads, would it be possible to use this to handle the ball physics of a pool/snooker game? In particular the effect of applying Back/Top/Side spin to the cue ball? |
| ||
Nice. (Jfk)When uh, are uh, you releasing it uh, to the uh publich. uh. uh. Uh did you guys see a lens flash? Edit- No wait, that's columbo.... |
| ||
Any news about this lib ? :) |
| ||
I tried several times to register on your forums cyan but couldn't. Any more news on this? |
| ||
Seem no :) |
| ||
I've got the lib and it works great. |
| ||
Only download from the Cyanide forum ? |
| ||
Yeah I cant register either! Cyanide! Help us out eh? ;) |
| ||
I cant register too. |
| ||
well it is only for testers atm. |
| ||
And of course we cannot be testers! |
| ||
Heh...he wrote it, he can decide who tests and who doesn't. |