• Home
  • Products
    • Game Engine
      • Base
      • Mathematics
      • Geometry
      • Physics
      • Particles
      • Animation
      • Graphics
      • Game
      • Game UI
    • Windows Forms
      • Docking Windows
      • Text Editor Control
  • Downloads
  • Buy
    • Overview
    • Professional
    • Indie
    • Non-Commercial
  • Support
    • Overview
    • Blog
    • Forum
    • License FAQ
    • Documentation
  • About
    • About Us
      • Services
    • Contact Us
    • Press
    • Legal Terms
      • Imprint (English)
      • Imprint (German)
Select the search type
 
  • Site
  • Web
Search
DigitalRune.com
Login |Register
NEWS News RSS Feed BLOG Blog RSS Feed FORUM News RSS Feed DOCUMENTATION DigitalRune Software on YouTube DigitalRune Software on Twitter
You are here: SupportForum

If you want to contribute to the forum discussions, please Register or Login.

SearchHome
  • 1
  • 2
  • 3
  • 4
  • 5
HomeHomeDigitalRune Sof...DigitalRune Sof...Game EngineGame EngineTransforming Kinect coordinates to Character Model?Transforming Kinect coordinates to Character Model?
Previous
 
Next
New Post
2/20/2012 10:08 AM
 
HelmutG
6th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 565
Re: Transforming Kinect coordinates to Character Model? 
digitalsummer07 wrote:

I would like my model to appear in a standing position with the feet stepping on the ground, 'cause everytime I load the program it happened to be the half of the model's body only displayed. Is it something that can be easily fixed?

Yes. The models position is determined by the pelvis body of the ragdoll. If you don't have any Kinect data yet, then the pelvis body is probably positioned at position 0 = on the floor. You have to position the pelvis body manually until Kinect data arrives. 

digitalsummer07 wrote:

Another concern though, I already have my model manipulate the user's action but it seems that the shoulders not rasing to the extent, eventhough in the skeleton displayed on the right portion of the program the shoulders together with the hands were extend upwards my model only moves his forearms, and hands but not reaching the same level as compared to the skeleton.

Visualize the skeleton of the model and compare it to the Kinect skeleton (which is already visualized). If the model skeleton is different from the Kinect skeleton, then you might have to apply a scale to either the Kinect skeleton or your model's skeleton. Maybe it helps to attach the "Marionette joints" to other parts of the skeleton. Or maybe you need to tweak the joint settings (e.g. MaxForce).

If your skeleton is very, very different from the Kinect skeleton, then it might be better to map the Kinect skeleton to the model skeleton using the SkeletonMapper class (see skeleton mapping sample in the CharacterAnimationSample solution).

 
New Post
2/21/2012 1:53 AM
 
digitalsummer07
No Ranking

Joined: 2/13/2012
Posts: 21
Re: Transforming Kinect coordinates to Character Model?  Modified By digitalsummer07  on 2/21/2012 6:42:22 AM
HelmutG wrote:
digitalsummer07 wrote:

I would like my model to appear in a standing position with the feet stepping on the ground, 'cause everytime I load the program it happened to be the half of the model's body only displayed. Is it something that can be easily fixed?

Yes. The models position is determined by the pelvis body of the ragdoll. If you don't have any Kinect data yet, then the pelvis body is probably positioned at position 0 = on the floor. You have to position the pelvis body manually until Kinect data arrives. 

digitalsummer07 wrote:

Another concern though, I already have my model manipulate the user's action but it seems that the shoulders not rasing to the extent, eventhough in the skeleton displayed on the right portion of the program the shoulders together with the hands were extend upwards my model only moves his forearms, and hands but not reaching the same level as compared to the skeleton.

Visualize the skeleton of the model and compare it to the Kinect skeleton (which is already visualized). If the model skeleton is different from the Kinect skeleton, then you might have to apply a scale to either the Kinect skeleton or your model's skeleton. Maybe it helps to attach the "Marionette joints" to other parts of the skeleton. Or maybe you need to tweak the joint settings (e.g. MaxForce).

If your skeleton is very, very different from the Kinect skeleton, then it might be better to map the Kinect skeleton to the model skeleton using the SkeletonMapper class (see skeleton mapping sample in the CharacterAnimationSample solution).

Thanks again for the reply..

You said that I need to position the pelvis body manually to position the model above the ground. I thought of replacing this value instead of 0 to other values:

var newPose = new Pose(_kinectSkeletonPose.GetBonePoseAbsolute(0).Translation) * new Pose(_ragdollSkeletonPose.Skeleton.GetBindPoseRelative(1).Rotation.Inverse);

Am I on the right track on this?

Also, how can I set the position of the model joints on the center so that it won't overlap to the kinect joints? 

Also, the lower joints like the knees, leg joints doesn't go along with the skeleton as well. How can the marionette approach help?

Thanks a bunch :)

 
New Post
2/21/2012 3:30 PM
 
HelmutG
6th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 565
Re: Transforming Kinect coordinates to Character Model? 
digitalsummer07 wrote:

You said that I need to position the pelvis body manually to position the model above the ground. I thought of replacing this value instead of 0 to other values:

var newPose = new Pose(_kinectSkeletonPose.GetBonePoseAbsolute(0).Translation) * new Pose(_ragdollSkeletonPose.Skeleton.GetBindPoseRelative(1).Rotation.Inverse);

Am I on the right track on this?

Actually, I did not understand this line of code ;-). The pose of a body is given in world space, so something like this should work:

newPose = new Pose(oldPose.Position + new Vector3F(0, 1, 0), oldPose.Orientation)

digitalsummer07 wrote:

Also, how can I set the position of the model joints on the center so that it won't overlap to the kinect joints? 

Sorry, I don't understand this question.

digitalsummer07 wrote:

Also, the lower joints like the knees, leg joints doesn't go along with the skeleton as well. How can the marionette approach help?  

You need to create a custom ragdoll for your model with custom shapes, joints and limits. (see this article for example: http://www.digitalrune.com/Support/Bl...)

 
New Post
2/22/2012 3:59 AM
 
digitalsummer07
No Ranking

Joined: 2/13/2012
Posts: 21
Re: Transforming Kinect coordinates to Character Model? 

Hi,

I tried your code newPose = new Pose(oldPose.Position + new Vector3F(0, 1, 0), oldPose.Orientation) and the model is already positioned on the ground at start up, however, when the user has been detected by the kinect the model went up for about 2-inches difference. Where can I adjust that on the detection of the user the model will still be positioned the way it was positioned by default?

Thank you so much.

 
New Post
2/23/2012 8:36 AM
 
HelmutG
6th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 565
Re: Transforming Kinect coordinates to Character Model? 
In OnSkeletonFrameReady, there is a hardcoded y offset. Maybe you need to tune this value.
 
New Post
2/23/2012 8:56 AM
 
digitalsummer07
No Ranking

Joined: 2/13/2012
Posts: 21
Re: Transforming Kinect coordinates to Character Model?  Modified By digitalsummer07  on 2/23/2012 10:32:04 AM

Hi,

Thanks for the reply. I think I already positioned the model on the ground after the user has been detected.

Also you said that I need to create a custom ragdoll for your model with custom shapes, joints and limits. (see this article for example:http://www.digitalrune.com/Support/Bl...), Can I just reuse the Ragdoll of Dude? I tried to copy the bones and have my model skinned just as the same of Dude's. However several movements are not perfectly executed by the model once the user interacts with the model already.

Also, during runtime my model goes shaky . And yes there is a difference between the movement of the kinect skeleton and the model skeleton :( Where do I find the settings of this? 

Thanks.

 
New Post
2/23/2012 9:51 AM
 
HelmutG
6th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 565
Re: Transforming Kinect coordinates to Character Model? 

If the skeleton of your model is exactly the same as the Dude's skeleton, then you can reuse the ragdoll. Otherwise, it depends. I cannot answer this question for you.  

A difference in the skeleton movement or shaking ragdolls can have many reasons. Have you worked through our physics and ragdoll samples and the mentioned article? (I think you need tackle this problem step by step and practice the basics first.)

 
New Post
2/24/2012 10:12 AM
 
digitalsummer07
No Ranking

Joined: 2/13/2012
Posts: 21
Re: Transforming Kinect coordinates to Character Model?  Modified By digitalsummer07  on 2/27/2012 6:38:00 AM

Hi,

With the time that should be spent in making ragdolls, I think I'll just reuse Dude's skeleton.
Another question though, during runtime the default position of Jollibee's legs are crossed. It's like forming an X position. Where can I also adjust the rotations of the joints since the arm looked like pointing at the back part of the scene..

Can this be fixed?

Also, is it possible that after the user detected by the kinect was lost it will return to its original position? Where can I modify the code for this?

Thanks a bunch :)

 
New Post
2/27/2012 10:48 AM
 
HelmutG
6th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 565
Re: Transforming Kinect coordinates to Character Model? 

Do the bones in your model have the same orientations as the bones in the dude model? To find out you can compare the dude model with your model in your 3d modelling tool. Or you can visualize the bones with SkeletonHelper.DrawBones() in the XNA sample. SkeletonHelper.DrawBones() draws three lines (red, green and blue) to visualize the coordinate system of each bone. If you reuse the dude ragdoll, the bones in the dude model and in your model must use the same orientations.

To return to the original position. I am sure there are several ways to achieve this. One idea: When the model is in its default pose, remember the positions of the model bones which are controlled by the marionette joints. Later when the player was lost by Kinect, manually set the bones of the _kinectSkeletonPose which control the marionette joints to the default positions that you have stored before.

 
New Post
2/28/2012 5:57 AM
 
digitalsummer07
No Ranking

Joined: 2/13/2012
Posts: 21
Re: Transforming Kinect coordinates to Character Model?  Modified By digitalsummer07  on 2/28/2012 7:00:04 AM
HelmutG wrote:

Do the bones in your model have the same orientations as the bones in the dude model? To find out you can compare the dude model with your model in your 3d modelling tool. Or you can visualize the bones with SkeletonHelper.DrawBones() in the XNA sample. SkeletonHelper.DrawBones() draws three lines (red, green and blue) to visualize the coordinate system of each bone. If you reuse the dude ragdoll, the bones in the dude model and in your model must use the same orientations.

To return to the original position. I am sure there are several ways to achieve this. One idea: When the model is in its default pose, remember the positions of the model bones which are controlled by the marionette joints. Later when the player was lost by Kinect, manually set the bones of the _kinectSkeletonPose which control the marionette joints to the default positions that you have stored before.


Do I need to create another method that checks if the kinect has no user detected to have the model go back to its default position? Or it's just a line of code I need to add in one of the methods in the class? thanks :)

 
 Page 4 of 6
Previous123456Next 
Previous
 
Next
HomeHomeDigitalRune Sof...DigitalRune Sof...Game EngineGame EngineTransforming Kinect coordinates to Character Model?Transforming Kinect coordinates to Character Model?


DigitalRune is a trademark of Garstenauer Information Technology OG.

Garstenauer Information Technology OG
Weingartenstrasse 35, 4452 Ternberg
Austria (EUROPE)
office@digitalrune.com

Home Products Downloads Buy Support About Us
Game Engine Particles Windows Forms Professional Blog Services
Base Animation Docking Windows Indie Forum Contact Us
Mathematics Graphics Text Editor Control Non-Commercial License FAQ Press (News)
Geometry Game Documentation Legal Terms
Physics Game UI Imprint
Impressum
Copyright © 2006-2012 Garstenauer Information Technology OG Terms Of UsePrivacy Statement