简体   繁体   English

将动画从Kinect加载到Unity3D中

[英]Loading Animation from Kinect into Unity3D

I am designing a program that records the raw joint/jointPoint data for each body in each frame from the Kinect One sensor using the Kinect V2 SDK. 我正在设计一个程序,该程序使用Kinect V2 SDK从Kinect One传感器记录每一帧中每个身体的原始关节/关节点数据。 Now, I need to take the joint data, create the bodies from it, and be able to play it as an animation in Unity3D. 现在,我需要获取关节数据,从中创建实体,并能够在Unity3D中将其作为动画播放。 Any ideas as to how I should go about doing this? 关于我应该如何做的任何想法? I've looked into creating a FBX file from the data but this seems overly complicated. 我已经研究过根据数据创建FBX文件,但这似乎过于复杂。

Kinect MS SDK in Unity Asset Store You can use the sdk provided in the link to get bone data on the run for each frame. Unity Asset Store中的Kinect MS SDK您可以使用链接中提供的sdk来获取运行中每一帧的骨骼数据。 It has a lot of example code and scene. 它有很多示例代码和场景。 You can then smooth the positions and rotations optionally. 然后,您可以选择平滑位置和旋转。 When you are done with acquiring and smoothing the data, you should have a list of keyframe data. 完成数据获取和平滑处理后,您应该具有关键帧数据列表。 You can use that to create a Unity AnimationClip. 您可以使用它来创建Unity AnimationClip。 If you want to do it the hard way and have more control over the data, you can create your own animation class and update the body transforms with the code you write. 如果您想用困难的方式来做,并且对数据有更多的控制权,则可以创建自己的动画类,并使用编写的代码更新身体变形。 This was how I have done it before but I dont suggest it. 这就是我以前做过的方式,但我不建议这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM