Automatic ConvexHull-generation in a RagDoll :D

walaber

05-03-2006 07:15:41

just wanted to share with everyone that I have modified the Ragdoll.h / .cpp that I am using for my Trampoline game (was the same as the ragdoll demo that comes with OgreNewt), to now allow for automatic convex hull generation from the vertices assigned to each bone.

the system still uses the same file format as before, but instead of specifying a shape and size, you can just ask for a "hull", and it creates a convex hull from the verts! you also give it a minimum weight value, and it only adds verts to the hull with a weight above the threshold.

it's working perfectly, here is a screenshot of my trampoline game with a new hull-ified ragdoll :D



I will add this to the Ragdoll demo in OgreNewt, possibly with 2 different .rag files to show how to use it.... when I get a chance! ;)

HexiDave

05-03-2006 14:49:46

I think my brain just exploded.

You are my hero.

walaber

06-03-2006 07:58:39

okay, the CVS version of OgreNewt has been updated with this new functionality.

in the ragdoll demo, press "1" to spawn the old, primitive-based doll, and press "2" to spawn the new hull-based doll. pressing either "1" or "2" again resets the model.

I will try and update the download on my website as well.....
[edit] done. [/edit]

DarkCoder

07-03-2006 15:36:15

Wow, Thats great!

posixninja

26-05-2006 13:15:21

I've gotten the demo to compile, but it's crashing when I try the convex hull ragdoll, i'm using current CVS of ogrenewt and ogre dagon with newton 1.53, any idea's?

walaber

26-05-2006 16:13:59

no... it should work... I will confirm that it works with 1.53 tonight.

posixninja

27-05-2006 04:56:24

the primative based ragdoll works great, as well as the rest of the demos, it's just when I hit 2 and the convex hull based doll begins to fall it crashes somewhere in newton.dll (stack is too mangled to know where) no errors in ogre.log at all. did you have any luck?

walaber

27-05-2006 08:20:56

runs fine here...

SFAOK

13-06-2006 16:30:21

Is there a way of getting the hull to scale to a specific value? For example say the scale of my object imported directly from 3DS was 1, how would I scale the Ogre object to 0.05, and have the ragdoll hull mesh do the same?