Руководство по графу анимаций/Случайные движения с атрибутом ForceFollow
Материал из CryWiki Russia
(Различия между версиями)
DCamer (Обсуждение | вклад) (Новая страница: «=== Randomized motion with 'ForceFollow' links=== This tutorial, will demonstrate how to create an animation graph for '''motion randomization'''. For that, we'll us...») |
Alex626 (Обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
- | + | {{В_процессе_перевода}}<br> | |
- | + | ||
- | * Create a new view and new states.<br | + | === Randomized motion with 'ForceFollow' links === |
- | [[Image: | + | |
+ | 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: | + | |
+ | [[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 '' | + | *We use the template, 'IdleOneShot'. |
- | * | + | *FooSample1 |
- | * | + | *Same above except with a different animation string. |
- | + | For this, you can use the clone utility. | |
+ | |||
- | + | [[Image:CryEngine AGT RandomizedMotion agtutor2 clone util.png]] | |
- | + | ||
- | * | + | *FooSample2 |
- | + | ||
- | + | *Same above except with a different animation string. | |
- | * | + | *Link the states as follows<br> |
- | + | [[Image: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.<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> |
- | + | ||
- | + | [[Image:CryEngine AGT RandomizedMotion agtutor2 forcefollow tips.png]] | |
- | + | ||
- | [[Image: | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | Test it using 'ag_' commands | |
- | + | ||
- | + | [[Image:CryEngine AGT RandomizedMotion agtutor2 check result.png]] | |
- | [[Image: | + | |
- | 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]] |
Версия 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.
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.
We use the Stance input in this tutorial again.
- Set up the states as follows
- FooRandomGate
We use just the Default template because we don't need any animation for this state. Set the 'Stance' criterion to test_random.
- FooSample0
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.
- FooSample2
- Same above except with a different animation string.
- Link the states as follows
- Edit the 'ForceFollow' attributes
right-click the dot in the middle of link curve, then a popup shows as follows.
Set the Force follow chance to 1 for all 3 links. Then all 3 states have the same chance of forwarded.
- After editing, you can see a small digit right beside the dot of the link shows the value of it as follows.
Test it using 'ag_' commands
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.