Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:bvhfiles [2011/07/19 23:36]
mike
en:bvhfiles [2011/07/21 15:22] (current)
mike
Line 22: Line 22:
  
 BVH Files in the Second Life format work the best. There is a list of SL animation files at [[http://wiki.secondlife.com/wiki/Internal_Animations]] and a zip file of them in BVH format [[http://static-secondlife-com.s3.amazonaws.com/downloads/avatar/bvh_files.zip|here]] BVH Files in the Second Life format work the best. There is a list of SL animation files at [[http://wiki.secondlife.com/wiki/Internal_Animations]] and a zip file of them in BVH format [[http://static-secondlife-com.s3.amazonaws.com/downloads/avatar/bvh_files.zip|here]]
 +
 +Here are some additional sources: (**Note:** these will probably all need massaging/converting. See the BVHacker section below)
 +  * [[http://motioncapture.forcevfx.com|ForceVFX.com]]
 +  * [[http://www.cgspeed.com|cgspeed.com]] - BVH conversions of the Carnagie Melon datasets
 +  * [[http://www.animazoo.com/bvh-downloads/|animazoo]] (requires free registration)
 +  * [[http://www.beyondmotion.com.au/free_motion.html|Beyondmotion]]
 +
  
 ==== Moving an animation into the correct position ==== ==== Moving an animation into the correct position ====
Line 46: Line 53:
  
 You can then reposition the whole body as needed. You can then reposition the whole body as needed.
- 
- 
-==== Changing the speed of an animation ==== 
- 
-The only method currently available for changing the animation speed is to cut and paste the keyframes in the Animation Timeline window. This is known as the "Brute Force" method. Apologies up front. 
-  - Select the last keyframe in the Timeline panel \\ 
-  - Right click and select "Cut Keys -> [character name]" \\  
-  - Move to an empty part of the timeline (E.g. over on the right side) and right click -> paste the keyframe there \\  
-  - Repeat this process but paste the next keyframe two keyframes to the left of the first one to add some "time" in between them \\  
-  - Repeat for all the remaining keyframes (except for the first keyframe. That one has to remain at frame 0) \\  
-  - Open the Key Editor window by clicking on the Key icon at the top of the Animation panel \\  
-  - Drag a box around ALL the keyframes (except for the first keyframe. That one has to remain at frame 0) \\  
-  - Right click and "cut keys" in the Key Editor panel \\  
-  - Move the current frame to frame 3 in the Timeline panel \\  
-  - Right click and "paste keys" in the Key Editor panel \\  
-  - Play that sucker back and hope that it's slow enough! \\  
  
 ==== Understanding the BVH file format ==== ==== Understanding the BVH file format ====
Line 68: Line 59:
 If you find a BVH file that you really want to use but it's not in the correct format, you can try changing the joints to match the ones in the sample Second Life files. The BVH file can be edited in a simple text file editor like Notepad.  If you find a BVH file that you really want to use but it's not in the correct format, you can try changing the joints to match the ones in the sample Second Life files. The BVH file can be edited in a simple text file editor like Notepad. 
  
-==== Additional tools for working with BVH files ==== +==== Using BVHacker to get BVH files working in the Pose Editor ==== 
-[[http://www.bvhacker.com/|BV Hacker]] is a free program that loads and manipulates BVH files. It is a good tool for viewing the files. It does attempt to convert them to Second Life format but we have yet to find a BVH file that converts cleanly with it.+[[http://www.bvhacker.com/|BV Hacker]] is a free program that loads and manipulates BVH files. It allows you to preview the motion. It will also attempt to convert the data to Second Life format but it may not always do this successfully. Here are some common issues that you may run into and suggested solutions. 
 + 
 +== Fixing joint errors and getting the file to load in the Pose Editor == 
 + 
 +The Pose Editor needs to find the main joints that are used on the model. 
 + 
 +Here are couple of representations of the skeleton hierarchy used on the models. You may find that some versions of BVH have the Abdomen joint listed after the rThigh and lThigh joints. This is OK as long as they are still at the same level in the hierarchy. 
 + 
 +| **Here's a diagram of the hierarchy that works in the Pose Editor** | **Here's how that looks as a text hierarchy like you would see in the BVH file** | 
 +|{{:en:editors:mocap:bvh_hierarchy_chart.png|}}|{{:en:editors:mocap:bvh_hierarchy_text.png|}}| 
 + 
 +Under the "hack" menu, select "Attempt SL joint naming". This will attempt to rename the joints. It will probably give you a list of joints that it couldn't rename and recommend deleting them. This isn't a big issue, you can probably still import the file and the Pose Editor will ignore the extra joints. 
 + 
 +If you still get errors after the "SL joint naming", you can try manually renaming joints by right clicking on them. Ensure that all the joints in the Thrixxx hierarchy are represented. Additional joints will be filtered out so you can either leave them in or delete them. 
 + 
 + 
 +== Changing the speed of an animation == 
 + 
 +You can speed up the animation by using the "1/2 sample" button. This will cut out every other frame each time you click it effectively doubling the speed. There isn't an easy way to slow the animation down but you probably won't need to do that. Usually the mocap animations are too slow. 
 + 
 +== Cropping the animation == 
 + 
 +A lot of motion capture files have extra frames that you probably don't want. You can trim the animation by marking the start frame with the "Mark In" button and the end with the "Mark Out" button. Then hit the "Crop" button to trim out everything else.
  
-Here are some tips for converting files with BVHacker.+== Scaling the joints == 
 +The joints in the BVH file have a fixed position in world space (actually an offset from the hip - but same result). This is probably not the same as world space scale in the Pose Editor. It is possible to scale the joint positions but there are some quirks in the process. You can use "CTRL +" to scale the model up and "CTRL -" to scale the model down. Unfortunately, there isn't a way to adjust the scaling increments so you can just try to get the model within the right ballpark. If the joint scale is too large you will have the foot end effectors (where the feet are reaching to) too far down. If the scale is too small the model may be hunched over or have her arms too close to the body. If you experiment and keep reloading the model in the Pose Editor you can find the closest scale and adjust from there.
  
-  - You can speed up the animation by using the "1/2 sample" button. This will cut out every other frame each time you click it effectively doubling the speed. +== Fixing joints that are in the wrong place ==
-  - Under the "hack" menu, select "Attempt SL joint naming". This will attempt to rename the joints. It will probably give you a list of joints that it couldn't rename and recommend deleting them. This isn't a big issue, you can probably still import the file and SexVilla will ignore the extra joints. +
-  - A lot of these motion capture files have extra frames that you probably don't want. You can trim the animation by marking the start frame with the "Mark In" button and the end with the "Mark Out" button. Then hit the "Crop" button to trim out everything else. +
-  - You may find that the animation converts but that the shoulders are too close to the body. You can adjust the offset position of individual joints by using the Adjustment sliders on the right side. This applies both to translation (position) and rotation. Make an adjustment to the slider, save the file again and then reload in the Pose Editor. Repeat for any position or rotation issues until you get it right. +
-  - If the "SL joint naming" doesn't work you can manually rename joints by right clicking on them.+
  
 +You may find that the animation converts but that the shoulders are too close to the body or the feet aren't rotated correctly. Adjust the scaling first (see above) to get the joints as close as you can. You can then adjust the offset position of individual joints by using the Adjustment sliders on the right side. This applies both to translation (position) and rotation. Make an adjustment to the slider, save the file again and then reload in the Pose Editor. Repeat for any position or rotation issues until you get it right. **Tip:** if the feet don't rotate in the animation you can just delete the rotation keyframes for the feet in the Key Editor and adjust the rotation manually.
  
  
 ==== Making the BVH file interactive ==== ==== Making the BVH file interactive ====
 *** UNDER CONSTRUCTION *** *** UNDER CONSTRUCTION ***