I’m trying to create non-interactive 3D cutscenes where I animate characters like puppets and blend their various animations (walking, talking, swinging swords) resulting in film-like stories.
My problem is that with my current setup it doesn’t seem possible to blend animations together resulting in no transitions between movements.
In my cutscene’s AnimationPlayer I created an animation playback track and hooked it up to my 3D character’s AnimationPlayer:
hi, the fist thing you need is an AnimationTree, it will allow you to play more than one animation simultaneously, and can also be used to play a series of animations in sequence.
for performance I would have a scene for your playable character, and one for cinematic. games like baldurs gate 3 do this. and in godot it can make your project cleaner. for example, you can have a cinematic character that is only used in a specific cutscene, and one for a different cutscene.
for the base of the animationtree you can use a blendtree, and add a statemachine. then add a second statemachine and blend the two.
these can also be nested, you can have a blendtree inside a statemachine inside a blendtree.
Thank you, I actually have tried using the AnimationTree, but I couldn’t figure out how to play it in an AnimationPlayer (my cutscene).
Is AnimationTree meant to be used as one of the tracks in my AnimationPlayer or is it meant to replace the Player completely for the entire cutscene?
If the former, how can I play and control an AnimationTree from my cutscene’s AnimationPlayer?
If the latter, does this mean I would have to animate a complicated sequence of characters and cameras using the tree alone?
Take a look at these videos. I imagine they will be helpful. The short version is that the AnimationPlayer becomes a member variable of the AnimationTree, and you use the AnimationTree to call all animations.
Thank you, I appreciate it. I understand the gist of AnimationTree, but I’m still trying to put this all together in my head in terms of specifically cutscenes. Imagine if you had to animate a cutscene with multiple characters interacting with each other, fighting, clashing swords, running around – it sounds to me (at least right now) like a tedious and painful process to animate that with the AnimationTree (right?).
I’m starting to lean towards animating the whole thing in Blender and importing a GLTF file with cameras and characters just for the cutscene alone.
If you want to animate with AnimationTree, you could set each character in the scene up so they’re controlled by a game controller (or keyboard, or whatever). With each character, you could then individually make them do whatever using the controller. While you do, you can record that control stream to a file.
Once you have files containing control streams, you can load them and play them back into the characters.
We did a lot of that kind of thing on Saturn and PlayStation, back in the day.
Blender will work too, and with Blender you’ll have an easier time doing stuff the game doesn’t support (like, say, if you change camera angles and you need some character to be somewhere else…).
The advantage of doing it with game assets in-game and recorded input streams is you can do things like swap characters around, and record the inputs by actually playing the game if you like.
TBH, I am working on a Cutscene/Cinematics plugin right now for myself. I’ve actually got the design all over my whiteboard. I don’t think it’s a painful process to animate with an animation tree.
Here’s my thought based on your question:
There’s an AnimationPlayer and AnimationTree for each character in the scene.
There’s a Cutscene AnimationPlayer.
The Cutscene AnimationPlayer would trigger the AnimationTrees at the right time to make everything trigger at the right time - potentially by calling a script to trigger them.
There’s also no problem with using multiple AnimationPlayers in your cutscene as long as they all are triggered at the same time.
What I am working on is a Cinematic object that I can drop in and trigger inside a level. It would store all the locations of players and NPCs as well as the camera. It would then tween the camera, players, etc to starting locations for the cutscene while cutting off input I don’t want. Then it would play the cutscene, and return everything back to it’s starting location before the cutscene. At the same time I plan to add Pause/Skip/Save controls mid-cutscene.
Sadly, I don’t have an answer yet. I’m currently in the middle of implementing an InteractionComponent3D AddOn for myself.
nononono.
an AnimationTree is added alongside an AnimationPlayer. you select an animationplayer in animationtree. animationplayer stores animations, and should be used as such whenever there’s more than one or two animations. animationtree takes these animations and can run them in sequence or in parallel or both at the same time.
you should read the docs or look at a tutorial before asking these basic questions in the forum.
Before starting, it must be made clear that an AnimationTree node does not contain its own animations. Instead, it uses animations contained in an AnimationPlayer node. This way, you can edit your animations (or import them from a 3D scene) as usual and then use this extra node to control the playback.
since the AnimationPlayer can animate ANYTHING, you could use a global animationplayer and use the animations in an AnimationTree.
you could also put an animationplayer and animationtree on each character and control them with expressions, and then change their variables from the global animation player to cause different actions, and then sequence and even blend them from the global animationtree.
I feel like I’m being misunderstood here. I am fully aware of these basics. If at any time I’ve asked about how the Tree and the Player relate to each other, what I actually meant was something outside of the basics. In my case, what I meant from the start was first using AnimationPlayer to create animations for models then putting that into AnimationTree and then putting that tree back into a separate cutscene AnimationPlayer, solely for easy control with its UI of blocks on a timeline. I apologize for not making that clearer. My questions and how I frame the problem stems from the fact that I’m basically trying to shoehorn Godot into my preconceived notion of an Unreal Engine sequencer.
Thanks for the expressions tutorial, I appreciate it.
godot doesn’t add useless specific elements (for the most part, they need to deprecate AnimatedSprite), it is designed with modularity in mind, with the rule that each node does ONE thing only.
in order to create something more complex, all you have to do, like in a program, is take the basics and combine them, and godot makes sure you can do that and find clever solutions to the problems instead of trying to sell you an addon. think of the nodes like legos, you can build the eiffer tower with the blocks, you don’t need a special eiffel tower block.
case in point, the animation player. the animation player can animate anything. because it changes variables in an object, and all nodes are objects, so you can change any value.
and the animation player IS an object, because it is a node. so is the animation tree.
in order to get good results, animation tree allows using expressions to evaluate the variables in a node directly and act as a state machine for animations.
so: make an AnimationPlayer and AnimationTree for your character. make an AnimationPlayer for the level. animate the variables of character with the level AnimationPlayer and have the character AnimationTree evaluate them with expression. you can now control your characters with animation like you would with the keyboard!
yes, you can do that. the cutscene animation player is what I’m referring to as level AnimationPlayer, because you would put it in a level.
using expressions will make it easier, but I don’t see why you wouln’t be able to animate the values of a blend in a blendtree, godot is amazing like that.
no, I apologize for failing to explain myself better xD