My First: Item Animation
My First Door
A door is one of the simpler animatable objects you can make. In our example we'll have 2 different types of doors: A single and double door.
We'll have 3 files: A base file with both doors rigged and two animation files; one for each of the doors.
In the base maya file we have the two doors rigged and sorted into two separate layers.
Note that in this case the mesh is part of the rig hierarchy and is parented to an animation joint.
Currently the animation manager only writes data to joints. So please use joints when creating animated items.
Each animation file references the base file and has an animation on a different door.
In each file the Animation Manager data is on the root of the door that is animated in the file
In this case we could also merge both animation files. Technically the animation of one door does not get in the way of the other door.
From the base file with this set up you can export all the relevant data with the MLE script.
Once you're done exporting open The Divinity Engine 2, load a mod and level, open the content browser and select or make a correct package.
Add resource and import an animation for all 4 exported door animations. Import the models as models and the physics as physics.
Before we make a Root Template for the object we need to assign the animations to the doors. Open the visual resource and go to the default animations tab.
Change the Animation Set Type to Item. This should give you a default set of animations slots appropriate for an item.
Add the open door animation to the Open slot in the Default Animations Tab. Add the close door animation to the Close slot in the Default Animations Tab.
Now we can make a root template so we can preview the animation in the editor. Create a new root template, set the type to item and assign the model and the physics to their appropriate slots.
Create the root template and place this new root in an appropriate folder.
Once the root template is made open the side bar and add to the Use Actions the Door action. Place the root template in game go into game mode and try out your new animated door.
My First container
For a container the set up is pretty much the same. A simple rig with a single animating bone.
However, a container is a single mesh with only part of it rotating. Rather than have the mesh be part of the rig hierarchy it'll be seperate and skinned to the rig.
The exporter can find the rig an object is skinned to, but it is advised to keep the two in a single layer.
The export set up with animation files referencing the base file remains the same. Setting up the animaiton data and exporting remains the same as well.
Importing and creating the root remaind the same too. The use action changes though. You set the use action to open/close instead.
You'll also need to define the Treasure UI Type and give Treasure a treasure stats to have it fully function as a container .
For more information on: |
Use Actions: Use Actions |