Endorphin:Руководство 11 - Улучшенные способы создания персонажа
| Руководство 11 - Улучшенные способы создания персонажа
| |
|---|---|
| |
ориг.название: Tutorial 11. Advanced character creation вики-редакция: Garin ссылка на сайт: NaturalMotion обсудить на форуме: Обсудить на форуме версия оригинала: 1.0 версия вики: 1.0 |
| Этот материал нуждается в переводе или допереводе.. Вы можете помочь перевести его. Не забывайте предварительно добавлять строку {{Edit|--~~~~}} в материалы над которыми работаете, чтобы не создавать конфликта правок. Пожалуйста, снимите шаблон этого сообщения, когда материал будет вычитан. |
Endorphin: Руководство 11 - Улучшенные способы создания персонажа
Предисловие
In this tutorial, you will explore the more advanced features of creating your own custom characters in endorphin. You should complete Tutorial 05 - Creating characters (basic) before working on this tutorial.
In particular, you will learn how to reshape your character to match an external mesh so that your character will interact with itself and the environment correctly.
Step 1: Creating new characters
In this step, we will create a simulation-reference character pair in endorphin using Character Edit Mode. The reference character will be based on the skeleton contained in an FBX file.
This step is similar to Step 1 of Tutorial 5. See that step for more detail.
To create a new simulation-reference character pair:
- Launch endorphin.
- Select File > New Character…. This displays the New Character dialog.
- In the Create Character Using group, ensure that Standard Simulation Character is selected.
- Turn on the Create Reference Character Using setting, and click the Browse button to select the file Resources\Tutorials\Tutorial 11 – Creating Characters (Advanced)\MyCharacter.fbx. Click OK.
- In the Import Options dialog appears, select the root node from the node hierarchy, and click OK.
- The new character pair is displayed in Character Edit Mode.
Step 2: Adjusting the root position
In this step, we will be reshaping the simulation character to match the corresponding reference character. This involves using the Move tool to snap simulation character joints to reference character joints. The first step is to ensure that the root joint position of the simulation character exactly coincides with the root joint position of its reference.
This step is similar to Step 2 of Tutorial 5. See that step for more detail.
To match the root position of the simulation and reference characters:
- Right-click in the viewport and select Skeletal View.
- Zoom in on the hips of the two characters.
- Activate the Move tool and select the root joint of the simulation character.
- Snap the root joint of the simulation character with the corresponding root joint of the reference character. When you are snapping joints using the Move tool, ensure that you are using the purple square manipulator of the Move tool. If you use the axial or planar manipulators of the Move tool, joint snapping will not occur.
- Select the LowerSpineJoint of the simulation character, and snap it to the Spine1 joint of the reference character. Working up the spine, snap all the other joints into place, all the way up to the head.
- When you snap joints together, they become locked together. When a joint is locked, its position is not affected when you move or rotate other joints. For example, if you lock the shoulder and wrist joints, you can move and rotate the elbow joint without disrupting the snapped positions of the elbow or wrist. Of course, you can always use the Move tool to directly move the elbow and wrist joints, which then unlocks these joints.
Step 3: Reshaping the joint hierarchy
In this step, we will continue the process of reshaping the simulation character to match its corresponding reference. Starting at the simulation character root joint, and moving outwards in the direction of its extremities, we need to adjust the length and orientation of each joint in the simulation character to match the corresponding joint of the reference character.
This step is similar to Step 3 of Tutorial 5. See that step for more detail.
To reshape the joints of the simulation character:
- Select LeftClavicleJoint of the simulation character and snap it to the corresponding joint of the reference character.
- If you inspect the LeftFingersJoint of the simulation character, you will notice a helix that indicates this is a Hinge Joint. Most other simulation character joints are Skeletal (ball-and-socket) joints.
- The joint represents the simulation character’s knuckles. Ideally, this joint should be aligned so that it is horizontal when the arms are outstretched in a T-pose. With the LeftClavicleJoint still selected, rotate it about the X axis using the red circle manipulator. Rotate it such that the knuckles are horizontal again. This is a clockwise rotation, when looking down the left arm from the head to the hand.
- With the LeftClavicleJoint in place, snap the LeftShoulderJoint and LeftElbowJoint into place.
- With the LeftElbowJoint still selected, rotate it about the Y axis so that the LeftForeArmTwist joint is aligned with the forearm of the reference character.
- Bypass the LeftForeArmTwist joint, and snap the wrist and finger joints into place.
- Click the Mirror Left to Right button in the Main Toolbar. This mirrors the changes you have made from the left arm to the right arm.
- Select the LeftHipJoint of the simulation character, and snap it into place.
- Continue working down the joints of the left leg until you reach the LeftAnkleJoint. Snap this joint to the ankle of the reference skeleton.
- Select the LeftMidFootJoint and move it until it is roughly halfway along the foot joint in the XZ plane and vertically above the toe joint in the Y axis.
- Snap the LeftToesJoint and the LeftToesEndJoint into place.
- Click the Mirror Left to Right button in the Main Toolbar. This mirrors the changes you have made from the left leg to the right leg.
- Select File > Save Character. Save the character pair as MyCharacter01. The viewport label will update to display this new character name.
Step 4: Displaying joint limits
In this step, we will display some of the joint limits of the simulation character.
Each joint in an endorphin character has a corresponding joint limit, which defines its allowable range of movement. The default joint limits of the Standard Simulation Character are set for a standard adult human, and often will not need to be adjusted. To avoid cluttering the viewports, all joint limits are hidden by default. You can show and hide joint limits by using the Node View.
After you have reshaped a simulation character to match its reference character, it is good practice to review the joint limits to ensure that all the reshaped joints are correctly aligned. In the following example, we will examine the joint limits of the shoulders.
To display the shoulder joint limits:
- Ensure that the simulation character is active. If the reference character is active, click the Activate Simulation Character button in the Main Toolbar. The viewport label should display Simulation Character - MyCharacter01.
- Ensure that the Node View is visible. If it is not visible, select View > Node View to display the Node View. The keyboard shortcut is N.
- Select the LeftClavicleJoint.
- In the Node View, click the joint limit icons next to the LeftClavicleJointLimit and LeftClavicleJointLimitOffset nodes. This displays the corresponding joint limit graphics in the viewport. The corresponding icons in the viewport will be drawn solidly—rather than partially transparently—when the joint limits are shown in the viewport.
Swing and twist limits
Skeletal joint limits are displayed using separate swing and twist limit graphics. Hinge joints are displayed with twist limit graphics only.
The swing limit is displayed as a blue cone that runs along the direction of the bone, and indicates the allowable swing range of the joint in the two directions perpendicular to the bone. The twist limit is a blue arc that sits in a plane perpendicular to the bone, and indicates the allowable twist range of the joint.
Swing limits and twist limits each have a hard limit and a soft limit. The hard limit is drawn in blue, and the soft limit is drawn in white. Joints can move freely inside their soft limits, and cannot move at all past their hard limits. Joints can move between the soft and hard limits, but with increasing resistance.
Each limit also has a yellow offset indicator. A joint limit offset indicates the current position of the joint with respect to its joint limits.
- Note When you are editing characters in Character Edit Mode, it is possible to reorient joint limits so that their offsets lie outside their valid joint limit range. It is important to ensure this is corrected before using the character in a simulation. Otherwise, you will notice the character popping during a simulation—its joints will rapidly rotate back into their allowable ranges during the first few frames of simulation.
Step 5: Adjusting the shoulder joint limits
In this step, we will adjust the shoulder joint limits of the simulation character.
To adjust the shoulder joint limits:
- Display the LeftClavicleJoint limit (see Step 4 for more detail).
- Experiment with the joint limit by adjusting some of the swing and twist limit values and orientations using the Property Editor. Each time you change a joint limit value in the Property Editor, you will see an update in the corresponding joint limit graphic in the viewport. Do not save these changes.
- Discard these changes by reopening the character file without saving the changes.
- Select the LeftClavicleJoint limit in the viewport. It will be displayed using the orange highlight colour.
- Select the Rotate tool.
- Toggle the tool coordinate system so that you are rotating in local coordinates. To do so, select Edit > Toggle Coordinate System. The keyboard shortcut is X.
- Rotate the joint limit so that the joint limit swing offset is located within the joint swing limit. Ideally, the swing limit cone should be relatively high in relation to the offset. That is, we want the shoulders to be able to move up more than they can move down—which reflects typical human anatomy. The precise location of the offset relative to the limit depends on the freedom of movement you want to specify for the character.
- Select Character > Mirror Left To Right, or click the Mirror Left To Right button in the Main Toolbar, to mirror the changes in the left shoulder joint limit across to the right shoulder joint limit.
- In the Node View, hide the joint limit graphics. The easiest way to do this is to right-click on the character node and select Hide Type > Joint Limits.
- Select File > Save Character, or click the Save button in the Main Toolbar, to save the character. The keyboard shortcut is Ctrl+S.
Step 6: Importing a skin mesh
In this step, we will import an OBJ file that represents the surface mesh—also called the skin mesh—of your reference character. This mesh will be contained as a helper graphical object, which is displayed in the viewport. Helper graphical objects are very useful when you need to accurately reshape the mass and collision objects of a simulation character to match the shape and size of your own character.
To import a helper skin mesh:
- Right-click in the viewport and select Shaded View. This will display both the simulation and reference characters in shaded, rather than skeletal, mode.
- Select the reference character by clicking the Activate Reference Character button in the Main Toolbar, or by right-clicking in the viewport and selecting Select Reference Character.
- Select File > Import or click the Import button in the Main Toolbar to import a file. The keyboard shortcut is I.
- Browse to select the file MyCharacter.obj.
- In the Import Options dialog, leave all the settings as default and click OK. A new graphical object is created belonging to the reference character.
- In the Node View, right-click the reference character and select Hide All. Then, right-click on the MyCharacter graphical object in the Node View and select Show. The reference character will be hidden, except for its graphical object representing its skin mesh.
- Activate the simulation character. This will deselect the graphical object. The graphical object will no longer be selectable in the viewport, because it belongs to the inactive reference character. However, you can still select the graphical object using the Node View.
Step 7: Reshaping the mass objects
In this step, we will adjust the mass objects of the simulation character by changing their size, position and orientation. This is often called reshaping the mass objects.
Each joint in a character (other than the end joints) has a corresponding mass object. You cannot add or remove mass objects, but you can reposition them relative to the joint. You can also resize them and change their density. The goal is to obtain a mass distribution in the simulation character that best reflects the real mass distribution of your own character. Keep in mind that mass objects are not involved with collisions.
To reshape the mass objects:
- Right-click in the viewport and turn off Collision Objects. This will hide all collision objects in the viewport. Also, right-click in the viewport and select Joints and Bones. This will display joints, which is useful when positioning mass objects.
- Select the PelvisMass mass object.
- Use the Move tool to move this mass object to a more central position inside the hip region of the skin mesh. Keep in mind that when you are positioning a mass object, you are positioning it with respect to its parent joint.
- Use the Scale tool to adjust the size of this mass object so that it fits the hip region of the skin mesh. Keep in mind that mass objects are often heavier than you might think. Mass objects are completely solid objects, and their overall mass is defined by their size, shape and density. In general, you should not make mass objects too big. The Standard Simulation Character has been designed so that the mass distribution reflects the typical adult male human.
- Continue reshaping mass objects along the spine joints. The UpperSpineMass mass object will also need rotating.
- Continue reshaping mass objects throughout the left-hand side of the character. When you are reshaping the HeadMass mass object, you will need to hide the HeadGraphic graphical object in order to view the mass object that is hidden inside it. Right-click on the HeadGraphic graphical object in the Node View and select Hide.
- Select the spherical HeadMass mass object and use the Move tool to position it correctly at the centre of the skin mesh head region.
- Continue reshaping the mass objects in the left arm and left leg. When you are reshaping mass objects in the hands and feet, do not make them too small. Very small mass objects may be ignored by the simulation.
- Finally, select Character > Mirror Left To Right, or click the Mirror Left To Right button in the Main Toolbar to mirror the reshaped mass objects to the right-hand side of the character.
Step 8: Reshaping the collision objects
In this step, we will adjust the collision objects of the simulation character by changing their size, position and orientation. This is often called reshaping the collision objects.
Each mass object in a character has zero or more corresponding collision objects. You can add and remove collision objects, and you can also reposition them relative to their parent mass objects. You can also resize them and change their material types. The goal is to obtain a collision surface in the simulation character that best reflects the real skin mesh shape of your own character.
To reshape the collision objects:
- Right-click in the viewport and turn on Collision Objects. Also, turn off Joints and Bones.
- Zoom in to view the lower left leg.
- Select the LeftLowerLegCollision object and use the Move and Scale tools to reposition and resize this object so that it matches the shape of calf region of the mesh. The collision object should not protrude outside the mesh, but fit as closely inside as possible.
- Note We are modeling a complex surface using relatively simple volumes such as sphyls, so there will not be a complete match between the mesh surface and your own collision surfaces. Using more collision objects will result in a more accurate representation of the skin mesh, but at the expense of slower simulation times.
- You can also create additional collision objects. Select the LeftLowerLegMass object and select Character > Create Sphyl Collision Object, or click the Create Sphyl Collision Object button in the Main Toolbar. This will create a new sphyl collision object as a child of the selected mass object. Adjust the size, position and orientation of this new collision object so that it fills the lower knee area of the left leg.
- By default, new collision objects will have their Collides With Parent, Collides With Siblings and Collides With Ancestors settings all turned on. You will need to turn these settings off where appropriate, in order to allow for any required movement. To modify these settings, select the collision object and use the Property Editor to make these changes.
- Continue reshaping collision objects throughout the left-hand side if the character.
- Finally, select Character > Mirror Left To Right, or click the Mirror Left To Right button in the Main Toolbar to mirror the reshaped collision objects to the right-hand side of the character. This command will also create or delete collision objects on the right-hand side of the character, to match the collision objects on the left-hand side of the character.
Conclusion
In this tutorial, you have learned more about using Character Edit Mode to create characters. You have learned how to display and edit joint limits, and how to use imported mesh objects as guides when reshaping mass objects and collision objects.















