[x3d-public] HAnim2 > Motion > Play + Data
GPU Group
gpugroup at gmail.com
Thu May 14 11:11:39 PDT 2020
SPEC COMMENT RULES APPLY >>>
I had a chance to try splitting Motion into MotionPlay and MotionData
- so MotionData could be DEF/USEd while MotionPlay can stay 1:1 with
HAnimHumanoid - so 2 HH can share the same MotionData, but be playing at
different times. Works.
-Doug Sanden
more..
I also thought about a MotionDataFile nodetype, but haven't
yet implemented. It has a URL, not sure what other of the MotionData fields
it needs to expose. Goal: read BVH files.
Results:
Worked, wasn't hard to implement (by copying, pasting and splitting Motion
node definition and code), took a few hours including making the test data.
http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/Motion_Play_Data.mp4
http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/annexdA.x3d
- original Motion scene
http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/annexD_Play_Data.x3d
- MotionPlay + MotionData nodes split, with Data DEF/USEd and a way to
start / enable 2nd HH Play node later.
http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/annexD_Play_DataFile.x3d
- not implemented in code to import .bvh, but would look like this in a
scene file
Methods:
The Motion nodetype defined for v4 / HAnim2 is at the bottom, and inherits
some of these (doug proposed) Play, PlayData, PlayDataFile nodes:
interface MotionPlay {
string description ""
sequence<Boolean> channelsEnabled []
double cycleTime
double elapsedTime
Boolean enabled false
int frameIncrement 1 (-8, 8)
int frameIndex 0 [0, 8)
Boolean loop false
Boolean next
Boolean previous
}
MotionPlay is 1:1 with Humanoid, and so each scene character has its own
frame index pointer and timing data
interface MotionData {
string description ""
string channels ""
int frameCount 0 [0, 8)
float frameDuration 0.1 (0, 8)
string joints ""
integer loa -1 [-1,4]
sequence<float> values [] (-8,8)
}
Just the mocap data
interface MotionDataFile :: MotionData {
string description ""
string channels ""
int frameCount 0 [0, 8)
float frameDuration 0.1 (0, 8)
string joints ""
integer loa -1 [-1,4]
sequence<float> values [] (-8,8)
MFString url []
}
(not implented yet) but will allow loading mocap data from common format(s)
like .bvh
http://mocap.cs.cmu.edu/
- motion capture aka mocap data 'free for all uses'
https://www.sites.google.com/a/cgspeed.com/cgspeed/motion-capture/daz-friendly-release
- someone converted the cmu.edu to bvh for download, and the channel names
are a bit different than going through blender import .c3d, export .bvh
interface Motion :: MotionPlay, MotionData {
string description ""
string channels ""
sequence<Boolean> channelsEnabled []
double cycleTime
double elapsedTime
Boolean enabled false
int frameCount 0 [0, 8)
float frameDuration 0.1 (0, 8)
int frameIncrement 1 (-8, 8)
int frameIndex 0 [0, 8)
string joints ""
integer loa -1 [-1,4]
Boolean loop false
Boolean next
Boolean previous
sequence<float> values [] (-8,8)
}
Now that Play and Data are simple split parts of original Motion node,
Motion node can inherit from them.
<<< SPEC COMMENT RULES APPLY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200514/6a56949d/attachment.html>
More information about the x3d-public
mailing list