Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Need of Ragdoll in DarkGDK application

Author
Message
Sharp Bullet
11
Years of Service
User Offline
Joined: 5th Feb 2008
Location: Pluto
Posted: 7th May 2012 10:51
Who can give me a quick tip (or some samples) about how to implement a ragdoll system with ODE (or some other physics engine) for skinned meshes?

I'm trying to create an application that uses Kinect and controls the ragdoll by the detected skeletal position.

First say to yourself what you would be; and then do what you have to do.
Matty H
10
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 7th May 2012 12:59 Edited at: 7th May 2012 13:03
I have just achieved this very thing with PhysX, it was not easy, mostly because there is a lack of information about how to do something like this with GDK/DBPro.

Lee from TGC emailed me some code showing how they did it with ODE for FPSC. I have just emailed him and asked if I can post it here, I'm pretty sure I can, it may even be available online anyway with the rest of the DBPro source. I will post it as soon as he gets back to me.

In the mean time here are some pointers:

1. There is no way of getting bone dimensions, you need to loop through the bone vertices and make a box/sphere shape using that information.

2. You can get/set bone information like this:


3. The matrix math can get complicated, what I do is reset the model to 0,0,0 rotation and position when updating with physics. This is because physics returns this data in world coordinates and you don't want GDK adding more rotation/position when updating.


That might get you started, your other option is to use my Physics plugin(Dark Dynamix) although this feature will be added in a few weeks.

EDIT: After reading your post again I would not think you would need a physics engine for this, the above pointers should still help you though

Matty H
10
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 7th May 2012 15:41
I have attached the code Lee sent me, it takes a while taking it apart but there is some good stuff in there.

Hope it helps.

Attachments

Login to view attachments
Sharp Bullet
11
Years of Service
User Offline
Joined: 5th Feb 2008
Location: Pluto
Posted: 11th May 2012 12:19
Sorry for the late post but I've been working on the project and I had some hard time. In the end all was a success!

Your first post explained everything that I needed.

And the attach is basically part of the DarkGDK & Dark Basic open source project.


Thanks a lot!
Cheers!

First say to yourself what you would be; and then do what you have to do.
Matty H
10
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 11th May 2012 15:55
Glad you got it working, sounds like an interesting project. Hopefully you will get time to post a WIP or a video when you feel you are ready.

Eccentric Developer
7
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 3rd Jun 2012 19:33
Hmmm... I think now I'll give kinect a try; Not for the games, but rather for a cheap way to animate 3D models.... Hmmm...

Login to post a reply

Server time is: 2019-08-22 06:04:59
Your offset time is: 2019-08-22 06:04:59