SimFonIA Animation Tools V1.0 SCA Extension SimFonIA Character Animator Bring life to your lectures Move forward with industrial design Combine illustrations with your presentations Convey your ideas to your customers Test your ideas in virtual reality Energize your meetings Convince your investors 13, Avenue de Strasbourg 67400 Illkirch-Graffenstaden Web : www.simfonia.fr E-mail : info.sat@simfonia.fr
CONTENTS 1 Introduction... 3 2 Obtaining BVH files... 3 3 Creation and management of an animated character... 3 3.1 Creation of the SCA skeleton... 3 3.2 Importation or creation of a character... 7 3.3 Identification of joints...10 3.3.1 Creation of a marker...10 3.3.2 Positioning of the markers... 11 3.4 Adjustment of the skeleton...13 3.5 Displacement of the character s limbs into the skeleton hierarchy...17 4 Management of a BVH...19 4.1 Parameters of a BVH skeleton...19 4.2 Importing a skeleton as an animated component...20 4.3 Quick copying of characters...20 4.4 Clipping plan...20 5 APPENDIX: Structure of a BVH file...21 5.1 BVHacker...21 5.2 Hierarchy of a skeleton...22 5.3 BVH files and text editor...25 2
1 Introduction This document describes the function of the SAT plugin called SCA ( SimFonIA Character Animator ). This feature allows you to create and manage skeletons in order to animate 3D models from human motion capture data. This function is based on BVH files ("Biovision Hierarchy Animation File"). These are ASCII files that contain 3D motion capture data. They are used, for instance, to store information for characters of 2nd life or other games. 2 Obtaining BVH files There are many free databases of BVH files, such as those are available by going to the following web pages: https://sites.google.com/a/cgspeed.com/cgspeed/motion-capture/daz-friendly-release http://mocapdata.com/ http://www.thetrailerspark.com/index.php?option=com_remository&itemid=6 Before continuing this tutorial, we recommend you to visit the 1st link (CMU database) and to click on the "Zip file for BVH directories 01-09 (45 MB)" to download your first BVH files. This will allow you to follow this tutorial step by step. 3 Creation and management of an animated character Please open the SketchUp software in order to follow step by step the creation and manipulation of an animated skeleton. SAT uses the following three icons of the SAT toolbar. 3.1 Creation of the SCA skeleton Click on the button and you will be able to select a BVH file that you had previously downloaded from one of the databases provided in 2 or that you had saved yourself. The skeleton corresponding to the selected BVH file appears instantly in the SketchUp scene. 3
Figure 1: SCA Skeleton in SketchUp You can observe the structure of the skeleton by opening the window Outliner (menu Window Outliner ). 4
Figure 2: Architecture of a SCA skeleton in the Outliner window A skeleton is composed of: o joints (see menu "Window", "Layers," "bvhjoints") o bones, also called limbs (see menu "Window", "Layers," "bvhbones") The nature and number of the joints depend on the selected file. They can be more or less accurate. 5
Figure 3: "bvhjoints and bvhbones Close the Outliner window. Click on Play and you will see the skeleton starting to move according to the BVH file you have loaded. The goal of this tutorial is to show you how to associate a human model to this skeleton, for the human model to have the same behavior. Figure 4: First animation of the skeleton Leave aside the skeleton for this moment. 6
3.2 Importation or creation of a character The 3D model used in the tutorial can be found in 3D Warehouse by looking for SAT SCA Tutorial. From this moment, you must have an available character to animate. Whether you have drawn the character by yourself or imported it via the 3D Warehouse, a few rules must be respected to run the animations smoothly: The character must have each of its limbs placed in individual groups. If components are used, make sure that they are all unique. If not, click right on then on Make Unique.The division of the character in groups should, as far as possible, corresponds to the decomposition of the SCA skeleton you intend to use. For example, the absence of a division of the character to the fingers is not a problem in most cases but the absence of an elbow joint will make poor results in general. The example below shows you a character of which every limb has been put into a single group. It is also advised to name each group and to use the same names as the SCA skeleton bones. A suffix should be added in order to distinguish the belongings of the skeleton and those of the character (e.g. "lshoulder" for the skeleton and "lshoulder_perso" for the character). 7
Figure 5: Character division into groups The character must also have joints which allow making movements without gross defect. It must be designed so that a movement around a joint gives a realistic result, without holes for example. For this, connected limbs need to have overlaps, such as in the case of the character shown in the following picture (transparency is obtained by going to the menu "View" "style face" and enabling "transparency"). 8
Figure 6: Overlap of the limbs extremities We advise you to try turning some key limbs around their joints (e.g. hips, knees, shoulders, elbows) in order to see all kinds of results that will be obtained later. The following picture shows a rotation of the forearm around the elbow. Without overlapping between the forearm and the arm, a hole would have appeared during the rotation. 9
Figure 7: Joint check Finally, make sure that the whole character has been put into a group. Thereafter, that will render its handling easier. 3.3 Identification of joints 3.3.1 Creation of a marker The marker used in the tutorial can be found in 3D Warehouse by looking for SCA Tutorial. The next step consists in creating a simple, practical and clearly visible marker which will be placed on each joint of the character. The following marker, displayed with transparent faces, fits well to that objective: 10
Figure 8: Marker for joints Note that the center of this marker is clearly determined by the intersection of three lines. Thus it can easily be used as an inference point. Once the marker has been drawn or imported, make a component with it in order to easily change all the markers at once, if it appears to be necessary later. 3.3.2 Positioning of the markers Now, you need to duplicate the marker as many times as necessary in order to place one at the center of each joint of the character. When all the markers are placed, make a group containing all the markers. Lock this group (right click on it and activate "Lock") to prevent inadvertent movements thereafter. Save your template at the end of this step. Adjust the character so that it has the same posture as the skeleton: arms down the body (I-Stance) or horizontally with palms down (T-Stance). For this make a rotation of the arm around the articulation "Shoulder" (using the shoulder marker as a rotation center and axis). Re-save the model under a different name at the end of this step if you have had to change the position of the character s arms. At the end of this step, you should have obtained a model which looks like the following picture: 11
Figure 9: Model with markers at each joint (T-Stance) Here are some tips to easily place the markers: Use the transparent mode for the faces (View face style transparency) to see through the surfaces. Use the mode "hidden geometry" if necessary. It is more convenient to use the camera in "parallel" mode to ensure proper placement of markers, using standard views (front, top, side). Each time you place a marker, you should check whether the result is correct by rotating the limb. Otherwise, go over the position of the marker and/or update the drawing of the character. The 3D model with its markers can be found in 3D Warehouse by looking for SCA Tutorial. 12
3.4 Adjustment of the skeleton Now, you should set the skeleton so that its shape corresponds to the position of the joints of the character. Mask the character. Only the skeleton and the markers placed on the character's joints should be visible. Switch to transparency mode clearly to see the centers of the markers (intersection of 3 lines). Move the entire skeleton by its joint "hips" and put this joint on the center of the marker which is on the "hips" of the character. Figure 10: Positioning of the skeleton hips Make a uniform scaling of the skeleton to fit its size roughly to the dimensions of the character (press CTRL to make the scaling from the center of the skeleton). Then, replace again the joint "hips" of the skeleton on its marker. This step (scaling and moving) must generally be repeated two or three times to get a satisfactory result. Do not seek perfection. The size of the skeleton has just to be about the same as the character one. 13
Figure 11: Scaling of the skeleton From that point, in a hierarchical way, starting from the hips and going more and more deeply in the hierarchy, for the lower body and the upper body (see an example of hierarchy in Figure 19), place each joint of the skeleton on the corresponding marker. Move the groups with the Tool Move only and manipulate the joints of the skeleton only. Do not use the Rotate or the Scale tools and do not touch to the markers (hence the importance of having locked the marker s group). In the figure below, we have zoomed in on the left side of the upper body where we have properly placed the joints of the skeleton: 14
Figure 12: Positioning of the joints of the skeleton on the markers When moving the joints, the lines of the skeleton, symbolizing the bones, are sometimes not attached to their joints anymore. You can reshape the bones of the skeleton by clicking on the "redraw" icon. One must keep in mind that for the animation, only the skeletal joints are considered. The bones are just present to locate the joints more easily. 15
Figure 13: Update of the skeleton bones with the tool Redraw Although it is optional, we strongly recommend, for visibility reason, making a "redraw" once all the joints have been placed. Once the skeleton is complete, unhide the character and hide the group containing the markers. Save your model at the end of this step. 16
Figure 14: Final positioning of the skeleton 3.5 Displacement of the character s limbs into the skeleton hierarchy The last step consists in moving each limb of the character in the hierarchy of the skeleton Using the window "Outliner", drag and drop the groups of the character into the corresponding groups of the skeleton. For visibility purpose, start preferably by the extremities and go up the hierarchy. The following figure shows the operation in progress, the legs of the character having been moved correctly: 17
Figure 15: Positioning of the character s limbs into the skeleton hierarchy You can see that each limb group" of the character s left leg has been placed into the corresponding group of the skeleton (lthigh contains lthigh_perso, lshin contains lshin_perso, etc.) When the operation is performed for all the limbs, hide the skeleton. Save your model. Close the Outliner window. Start the animation. If you have properly followed all the steps above, your character should be animated and have a realistic behavior. 18
4 Management of a BVH 4.1 Parameters of a BVH skeleton At any time it is possible to change the BVH file associated with a skeleton, to rename a skeleton and to modify some parameters of its animation. Select a skeleton Click on the icon. The following window appears: Figure 16: SCA Manager window BHV Name: allows changing the name of the skeleton. In the example of the tutorial, the skeleton is called BVHModel. Load new data: allows the loading of a new BVH. It is therefore possible to quickly change the animation of a character. BHV Duration: duration of the animation loaded (not modifiable) Delta before begin: allows delaying the execution of the reading file. Number of repetitions: choice of the number of repetitions that will run after the Delta before begin time (0 = infinity). 19
4.2 Importing a skeleton as an animated component Once you have an animated character which is satisfactory, you can save it and import it later as an animated component, like any other animated components which have been described in the document "SAT_V1_Animated_Components_en_V1.03.pdf" Check that when you reopen a SketchUp file containing an animated character that the path to the BVH files are always the same. If it is the case, one can immediately start the animation otherwise you will need to load the BVH files again using the management window. 4.3 Quick copying of characters To quickly create a crowd based on one or several models, you can proceed as follow: Create your animated character(s) Duplicate (copy and paste or "Move" tool + CTRL) or import your character(s) as an animated component several times in your SketchUp scene. For each skeleton, load an appropriate animation. You can change the delta before begin time to avoid identical behavior. You can also easily change the hairs colors, the clothes, etc. of your characters to make the crowd more realistic. 4.4 Clipping plan We found that sometimes, while animating a character, it seems to disappear because of a clipping plane. All information on what a clipping plane are available at this link: http://support.google.com/sketchup/bin/answer.py?hl=en&answer=36261 From experience, the problem goes away almost all the time if you draw a floor (any group with a paving stone shape fits) on which the character evolves during its animation. 20
5 APPENDIX: Structure of a BVH file Although the SCA extension allows you to create and animate characters without really knowing what a BVH file is, we think it is worth to unveil the outlines. A BVH file can be read with specialized software like BVHacker or with a simple text editor (Notepad or Word for example). 5.1 BVHacker You will find this free software by visiting the website below; http://www.bvhacker.com/ We recommend you to download and install it. When you open a BVH file with BVHacker, you will see that this file describes: The nature of a skeleton: the number, location and hierarchy of its joints. The degrees of freedom of the joints whose temporal evolution characterize the movement. The recording rate, the number of samplings. Figure 17: BVHacker software 21
For example, we open a BVH file in BVHacker. In the center of the window, you can see the skeleton. You can move it with the tools to the right. To the left is the hierarchy of the skeleton. By clicking on a limb it appears clearly on the skeleton in yellow. A limb is a segment connecting several joints (usually two, sometimes more). We will not explore further the functioning of the software; all documentation is on the site where you have downloaded it. 5.2 Hierarchy of a skeleton The hierarchy of the skeleton depends on the BVH file which is loaded and can be more or less complex. Generally, you will get something that closely looks like the skeleton showed in the Figure 2 and Figure 3. We recommend you to always check the structure of a BVH file before using it because it will help you knowing the degree of accuracy your animated characters should have. 22
Joints names (general case) The following example shows a typical skeleton with the names of its limbs. Figure 18: Joints of a skeleton based on CMU database (note: this naming scheme is not always the same) Hierarchy of the joints The motions of a skeleton are hierarchically managed. This means, for example, that if the angle of the joint "lbuttock" changes, all the limbs in lower hierarchical levels which are connected to this joint, namely "lthigh", "lshin", "lfoot, will also change. This is exactly the same principle as the one that is used for conventional SAT transformations (rotation, translation, etc.) for the management of the movements of children groups according to the movements of their parent group. 23
Figure 19: Hierarchy of the joints of a skeleton 24
5.3 BVH files and text editor When you open a BVH file with a text editor, it comes in the following form. The first part of the file describes the hierarchy of the skeleton joints: Figure 20: BVH file 1 st part The second part specifies the number of samples, the sampling frequency and the values of the angles of each joint at each time step: Figure 21: BVH file 2 nd part 25