<div dir="ltr"><div>SPEC COMMENT RULES APPLY >>></div><div><br></div>I had a chance to try splitting Motion into MotionPlay and MotionData<div>- 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.</div><div>-Doug Sanden</div><div><br></div><div>more..</div><div>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.</div><div><br></div><div>Results:</div><div>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.</div><div><br></div><div><a href="http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/Motion_Play_Data.mp4">http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/Motion_Play_Data.mp4</a><br><a href="http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/annexdA.x3d">http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/annexdA.x3d</a></div><div>- original Motion scene<br><a href="http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/annexD_Play_Data.x3d">http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/annexD_Play_Data.x3d</a><br>- MotionPlay + MotionData nodes split, with Data DEF/USEd and a way to start / enable 2nd HH Play node later.</div><div><a href="http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/annexD_Play_DataFile.x3d">http://dug9.users.sourceforge.net/web3d/tests/hanim/web3d/annexD_Play_DataFile.x3d</a><br></div><div>- not implemented in code to import .bvh, but would look like this in a scene file</div><div><br></div><div>Methods:<br></div><div>The Motion nodetype defined for v4 / HAnim2 is at the bottom, and inherits some of these (doug proposed) Play, PlayData, PlayDataFile nodes:<br> interface MotionPlay {<br> string description ""<br> sequence<Boolean> channelsEnabled []<br> double cycleTime<br> double elapsedTime<br> Boolean enabled false<br> int frameIncrement 1 (-8, 8)<br> int frameIndex 0 [0, 8) <br> Boolean loop false<br> Boolean next<br> Boolean previous<br> }<br>MotionPlay is 1:1 with Humanoid, and so each scene character has its own frame index pointer and timing data</div><div><br> interface MotionData {<br> string description ""<br> string channels ""<br> int frameCount 0 [0, 8) <br> float frameDuration 0.1 (0, 8) <br> string joints ""<br> integer loa -1 [-1,4]<br> sequence<float> values [] (-8,8) <br> } <br>Just the mocap data<br><br> interface MotionDataFile :: MotionData {<br> string description ""<br> string channels ""<br> int frameCount 0 [0, 8) <br> float frameDuration 0.1 (0, 8) <br> string joints ""<br> integer loa -1 [-1,4]<br> sequence<float> values [] (-8,8) <br> MFString url []<br> } <br>(not implented yet) but will allow loading mocap data from common format(s) like .bvh</div><div><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"><a href="http://mocap.cs.cmu.edu/" style="color:blue">http://mocap.cs.cmu.edu/</a></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">
</p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- motion capture aka mocap data 'free for all uses'</p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"><a href="https://www.sites.google.com/a/cgspeed.com/cgspeed/motion-capture/daz-friendly-release" style="color:blue">https://www.sites.google.com/a/cgspeed.com/cgspeed/motion-capture/daz-friendly-release</a>
</p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- someone converted the <a href="http://cmu.edu">cmu.edu</a> to bvh for download, and the
channel names are a bit different than going through blender import .c3d, export .bvh</p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"><br></p><br> interface Motion :: MotionPlay, MotionData {<br> string description ""<br> string channels ""<br> sequence<Boolean> channelsEnabled []<br> double cycleTime<br> double elapsedTime<br> Boolean enabled false<br> int frameCount 0 [0, 8) <br> float frameDuration 0.1 (0, 8) <br> int frameIncrement 1 (-8, 8)<br> int frameIndex 0 [0, 8) <br> string joints ""<br> integer loa -1 [-1,4]<br> Boolean loop false<br> Boolean next<br> Boolean previous<br> sequence<float> values [] (-8,8) <br> }<br>Now that Play and Data are simple split parts of original Motion node, Motion node can inherit from them.</div><div><br></div><div><<< SPEC COMMENT RULES APPLY <br></div></div>