Difference between revisions of "My first: Animation"
JoykaDeReyst (talk | contribs) (→My First Character Animation) |
JoykaDeReyst (talk | contribs) (→Examples) |
||
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
− | In this guide we're assuming that you're reusing an existing character and rig or an existing interactive item. <br | + | In this guide we're assuming that you're reusing an existing character and rig or an existing interactive item. <br \> |
− | We're also assuming you've imported resources before in the editor. <br | + | We're also assuming you've imported resources before in the editor. <br \> |
− | We'll also mention the provided export tools throughout the guide. <br | + | We'll also mention the provided export tools throughout the guide. <br \> |
− | We'll also refer to visual resources, animation sets and resources, the Side Bar and Root Templates. <br | + | We'll also refer to visual resources, animation sets and resources, the Side Bar and Root Templates. <br \> |
+ | For interactive items we'll mention use actions and how to set up a door and container <br \> | ||
+ | Finally we'll skim over how the remote console can help you test character animations <br \> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
|'''For more information on:''' | |'''For more information on:''' | ||
|- | |- | ||
− | | How to import a resource: [[My_first:_Item]] | + | | How to import a resource: [[My_first:_Item| My First Item]] |
|- | |- | ||
− | | How to create a character: [[My_first:_Character]] | + | | How to create a character: [[My_first:_Character| My First Character]] |
|- | |- | ||
− | | How to create an interactive ttem: [[My_first:_Item_-_Interactable_animated_items]] | + | | How to create an interactive ttem: [[My_first:_Item_-_Interactable_animated_items| My First Interactable Item]] |
|- | |- | ||
− | | How the export tools function: [[Modding:_Maya_Exporter]] | + | | How the export tools function: [[Modding:_Maya_Exporter| Maya Exporter Manual]] |
|- | |- | ||
− | | An Animation Resource: [[Animation_resource_panel]] | + | | An Animation Resource: [[Animation_resource_panel| Animation Resource Panel]] |
|- | |- | ||
− | | An Animation Set: [[Animation_set_resource_panel]] | + | | An Animation Set: [[Animation_set_resource_panel| Animation Set Resource Panel]] |
|- | |- | ||
− | | Visual Resources: [[Visual_resource_panel]] | + | | Visual Resources: [[Visual_resource_panel| Visual Resource Panel]] |
|- | |- | ||
− | | Root Templates: [[My_first:_Root_template]] | + | | Root Templates: [[My_first:_Root_template| My First: Root Template]] |
|- | |- | ||
| The Sidebar: [[Sidebar]] | | The Sidebar: [[Sidebar]] | ||
+ | |- | ||
+ | | Use Actions: [[:Category:Use_Actions|Use Actions]] | ||
+ | |- | ||
+ | | The Remote Console: [[ReCon]] | ||
+ | |- | ||
+ | | Remote Console Commands: [[Command_list|Command List]] | ||
|} | |} | ||
Line 31: | Line 39: | ||
* How your maya files should be structured down to the folder structure. | * How your maya files should be structured down to the folder structure. | ||
* How to define animation data for the exporter. | * How to define animation data for the exporter. | ||
− | * How to export the resources | + | * How to export the resources. |
* What type of editor resources you'll be importing for animations. | * What type of editor resources you'll be importing for animations. | ||
* How to use an animations set. | * How to use an animations set. | ||
* How to use a default animation set. | * How to use a default animation set. | ||
− | * Example for a Door | + | * Example for a Door and how this logic also applies to a container. |
− | * Example for a | + | * Example for a Bear it's base animaiton set. |
+ | * How to quickly test animations in the editor with the remote console. | ||
Included in this guide are a couple of example files: | Included in this guide are a couple of example files: | ||
− | + | [[:File:Door_Example.zip|Door example files]]<br /> | |
− | |||
− | |||
− | + | [[:File:Bear Example.zip|Bear example files]]<br /> | |
== My First animation == | == My First animation == | ||
Line 176: | Line 183: | ||
|} | |} | ||
− | == | + | ==In Depth Examples == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | [[File:LarianLogo_Icon.png|32px]] <big><b>[[My First: Item Animation]]</b></big> <br \> | |
− | + | [[File:LarianLogo_Icon.png|32px]] <big><b>[[My First: Character Animation]]</b></big> | |
− |
Latest revision as of 12:18, 7 February 2018
Introduction
In this guide we're assuming that you're reusing an existing character and rig or an existing interactive item.
We're also assuming you've imported resources before in the editor.
We'll also mention the provided export tools throughout the guide.
We'll also refer to visual resources, animation sets and resources, the Side Bar and Root Templates.
For interactive items we'll mention use actions and how to set up a door and container
Finally we'll skim over how the remote console can help you test character animations
For more information on: |
How to import a resource: My First Item |
How to create a character: My First Character |
How to create an interactive ttem: My First Interactable Item |
How the export tools function: Maya Exporter Manual |
An Animation Resource: Animation Resource Panel |
An Animation Set: Animation Set Resource Panel |
Visual Resources: Visual Resource Panel |
Root Templates: My First: Root Template |
The Sidebar: Sidebar |
Use Actions: Use Actions |
The Remote Console: ReCon |
Remote Console Commands: Command List |
In this guide we'll explain:
- How your maya files should be structured down to the folder structure.
- How to define animation data for the exporter.
- How to export the resources.
- What type of editor resources you'll be importing for animations.
- How to use an animations set.
- How to use a default animation set.
- Example for a Door and how this logic also applies to a container.
- Example for a Bear it's base animaiton set.
- How to quickly test animations in the editor with the remote console.
Included in this guide are a couple of example files:
My First animation
How do I structure my maya resources?
When creating animations we make use of maya's ability to reference scenes.
We'll have a base file with the mesh and it's rig (Animals_Bear_ABC.ma) and a sister animation folder of the same name (Animals_Bear_ABC) containing the animation files.
Each animation file has only one animation or animation sequence and has a file reference to the base file. (More on sequences later)
A file containing the rig that gets referenced we name the base file
A file referencing the base file we name the animation file
Referencing in my animation file
When starting from a new animation file we'll want to reference the base file which contains the rig. The caveat for this is the MLE doesn't support namespaces in rigs.
In your new file: Top Menu -> File -> Create Reference -> Options Square
In the options window look for Namespace Options
Select Use selected namespace as parent and add new namespace string and fill in a colon : in the textbox
Click reference and browse to your base file, select it and click reference. The base file contents should now appear in your scene
Save your animation file in the animation folder and name it: <item/characterName>_<AnimationSlotName>.
An animation slot name either refers to the name the animation will get in the engine when assigning it to a character it's Animation Waterfall or it's Visual Default Animations
For more information on: |
An Animation Set: Animation_set_resource_panel |
Visual Default Animations: Visual_resource_panel |
Confirming the structure
To make sure that your file structure is correct open the base file.
Run the MLE script and check the animations checkbox.
If you did everything correctly the Animations List should show you animations in the Animation Folder
Alternatively open an animation file.
Run the MLE script.
The Animation list should immediately be visible. A warning about missing Animation Manager Data is normal.
If neither of these cases check out make sure:
- The animation folder has the same name as your base file.
- The animation folder should be in the same folder as the base file.
Exporting the animation
With the current set up you can already export animations once they are made. Simply launch the MLE in the base file, check the animation checkbox select the relevant files and export.
From an animation file you can launch the MLE and press export right away.
By default the MLE will use the last saved timeline of an animation file to export the animation with.
However, it is possible to have multiple animations come out of a single file. It's also possible to make sure the same animation length is exported regardless of the current timeline.
For this purpose we use Animation Data.
Creating Animation Data for the exporter
To define Animation Data we use the animation manager script. This script writes data to the root of a rig as: name:AnimationName start:StartTime end:EndTime
This is also how the MLE will show the entries when in the animation file.
The animation manager supports multiple entries allowing us to define an animation sequence. A sequence is usually an animation that will concist of a start, loop and end segement.
The goal is to allow an animator to more easily set up animations that need to follow eachother up in game.
Example animation data for the knockdown animation of the bear.
When exporting from the base file the MLE will automatically export all the entries in the Animation Data as seperate animation files.
If you export a file containing the same Animation Data as the example image above you get the following files as a result:
For more information on: |
The Animation Manager: Modding:_Maya_Exporter |
Editor Resources
Once we've exported our resources it's time to import them into the editor.
Launch The Divinity Engine 2 and load in a mod and level. Open the content browser, select or create a correct package and add a resource.
Our animation files are in the same format as a model file (.lsm), but when importing in the editor we will be importing an Animation Resource.
If your animations are going to be shared across multiple character models with a similar rig then it's best to also create an Animation Set resource.
Again select or create a correct package and add a resource. This time create an Animation Set.<br\>
![]() |
Animation Resource
An animation resource when just made will just contain the animation data. However, to have it interact with other game systems you can also add Text Keys to the Animation Resource
When you want the creature to use the existing sounds you'll have to add multiple text keys. If you want the player to be able to use weapons you'll need to tell the engine to switch it's weapon state from sheated to unsheated.
If certain animations need certain effects to play in conjunction a text key will help you do the job.
Read up on the animation resource in the technical documentation to get a fully in depth look into how these resources can be expanded with extra functions.
In this guide we'll cover a few basic cases and their require text keys.
Animation Set
To more easily share your animations across multiple models with the same rig you can plug your animations into an Animation Set resource.
As a rule for characters it's prefered to work with animation resources. You can also plug in multiple animation sets into a single visual.
For more information on: |
How to import a resource: My_first:_Item |
An Animation Resource: Animation_resource_panel |
An Animation Set: Animation_set_resource_panel |