summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/UMotion/UMotionEditor/Manual/pages/ChildOf.html
blob: cc8a35038deba96eaf01849c9c04463d565edcc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<link rel="shortcut icon" type="image/png" href="../styles/UMotionFavicon.png" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>UMotion Manual - Child-Of</title>
		<link rel="stylesheet" type="text/css" href="../styles/theme_styles.css" media="screen">
		<link rel="stylesheet" type="text/css" href="../styles/treeview_styles.css" media="screen">
		<link rel="stylesheet" type="text/css" href="../styles/element_styles.css" media="screen">
	</head>
	<body>
		<div class="header">
			<div class="headerLogo">
				<img src="../styles/UMotionLogoHeader.png"></img>
			</div>
			<div class="headerBlueRight">
				<a href="https://www.soxware.com" class="headerLink">soxware.com</a>
			</div>
		</div>
		<div class="versionHeader">
			<p class="versionText">Version: <b>1.22p03</b> </p>
		</div>
		<div class="leftContent">
			<div class="leftContentInner">
				<div class="leftContentHeadline">
					UMotion Manual
				</div>
				<!-- Tree View -->
				<ol class="tree">
					
<li class="file"><a href="../UMotionManual.html">UMotion Manual</a></li>

<li class="file"><a href="Introduction.html">Introduction & Tips</a></li>

<li class="file"><a href="GettingStarted.html">Getting Started</a></li>

<li>
	<label for="VideoTutorials"><a href="VideoTutorials.html" class="treeFolderLink">Video Tutorials</a></label> <input type="checkbox"  id="VideoTutorials" /> 
	<ol>
<li>
	<label for="GeneralTutorials"><a href="GeneralTutorials.html" class="treeFolderLink">General</a></label> <input type="checkbox"  id="GeneralTutorials" /> 
	<ol>
<li class="file"><a href="QuickStart.html">Quick Start Tutorial</a></li>

<li class="file"><a href="Lesson1.html">1) Installation & First Steps</a></li>

<li class="file"><a href="Lesson2.html">2) Pose Editing</a></li>

<li class="file"><a href="Lesson3.html">3) Clip Editor</a></li>

<li class="file"><a href="Lesson4.html">4) Curves & Rotation Modes</a></li>

<li class="file"><a href="Lesson5.html">5) Config Mode</a></li>

<li class="file"><a href="Lesson6.html">6) Export Animations</a></li>

<li class="file"><a href="Lesson7.html">7) Root Motion</a></li>

<li class="file"><a href="Lesson8.html">8) Animation Events</a></li>

<li class="file"><a href="Lesson9.html">9) Pose Mirroring</a></li>
</ol>
</li>

<li>
	<label for="ProfessionalExclusive"><a href="ProfessionalExclusive.html" class="treeFolderLink">UMotion Pro</a></label> <input type="checkbox"  id="ProfessionalExclusive" /> 
	<ol>
<li class="file"><a href="ProLesson1.html">1) Importing Animations</a></li>

<li class="file"><a href="ProLesson2.html">2) Inverse Kinematics</a></li>

<li class="file"><a href="ProLesson3.html">3) Child-Of Constraint</a></li>

<li class="file"><a href="ProLesson4.html">4) Custom Properties</a></li>

<li class="file"><a href="ProLesson5.html">5) IK Pinning</a></li>
</ol>
</li>

<li>
	<label for="InPractice"><a href="InPractice.html" class="treeFolderLink">In Practice</a></label> <input type="checkbox"  id="InPractice" /> 
	<ol>
<li class="file"><a href="InPractice1.html">1) Our First Animation</a></li>

<li class="file"><a href="InPractice2.html">2) Editing Animations</a></li>

<li class="file"><a href="InPractice3.html">3) Customizing an animation for a RPG</a></li>

<li class="file"><a href="InPractice4.html">4) Unity Timeline & Weighted Tangents</a></li>
</ol>
</li>

<li>
	<label for="Jayanam"><a href="Jayanam.html" class="treeFolderLink">Jayanam</a></label> <input type="checkbox"  id="Jayanam" /> 
	<ol>
<li class="file"><a href="Jayanam1.html">UMotion Tutorial</a></li>
</ol>
</li>
</ol>
</li>

<li class="file"><a href="HowToCreateBetterAnimations.html">How to create better animations</a></li>

<li>
	<label for="ClipEditor"><a href="ClipEditor.html" class="treeFolderLink">Clip Editor</a></label> <input type="checkbox"  id="ClipEditor" /> 
	<ol>
<li>
	<label for="MenuBar"><a href="MenuBar.html" class="treeFolderLink">Menu Bar</a></label> <input type="checkbox"  id="MenuBar" /> 
	<ol>
<li class="file"><a href="MenuBarFile.html">File</a></li>

<li class="file"><a href="MenuBarEdit.html">Edit</a></li>

<li class="file"><a href="MenuBarHelp.html">Help</a></li>
</ol>
</li>

<li class="file"><a href="Preferences.html">Preferences</a></li>

<li class="file"><a href="ImportExport.html">Import / Export</a></li>

<li class="file"><a href="FKtoIKConversion.html">FK to IK Conversion</a></li>

<li>
	<label for="MainNavigation"><a href="MainNavigation.html" class="treeFolderLink">Main Navigation</a></label> <input type="checkbox"  id="MainNavigation" /> 
	<ol>
<li class="file"><a href="ProjectSettings.html">Project Settings</a></li>

<li class="file"><a href="ClipSettings.html">Clip Settings</a></li>
</ol>
</li>

<li class="file"><a href="AnimatedPropertiesList.html">Animated Properties List</a></li>

<li class="file"><a href="RootMotion.html">Root Motion</a></li>

<li class="file"><a href="RotationModes.html">Rotation Modes</a></li>

<li>
	<label for="DopesheetCurves"><a href="DopesheetCurves.html" class="treeFolderLink">Dopesheet / Curves View</a></label> <input type="checkbox"  id="DopesheetCurves" /> 
	<ol>
<li class="file"><a href="Dopesheet.html">Dopesheet</a></li>

<li class="file"><a href="Curves.html">Curves View</a></li>
</ol>
</li>

<li class="file"><a href="Playback.html">Playback Navigation</a></li>

<li class="file"><a href="Layers.html">Layers</a></li>
</ol>
</li>

<li>
	<label for="PoseEditor"><a href="PoseEditor.html" class="treeFolderLink">Pose Editor</a></label> <input type="checkbox" checked id="PoseEditor" /> 
	<ol>
<li>
	<label for="ConfigMode"><a href="ConfigMode.html" class="treeFolderLink">Config Mode</a></label> <input type="checkbox"  id="ConfigMode" /> 
	<ol>
<li>
	<label for="RigHierarchy"><a href="RigHierarchy.html" class="treeFolderLink">Rig Hierarchy</a></label> <input type="checkbox"  id="RigHierarchy" /> 
	<ol>
<li class="file"><a href="IKSetupWizard.html">IK Setup Wizard</a></li>

<li class="file"><a href="MirrorMapping.html">Mirror Mapping</a></li>
</ol>
</li>

<li class="file"><a href="Configuration.html">Configuration</a></li>

<li class="file"><a href="ConfigDisplay.html">Display</a></li>
</ol>
</li>

<li>
	<label for="PoseMode"><a href="PoseMode.html" class="treeFolderLink">Pose Mode</a></label> <input type="checkbox"  id="PoseMode" /> 
	<ol>
<li class="file"><a href="Tools.html">Tools</a></li>

<li class="file"><a href="Channels.html">Channels</a></li>

<li class="file"><a href="Selection.html">Selection</a></li>

<li class="file"><a href="PoseDisplay.html">Display</a></li>

<li class="file"><a href="Animation.html">Animation</a></li>
</ol>
</li>

<li>
	<label for="Constraints"><a href="Constraints.html" class="treeFolderLink">Constraint System</a></label> <input type="checkbox" checked id="Constraints" /> 
	<ol>
<li class="file"><a href="InverseKinematics.html">Inverse Kinematics</a></li>

<li class="file"><a href="ChildOf.html"><b><u>Child-Of</u></b></a></li>

<li class="file"><a href="CustomProperty.html">Custom Property</a></li>
</ol>
</li>

<li class="file"><a href="Options.html">Options</a></li>

<li class="file"><a href="ToolAssistant.html">Tool Assistant</a></li>
</ol>
</li>

<li class="file"><a href="EditInPlayMode.html">Edit In Play Mode</a></li>

<li class="file"><a href="UnityTimelineIntegration.html">Unity Timeline Integration</a></li>

<li class="file"><a href="UMotionAPI.html">UMotion API</a></li>

<li class="file"><a href="ExportingAnimationsFAQ.html">Exporting Animations FAQ</a></li>

<li class="file"><a href="Support.html">Support / FAQ</a></li>

<li class="file"><a href="ReleaseNotes.html">Release Notes</a></li>

<li class="file"><a href="KnownIssues.html">Known Issues</a></li>

<li class="file"><a href="Credits.html">Credits</a></li>

				</ol>
			</div>
		</div>
		<div class="mainContent">
			<div class="mainContentInner">
				<h1 class="headline1" id="">Child-Of <span class="professionalTag">Professional</span></h1><p class="textBlock">With the Child-Of Constraint it is possible to change the parent of a joint/transform during an animation. This is useful for <b>pick-up</b>, <b>throwing</b> or <b>gun reloading</b> animations.</p><p class="textBlock">Please note, that due to the fact that Unity uses a Vector3 for scaling, it is technically not possible for the Child-Of constraint to correctly distort a joint/transform when the parent is scaled and the child is rotated. That's why the decision was made that the scale is never updated when the new parent's scale is changing.</p><p class="textBlock">Only one Child-Of Constraint can be added per joint/transform.</p><h2 class="headline2" id="">Dealing With Spaces</h2><p class="textBlock">Whenever the parent of any object (joint or transform) is changed by using the Child-Of constraint, you need to remember that this will also change the space the object's local position and rotation values. Think of the "zero" local position/rotation. As it the local position/rotation values are relative to the parent the object will be in completely different world space position depending if the parent is changed.</p><p class="textBlock">When changing the parent within an animation (either by keying the <b>Parent</b> or the <b>IK Pinning</b> property) also the space of the object's position/rotation will change from this frame on. Thus it is necessary to key the object's new position and rotation values at the same frame. If this would not be done, the position/rotation values of the previous parent's space would be used within the new parent's space which would produce some incorrect results.</p><p class="textBlock">It is also necessary to create a key for the object's position/rotation in the previous parent's space one frame before the parent is changed. Without this key, the animation curve would gently interpolate from the last position/rotation key (which is in the previous parent's space) to the position/rotation keys in the new parent's space. This would result in values that are neither in the previous nor in the new parent's space.</p><img src="../images/IKPinning2Keys.png" class="image"></img>
<p class="imageText">Child-Of Changing Parent - 2 position/rotation keys are necessary</p><img src="../images/ChildOfSpacesCurve.png" class="image"></img>
<p class="imageText">Child-Of Changing Parent - Position curve in different spaces</p><p class="textBlock">As you can see in the above screenshots without the key on frame 5, the curve would gently interpolate from frame 0 to frame 6. Between frame 5 and 6 the spaces are changed within one frame.</p><p class="textBlock">The good news is that UMotion automatically creates these keys whenever a new parent key is created. But it is in your responsibility to keep those keys up to date. That means that whenever you move or delete the parent key you need to move or delete the position/rotation keys accordingly.</p><h3 class="headline3" id="">Updating Position/Rotation Keys</h3><p class="textBlock">When you want to update the position/rotation of the object at the frame where the parent was keyed (or one frame before) it is necessary to update also the keys that are in the other space accordingly. Therefore, right click on the <b>Parent</b> or <b>IK Pinned</b> property and click on <b>Update Position and Rotation Keys</b>. This will automatically update the corresponding position/rotation keys in the other space. If keys have been deleted they will be recreated. This context menu item is only available at the frame where the <b>Parent</b> or <b>IK Pinned</b> property has a key or one frame before.</p><img src="../images/ChildOfChannelsContext.png" class="image"></img>
<p class="imageText">Child-Of Parent Channel - Context Menu</p><p class="textBlock">When creating a parent key (that changes the current parent) and there are existing position/rotation keys at frames afterwards a dialog will automatically appear asking if the existing keys should be converted to be in the new parent's space.</p><h2 class="headline2" id="">Setup</h2><img src="../images/ChildOfConstraintSetup.png" class="image"></img>
<p class="imageText">Child-Of Constraint - Setup</p><table class="themeTable">
    <tr class="themeTableRow">
        <th class="themeTableHeader">UI Element</th>
        <th class="themeTableHeader">Description</th>
    </tr>
    <tr class="themeTableRow">
        <td class="themeTableCell" style="white-space: nowrap;">IK Pinning Mode</td>
        <td class="themeTableCell">The IK Pinning Mode can be enabled on the IK handle to extend the <a href="InverseKinematics.html" class="link">Inverse Kinematics Constraint</a> with pinning functionality. In this mode the Parent property of the Child-Of constraint is replaced by an IK Pinning toggle (on/off) property (see below).
        </br></br>
        When an IK handle is pinned its parent is changed to be the root GameObject thus making it stay at its current position even if other bones are moved. When not being pinned the regular parent of the IK handle is used. Thus it is recommended to use the parent bone of the IK chain as IK handle parent (e.g. for the "IK_Left_Hand" the parent should be "LeftShoulder" or for the "IK_Left_Foot" the parent should be the "Hips").
        </br></br>
        The <a href="IKSetupWizard.html" class="link">IK Setup Wizard</a> is automatically setting up the IK pinning.
        </td>
    </tr>
</table><h2 class="headline2" id="AnimatedProperties">Animated Properties</h2><table class="themeTable">
    <tr class="themeTableRow">
    <th class="themeTableHeader">Property</th>
        <th class="themeTableHeader">Description</th>
    </tr>
    <tr class="themeTableRow">
        <td class="themeTableCell" style="white-space: nowrap;">Parent</td>
        <td class="themeTableCell">Selects a new parent. If none is selected, its original parent is used.</td>
    </tr>
    <tr class="themeTableRow">
        <td class="themeTableCell" style="white-space: nowrap;">IK Pinned</td>
        <td class="themeTableCell">This property replaces the parent property when "IK Pinning Mode" was enabled. When an IK handle is pinned, it stays in position even if the rest of the model is moved. This is achieved by making the IK handle a child of the root GameObject.</td>
    </tr>
</table>
				<div class="mainContentFooter">
					<p class="textBlock" style="float:left">Copyright © 2017 - 2020 Soxware Interactive ALL RIGHTS RESERVED</p>
					<p class="textBlock" align="right"><a href="https://forum.unity.com/threads/new-umotion-animation-editor-released.490618/" class="link">Unity Forum Thread</a> | <a href="https://www.facebook.com/Soxware/" class="link">Facebook</a> | <a href="https://twitter.com/SoxwareInteract" class="link">Twitter</a> | <a href="https://www.youtube.com/channel/UCCuE6nI5gHvUQjx0lo6Twtg" class="link">Youtube</a></p>
				</div>
			</div>
		</div>
	</body>
</html>