The kinect sensor for XBOX 360 can detect the position/pose of a person standing in its field of vision.
The mcjKinectServer is a Windows application which can obtain those positions/poses from the kinect.
It can do this at up to 30 frames per second. The poses can be written to file or transmitted to a 'client' application.
The client application, a Daz Studio script, can record this animation and apply it to any Poser/Daz figure.
A $10 Power/USB adapter just like this one is needed to make your XBOX360 Kinect sensor compatible with a PC
Installing the Microsoft Kinect SDK V1.8 Runtime
The mcjKinectServer application is based on the Microsoft Kinect SDK V1.8.
The "Microsoft Kinect SDK V1.8 Runtime" contains drivers for the kinect
and support files needed by mcjKinectServer.
Here, from the very secure official site, you must download and install it
http://www.microsoft.com/en-ca/download/details.aspx?id=40277
Once the SDK-Runtime is installed, if you plug ( or un-plug/replug ) your kinect
Windows will detect your kinect and start installing the drivers that were in the SDK-Runtime
Supported Hardware
The server and client is compatible with the 'old' Kinect sensors which were sold with the XBOX 360 and compatibles
The new Kinect XBOX ONE V2 Sensors are not supported
Supported Operating System
Windows 7, Windows 8, Windows 8.1, Windows Embedded Standard 7
Software Requirements
Before installing the SDK-Runtime, make sure your Windows has
.NET Framework 4.0 or .NET Framework 4.5
Note that Windows Update probably installed this for you, automatically in recent months
Installing the mcjKinectServer001
The mcjKinectServer is a Windows 7, Windows 8 application ( .exe )
You may install it anywhere
example : in C:\Users\YOURUSERNAME\mocap\
example : in C:\Users\YOURUSERNAME\mocap\bin
Installing the mcjKinectClient001
The mcjKinectClient is a script for Daz Studio. ( like a program running inside Daz Studio )
The zip package is found at the bottom of this page
unzip it in a Daz Studio content folder,
typically
C:\Users\YOURUSERNAME\Documents\DAZ 3D\Studio\My Library
or
C:\Program Files\DAZ\Studio\content\
or
C:\Program Files (x86)\DAZ\Studio\content\
or
once installed, it will appear in your Daz Studio content library
My Library\ / Scripts / mcasual
or
Studio / Scripts / mcasual
Using the mcjKinectServer001 in Standalone mode
Running the server in standalone mode, default options
You can run the server in standalone mode ( without Daz Studio ) by double-left-clicking on the mcjKinectServer001.exe file
By default, in this mode, the motion-capture data it thrown away and lost
if you turn on the server's "Auto File" option, the mocap data will be written to a file with a filename corresponding to the current date/time example: 20150113125932.txt
This file will be created in the current working folder. By default this means the same folder as the mcjKinectServer001.exe file.
Running the server in standalone mode command line switches( advanced users )
remember that by default the server sends its output (mocap data) to stdout
piping the mocap data (stdout) to a specific file/location
mcjKinectServer001.exe >> "i:\aoa\mocap\caramelldansen.txt"
setting the mocap data fixed filename
mcjKinectServer001.exe -output:"caramelldansen.txt"
server will write mocap data to a file with a filename corresponding to the current date/time example: 20150113125932.txt
mcjKinectServer001.exe -output:Auto
setting the mocap data output folder
mcjKinectServer001.exe -workdir:"i:\aoa\mocap\"
server will not (also) write mocap data to the stdout stream
mcjKinectServer001.exe -stdout:Off
Using the mcjKinectServer001 under the control of mcjKinectClient001
the mcjKinectClient001 script should be in the Daz Studio Content Library panel under
Daz Studio Format / My Library / Scripts / mcasual
or
Daz Studio Format / Studio / Scripts / mcasual
Run mcjKinectClient001
The following only needs to be done once: click on the "Select Server" button in the Main Options" tab, browse to and select mcjKinectServer001.exe.
Click on the "Start Server" button.
The mcjKinectServer001 options and buttons
if you turn on the server's "Auto File" option, the mocap data will be written to a file with a filename corresponding to the current date/time example: 20150113125932.txt
if you turn on the server's "Delay" option, a 10 second delay will precede the mocap session. The count down starts when the 'Record" button is pressed and the kinect has detected the skeleton.
if you turn on the server's "Seated" option, only the upper torso, arms and neck joints will be tracked.
Use the "Start" and "Stop" buttons to start/stop recording
In this context, "recording" means, writing the motion capture data to a file and/or to the Daz Studio client.
Typical Motion Capture Session
A typical motion capture session would go like this:
- start the mcjKinectClient
- start the mcjKinectServer using the client's 'Start Server' button
The server initiated a 'conversation' with the Kinect sensor
The kinect sensor's red light should now be visible
The moment the kinect and the driver detects a human shape,
you should see a green stickman appear in the server's black screen
- click the client's 'Record' button
- move the server's window aside so it doesn't obscure Daz Studio's viewport
- turn on the server's 'delayed' option
- click the server's 'Start' button
- stand in front of the Kinect
- wait for the delay to elapse
- *** Motion capture session in progress ***
- click the server's 'Stop' button
- close the server window.
- close the client
we recorded the motions using the stickman in Daz Studio's scene
This could be a good time to save the scene to disk in case a crash occurs ( yes it can happen ! )
Motion Previewing
- start the mcjKinectClient
- start the mcjKinectServer using the client's 'Start Server' button
The server initiated a 'conversation' with the Kinect sensor
The kinect sensor's red light should now be visible
The moment the kinect and the driver detects a human shape,
you should see a green stickman appear in the server's black screen
- do not click the client's 'Record' button
- move the server's window aside so it doesn't obscure Daz Studio's viewport
- Click the server's 'Start' button,
the stickman in Daz Studio's scene will start moving.
but the timeline frame will not change ( we didn't click the client's record button )
so we are in a preview mode and not memorizing the poses.
Filling the blanks, The 'Fill Missing Keyframes' button
Sometimes the poses come at the kinect so fast, it cant keep up
and the stickman's animation has missing keyframes
The way Daz Studio poses the figures between keyframes produces major animation non-sense
so, immediately after motion-capture, you should click the client's 'Fill Missing Keyframes' button
The client script will then use 'Slerp Quaternion Interpolation' to fill the missing keyframes
Transferring the stickman animation to a Daz Studio figure
Select the target figure ( example a Genesis Figure )
Start the client
go in the "Stickman to figure" tab
select/unselect the joints that will be implicated in the transfer << THIS IS NOT OPERATIONAL YET
specify the range of stickman frames to be transferred and the starting frame for the figure
click the "Transfer This Range button"
after a few seconds the animation should be transferred
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The Hip Offset Option
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The position of a figure's hip bone relative to the root of the figure varies
from figure to figure and possibly from Daz Studio version to the next.
For Aiko 3 under Daz Studio 3, a value of Hip Offset = 120 should bring Aiko to floor level
For Genesis under Daz Studio 4.7, a value of Hip Offset = 0 is needed
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The Neck Bend and Feet Bend options
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The kinect-stickman's neck is almost always tilted forth,
using the Neck Bend option you can get the target figure's neck to follow the stickman's neck but with a bend-offset angle
The kinect-stickman's feet are almost always bent as if it was wearing high heels
using the Feet Bend option you can adjust the target figure's feet
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The no-feet-side-side and no-feet-twist options
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The kinect doesnt track feet very well.
use these two options to keep the feet side-side and feet twist rotations at zero degrees
Loading Archived motion data
If you used the Server's "Auto-File" option or redirected the server's output to a file,
then you now have a text file which is a record of a motion capture session.
By default this file is in the same folder as the server application.
The file name reflects the date and time at which the mocap session started.
Using mcjKinectClient's "Load Mocap" button, you can load this data and apply it to the stickman
The stickman animation will be loaded at the current position on the timeline.
The result is exactly the same as if you recorded this animation using the client's 'Record' button.
Beware: the current stickman animation ( if any ) will be lost.
Here too you will want to use the 'Fill Missing Keyframes' button
then use the 'Transfer This Range" button to transfer the animation to the (selected) figure
Loading Archived motion data, only one frame
Same as before, but only frame 20 of the animation file will be loaded
and applied to he stickman, at the current timeline frame;
to do:
- better handling of bad kinect poses
- snapshot mode
- support 2 figures at once
- real-time mocap on figures instead of stickman
- better stickman
- better help and manual
- help, web-help, defaults, exit buttons
About mcjKinectClient_VeryBetaV002.dsa
This version for DS3/DS4 was introduced May 20th 2015
Very few tests were made and sometimes the results were odd(er than usual )
But if you have a fast PC it should let you Visualise the motion capture using the Daz Studio stickman or the selected Daz Studio figure
there's a "step" setting which allows you to reduce the frame rate of the Figure visualization
Note that if you use the Figure preview mode, during recording, the figure is now animated, but that animation probably looks awful
so you still need, like before, to use the "Fill Missing Keyframes" button, which corrects many problems on the stickman animation
then you should delete the animation of the figure
then you should use the "Transfer This Range" button to transfer the stickman animation to the Figure