Atom Posted July 20, 2016 Share Posted July 20, 2016 (edited) Hi All, I have been working on a python script that will tweak the rig generated by the .cmd file produced by mcbiovision. Specifically the Carnegie Mellon University Motion Builder BVH files. The script modifies the Carnegie Mellon University Motion Builder rig to allow extended functionality such as adjusting the length of various bone chains in the rig. The script also has a tool to mirror bone lengths from the left to the right side of the rig for symmetrical bone lengths. There is an origin offset control to align the start frame of a clip to the world origin. There are two preset bone configurations for male and female skeletons as well as full rotation control for most bones in the rig. I demonstrate the steps to capture/skin the mesh geometry and extend the capture ranges using the Auto Weights tool which is part of the script. I show how to extend the capture weights of each bone to achieve full deformation coverage. The end result is a fully skinned dancing person. The python script itself is based on the artists concept of stacking eight head lengths on top of one another to form the full adult human height. This total length is then divided up by percentage for the arm, leg, torso and head lengths. The script applies these percentage to the original bone lengths captured using the scripts Capture Bone Lengths button. The length sliders modify these percentages to allow for adjustable bone chain lengths. I put together a video to demonstrate it's use. ap_BVH_python_tweaker_tut_end.hiplc cmu_salsa_dance_mocap.zip Edited July 30, 2016 by Atom 2 Quote Link to comment Share on other sites More sharing options...
edward Posted July 20, 2016 Share Posted July 20, 2016 I like how good the rig guess worked for fitting the skeleton to the mesh! On fixing up the capture regions check out the http://www.sidefx.com/docs/houdini/commands/bonealigncapture command. The corresponding viewport tool is http://www.sidefx.com/docs/houdini/shelf/aligncapturepose but click on the link of the title below on usage: Another thought while watching is that you can use the Capture Mirror SOP to mirror the weights so that you can avoid needing to tweak the capture regions for both sides. Or, I guess you can just add that mirroring to your script as well to mirror the capture region parameters as well as the bone lengths. Quote Link to comment Share on other sites More sharing options...
michael Posted July 20, 2016 Share Posted July 20, 2016 nice. I'll have a look at this in the am you might want to give Proximity Capture a try - you can avoid manually adjusting the bone capture regions. how are you aligning the bones to the mesh? Quote Link to comment Share on other sites More sharing options...
michael Posted July 20, 2016 Share Posted July 20, 2016 hahaha go to bed Ed! Quote Link to comment Share on other sites More sharing options...
Atom Posted July 20, 2016 Author Share Posted July 20, 2016 (edited) Thanks for the feedback Ed and Michael, I plan on looking into more of the capture tools. The alignment button is a preset that happens to match the mesh I imported. The button code simply populates all the rotation and offset fields with values that match the imported mesh. This was my way to keep the video less boring. So you did not have to watch me align every bone. Once I had the bones aligned I simply wrote code to take those values and store them back onto the python script parameters. If you were to use this button on any other .bclip file, other than 61_11.bclip, the rig probably won't line up and will require further tweaking. But it is a way to get your bone in the "ball-park" area for final alignment. Here is a portion of the code. You can see it just sets values... def autoAlignFemale(): # Some custom values that align the female skeleton to the CMU BVH t-pose for mocap 61_11. node_self.parm("head_size").set(1.0) node_self.parm("rig_offsetx").set(-20.28) node_self.parm("rig_offsety").set(1.9) node_self.parm("rig_offsetz").set(-0.1) zeroArms() zeroLegs() zeroSpine() zeroLengths() node_self.parm("tweak_upper_arm_leftx").set(3.22) node_self.parm("tweak_upper_arm_lefty").set(6) node_self.parm("tweak_upper_arm_rightx").set(4.89) node_self.parm("tweak_upper_arm_righty").set(-3) . . . Edited July 20, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
art3mis Posted November 30, 2016 Share Posted November 30, 2016 Thanks for sharing this Atom! Quote Link to comment Share on other sites More sharing options...
akelian Posted March 23, 2020 Share Posted March 23, 2020 On 20/07/2016 at 3:52 AM, Atom said: Hi All, I have been working on a python script that will tweak the rig generated by the .cmd file produced by mcbiovision. Specifically the Carnegie Mellon University Motion Builder BVH files. The script modifies the Carnegie Mellon University Motion Builder rig to allow extended functionality such as adjusting the length of various bone chains in the rig. The script also has a tool to mirror bone lengths from the left to the right side of the rig for symmetrical bone lengths. There is an origin offset control to align the start frame of a clip to the world origin. There are two preset bone configurations for male and female skeletons as well as full rotation control for most bones in the rig. I demonstrate the steps to capture/skin the mesh geometry and extend the capture ranges using the Auto Weights tool which is part of the script. I show how to extend the capture weights of each bone to achieve full deformation coverage. The end result is a fully skinned dancing person. The python script itself is based on the artists concept of stacking eight head lengths on top of one another to form the full adult human height. This total length is then divided up by percentage for the arm, leg, torso and head lengths. The script applies these percentage to the original bone lengths captured using the scripts Capture Bone Lengths button. The length sliders modify these percentages to allow for adjustable bone chain lengths. I put together a video to demonstrate it's use. ap_BVH_python_tweaker_tut_end.hiplc cmu_salsa_dance_mocap.zip Hi Atom, Thanks! Did you remove the script I cannot find it ;( Quote Link to comment Share on other sites More sharing options...
Atom Posted March 23, 2020 Author Share Posted March 23, 2020 It looks like it is there to me, try the link. The script is there, but not the tutorial. Vimeo capped my limit a while back. Quote Link to comment Share on other sites More sharing options...
akelian Posted March 24, 2020 Share Posted March 24, 2020 Ohh!! The script is part of the hip! Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.