advanced example
This commit is contained in:
1 parent
8c0a639fba
commit
6fe57915e8
99 files changed
+1329
-56
No files matched your search
@@ -0,0 +1,111 @@
|
||||
# Animacje postaci
|
||||
|
||||
`scene.skeletal_model(...)` automatycznie znajduje każdy FBX z folderu postaci
|
||||
poza plikiem samego modelu: 51 klipów fighter i 12 klipów creature.
|
||||
Wykorzystuje funkcję `_clips()` z `Content/Python/ue_workshop/characters.py`.
|
||||
Nowy FBX dodany do folderu zostanie uwzględniony przy następnym uruchomieniu skryptu.
|
||||
Trzymaj model i animacje tej samej postaci w osobnym folderze.
|
||||
|
||||
Nazwy poniżej są kluczami do `animations` i `shot.animation(...)`.
|
||||
Spacje i nawiasy z nazw plików są zamieniane na podkreślenia. Nie ma skrótów
|
||||
`idle`, `walk` i `attack`; używaj nazw takich jak `great_sword_idle` czy `mutant_swiping`.
|
||||
|
||||
Pełny przykład `examples/mixamo_characters.py` importuje wszystkie klipy.
|
||||
Plik zadania `exercises/animation_starter.py` importuje tylko dwie wybrane animacje.
|
||||
Aby udostępnić wszystkie klipy, pomiń argument `animations`:
|
||||
|
||||
```python
|
||||
character = scene.skeletal_model(CREATURE_MODEL, name="Creature", reimport=False)
|
||||
shot.animation(character, "mutant_jumping", start=240, end=360)
|
||||
```
|
||||
|
||||
Opcjonalne `animations={...}` ogranicza wybór do wskazanych plików;
|
||||
`animations={}` pozostawia tylko klipy osadzone w samym modelu.
|
||||
Krótsze klipy zapętlają się w swoim zakresie. Nakładanie zakresów automatycznie
|
||||
tworzy płynne przejście z Pythona:
|
||||
|
||||
```python
|
||||
shot.animation(character, "mutant_idle", start=0, end=60)
|
||||
shot.animation(character, "mutant_swiping", start=48, end=120)
|
||||
```
|
||||
|
||||
Wspólny zakres 48–60 miesza obie animacje przez 12 klatek (0,5 s przy 24 FPS).
|
||||
Nowy klip narasta od wagi 0 do 1, a poprzedni zanika od 1 do 0.
|
||||
Dodawaj klipy w kolejności odtwarzania. Długość blendu wynika wyłącznie z zakresów.
|
||||
Klipy stykające się końcami przechodzą bez blendu; zakresy nie mogą być identyczne
|
||||
ani całkowicie zawierać się jeden w drugim.
|
||||
Obsługiwane są przejścia między dwiema animacjami; trzy jednoczesne klipy są odrzucane.
|
||||
|
||||
|
||||
## Fighter
|
||||
|
||||
| Clip | FBX |
|
||||
|---|---|
|
||||
| `draw_a_great_sword_1` | `draw a great sword 1.fbx` |
|
||||
| `draw_a_great_sword_2` | `draw a great sword 2.fbx` |
|
||||
| `great_sword_180_turn` | `great sword 180 turn.fbx` |
|
||||
| `great_sword_180_turn_2` | `great sword 180 turn (2).fbx` |
|
||||
| `great_sword_attack` | `great sword attack.fbx` |
|
||||
| `great_sword_blocking` | `great sword blocking.fbx` |
|
||||
| `great_sword_blocking_2` | `great sword blocking (2).fbx` |
|
||||
| `great_sword_blocking_3` | `great sword blocking (3).fbx` |
|
||||
| `great_sword_casting` | `great sword casting.fbx` |
|
||||
| `great_sword_crouching` | `great sword crouching.fbx` |
|
||||
| `great_sword_crouching_2` | `great sword crouching (2).fbx` |
|
||||
| `great_sword_crouching_3` | `great sword crouching (3).fbx` |
|
||||
| `great_sword_crouching_4` | `great sword crouching (4).fbx` |
|
||||
| `great_sword_crouching_5` | `great sword crouching (5).fbx` |
|
||||
| `great_sword_crouching_6` | `great sword crouching (6).fbx` |
|
||||
| `great_sword_high_spin_attack` | `great sword high spin attack.fbx` |
|
||||
| `great_sword_idle` | `great sword idle.fbx` |
|
||||
| `great_sword_idle_2` | `great sword idle (2).fbx` |
|
||||
| `great_sword_idle_3` | `great sword idle (3).fbx` |
|
||||
| `great_sword_idle_4` | `great sword idle (4).fbx` |
|
||||
| `great_sword_idle_5` | `great sword idle (5).fbx` |
|
||||
| `great_sword_impact` | `great sword impact.fbx` |
|
||||
| `great_sword_impact_2` | `great sword impact (2).fbx` |
|
||||
| `great_sword_impact_3` | `great sword impact (3).fbx` |
|
||||
| `great_sword_impact_4` | `great sword impact (4).fbx` |
|
||||
| `great_sword_impact_5` | `great sword impact (5).fbx` |
|
||||
| `great_sword_jump` | `great sword jump.fbx` |
|
||||
| `great_sword_jump_2` | `great sword jump (2).fbx` |
|
||||
| `great_sword_jump_attack` | `great sword jump attack.fbx` |
|
||||
| `great_sword_kick` | `great sword kick.fbx` |
|
||||
| `great_sword_kick_2` | `great sword kick (2).fbx` |
|
||||
| `great_sword_power_up` | `great sword power up.fbx` |
|
||||
| `great_sword_run` | `great sword run.fbx` |
|
||||
| `great_sword_run_2` | `great sword run (2).fbx` |
|
||||
| `great_sword_slash` | `great sword slash.fbx` |
|
||||
| `great_sword_slash_2` | `great sword slash (2).fbx` |
|
||||
| `great_sword_slash_3` | `great sword slash (3).fbx` |
|
||||
| `great_sword_slash_4` | `great sword slash (4).fbx` |
|
||||
| `great_sword_slash_5` | `great sword slash (5).fbx` |
|
||||
| `great_sword_slide_attack` | `great sword slide attack.fbx` |
|
||||
| `great_sword_strafe` | `great sword strafe.fbx` |
|
||||
| `great_sword_strafe_2` | `great sword strafe (2).fbx` |
|
||||
| `great_sword_strafe_3` | `great sword strafe (3).fbx` |
|
||||
| `great_sword_strafe_4` | `great sword strafe (4).fbx` |
|
||||
| `great_sword_turn` | `great sword turn.fbx` |
|
||||
| `great_sword_turn_2` | `great sword turn (2).fbx` |
|
||||
| `great_sword_walk` | `great sword walk.fbx` |
|
||||
| `great_sword_walk_2` | `great sword walk (2).fbx` |
|
||||
| `spell_cast` | `spell cast.fbx` |
|
||||
| `two_handed_sword_death` | `two handed sword death.fbx` |
|
||||
| `two_handed_sword_death_2` | `two handed sword death (2).fbx` |
|
||||
|
||||
## Creature
|
||||
|
||||
| Clip | FBX |
|
||||
|---|---|
|
||||
| `left_turn_45` | `left turn 45.fbx` |
|
||||
| `mutant_breathing_idle` | `mutant breathing idle.fbx` |
|
||||
| `mutant_dying` | `mutant dying.fbx` |
|
||||
| `mutant_flexing_muscles` | `mutant flexing muscles.fbx` |
|
||||
| `mutant_idle` | `mutant idle.fbx` |
|
||||
| `mutant_jumping` | `mutant jumping.fbx` |
|
||||
| `mutant_left_turn_45` | `mutant left turn 45.fbx` |
|
||||
| `mutant_right_turn_45` | `mutant right turn 45.fbx` |
|
||||
| `mutant_right_turn_45_2` | `mutant right turn 45 (2).fbx` |
|
||||
| `mutant_run` | `mutant run.fbx` |
|
||||
| `mutant_swiping` | `mutant swiping.fbx` |
|
||||
| `mutant_walking` | `mutant walking.fbx` |
|
||||
Reference in new issue
Block a user