Руководство по графу анимаций/Случайные движения с атрибутом ForceFollow

Материал из CryWiki Russia

(Различия между версиями)
Перейти к: навигация, поиск
(Новая страница: «=== Randomized motion with 'ForceFollow' links=== This tutorial, will demonstrate how to create an animation graph for '''motion randomization'''. For that, we'll us...»)
Строка 1: Строка 1:
-
=== Randomized motion with 'ForceFollow' links===
+
{{В_процессе_перевода}}<br>
-
This tutorial, will demonstrate how to create an animation graph for '''motion randomization'''. For that, we'll use the ''''ForceFollow'''' attribute of links.
+
-
* Create a new view and new states.<br />
+
=== Randomized motion with 'ForceFollow' links  ===
-
[[Image:CryEngine_AGT_RandomizedMotion_agtutor2_view_states.png]]
+
 
 +
This tutorial, will demonstrate how to create an animation graph for '''motion randomization'''. For that, we'll use the ''''ForceFollow'''' attribute of links.
 +
 
 +
*Create a new view and new states.<br>
 +
 
 +
[[Image:CryEngine AGT RandomizedMotion agtutor2 view states.png]]  
  The 'FooRandomGate' state is a gate state which forwards the current state to one of linked states when selected.
  The 'FooRandomGate' state is a gate state which forwards the current state to one of linked states when selected.
  Other states are just sample animation states for randomization.
  Other states are just sample animation states for randomization.
-
* Set up inputs for testing.<br />
+
*Set up inputs for testing.<br>
-
[[Image:CryEngine_AGT_RandomizedMotion_agtutor2_input.png]]
+
 
 +
[[Image:CryEngine AGT RandomizedMotion agtutor2 input.png]]  
 +
 
 +
We use the '''Stance''' input in this tutorial again.
 +
 
 +
*Set up the states as follows
 +
 
 +
*FooRandomGate<br>
 +
 
 +
[[Image:CryEngine AGT RandomizedMotion agtutor2 foorandomgate.png]]
 +
 
 +
We use just the Default template because we don't need any animation for this state. Set the 'Stance' criterion to test_random.
 +
 
 +
*FooSample0<br>
 +
 
 +
[[Image:CryEngine AGT RandomizedMotion agtutor2 foosample0.png]]
 +
 
 +
It's a force-followed state. So it doesn't need the 'Allow selection' check.
-
We use the '''Stance''' input in this tutorial again.
+
*We use the template, 'IdleOneShot'.
-
* Set up the states as follows
+
*FooSample1
-
* FooRandomGate<br />
+
*Same above except with a different animation string.
-
[[Image:CryEngine_AGT_RandomizedMotion_agtutor2_foorandomgate.png]]
+
For this, you can use the clone utility.
 +
-
We use just the Default template because we don't need any animation for this state.
+
[[Image:CryEngine AGT RandomizedMotion agtutor2 clone util.png]]
-
Set the 'Stance' criterion to test_random.
+
-
* FooSample0<br/>
+
*FooSample2
-
[[Image:CryEngine_AGT_RandomizedMotion_agtutor2_foosample0.png]]
+
-
It's a force-followed state. So it doesn't need the 'Allow selection' check.
+
*Same above except with a different animation string.
-
* We use the template, 'IdleOneShot'.
+
*Link the states as follows<br>
-
* FooSample1
+
[[Image:CryEngine AGT RandomizedMotion agtutor2 links.png]]
-
* Same above except with a different animation string.
+
*Edit the 'ForceFollow' attributes
-
For this, you can use the clone utility.<br />
+
-
[[Image:CryEngine_AGT_RandomizedMotion_agtutor2_clone_util.png]]
+
-
* FooSample2
+
right-click the dot in the middle of link curve, then a popup shows as follows.<br> [[Image:CryEngine AGT RandomizedMotion agtutor2 link edit.png]]
-
* Same above except with a different animation string.
+
Set the Force follow chance to 1 for all 3 links. Then all 3 states have the same chance of forwarded.<br> [[Image:CryEngine AGT RandomizedMotion agtutor2 forcefollow prop.png]]
-
* Link the states as follows<br />
+
*After editing, you can see a small digit right beside the dot of the link shows the value of it as follows.<br>
-
[[Image:CryEngine_AGT_RandomizedMotion_agtutor2_links.png]]
+
-
* Edit the 'ForceFollow' attributes
+
[[Image:CryEngine AGT RandomizedMotion agtutor2 forcefollow tips.png]]  
-
right-click the dot in the middle of link curve, then a popup shows as follows.<br />
+
-
[[Image:CryEngine_AGT_RandomizedMotion_agtutor2_link_edit.png]]
+
-
 
+
-
Set the Force follow chance to 1 for all 3 links. Then all 3 states have the same chance of forwarded.<br />
+
-
[[Image:CryEngine_AGT_RandomizedMotion_agtutor2_forcefollow_prop.png]]
+
-
* After editing, you can see a small digit right beside the dot of the link shows the value of it as follows.<br />
+
Test it using 'ag_' commands
-
[[Image:CryEngine_AGT_RandomizedMotion_agtutor2_forcefollow_tips.png]]
+
-
Test it using 'ag_' commands<br />
+
[[Image:CryEngine AGT RandomizedMotion agtutor2 check result.png]]  
-
[[Image:CryEngine_AGT_RandomizedMotion_agtutor2_check_result.png]]
+
-
Push 'AI/Physics' button to enable the AI.
+
Push 'AI/Physics' button to enable the AI. 'ag_debug _target_name_' 'ag_stance test_random' You can see 3 animations are randomly played* repeatedly.  
-
'ag_debug _target_name_'
+
-
'ag_stance test_random'
+
-
You can see 3 animations are randomly played* repeatedly.
+
-
[[category:Official:Animation Graph Tutorials]]
+
[[Category:Official:Animation_Graph_Tutorials]]

Версия 05:41, 25 мая 2011

Эта страница страница помечена как находящиеся в процессе перевода.


Randomized motion with 'ForceFollow' links

This tutorial, will demonstrate how to create an animation graph for motion randomization. For that, we'll use the 'ForceFollow' attribute of links.

  • Create a new view and new states.

CryEngine AGT RandomizedMotion agtutor2 view states.png

The 'FooRandomGate' state is a gate state which forwards the current state to one of linked states when selected.
Other states are just sample animation states for randomization.
  • Set up inputs for testing.

CryEngine AGT RandomizedMotion agtutor2 input.png

We use the Stance input in this tutorial again.

  • Set up the states as follows
  • FooRandomGate

CryEngine AGT RandomizedMotion agtutor2 foorandomgate.png

We use just the Default template because we don't need any animation for this state. Set the 'Stance' criterion to test_random.

  • FooSample0

CryEngine AGT RandomizedMotion agtutor2 foosample0.png

It's a force-followed state. So it doesn't need the 'Allow selection' check.

  • We use the template, 'IdleOneShot'.
  • FooSample1
  • Same above except with a different animation string.
For this, you can use the clone utility.

CryEngine AGT RandomizedMotion agtutor2 clone util.png

  • FooSample2
  • Same above except with a different animation string.
  • Link the states as follows

CryEngine AGT RandomizedMotion agtutor2 links.png

  • Edit the 'ForceFollow' attributes

right-click the dot in the middle of link curve, then a popup shows as follows.
CryEngine AGT RandomizedMotion agtutor2 link edit.png

Set the Force follow chance to 1 for all 3 links. Then all 3 states have the same chance of forwarded.
CryEngine AGT RandomizedMotion agtutor2 forcefollow prop.png

  • After editing, you can see a small digit right beside the dot of the link shows the value of it as follows.

CryEngine AGT RandomizedMotion agtutor2 forcefollow tips.png

Test it using 'ag_' commands

CryEngine AGT RandomizedMotion agtutor2 check result.png

Push 'AI/Physics' button to enable the AI. 'ag_debug _target_name_' 'ag_stance test_random' You can see 3 animations are randomly played* repeatedly.