Portrait animation
Portrait animation
I have been watching the video Dialogue UI Tutorial 3 - Animated Portraits. However, I am struggling to add the sprites to the animation window do I need to create game objects for each sprite to add them on the animation window?
Re: Portrait animation
Hi,
If you haven't already downloaded and checked out the animated portraits example from the Dialogue System Extras page, I recommend doing that, too, so you can see how it works first-hand.
Here's how I recommend setting up animated portraits:
1. If your scene doesn't have a dialogue UI in it (e.g., as a child of the Dialogue Manager's Canvas), temporarily add one.
2. Inspect one of the subtitle panel's Portrait Image GameObjects.
3. Make sure it has an Animator component. (Your actual dialogue UI's subtitle panel should also have Animator components.)
4. Create an Animator Controller asset for your actor, and assign it to the Portrait Image's Animator component. This is just temporary, so you can create the animation(s) for the actor.
5. With the Portrait Image GameObject selected, open the Animation window (Ctrl+6) and create your animations. Example:
6. When you're done, you can unassign the Portrait Image's Animator component's Animator Controller field. The Dialogue System will set it at runtime.
7. Add a Dialogue Actor component to your actor's GameObject. Assign the actor's portrait Animator Controller to Dialogue UI Settings > Portrait Animator Controller.
8. To change animations, use regular sequencer commands with the special keyword speakerportrait. Example:
If you haven't already downloaded and checked out the animated portraits example from the Dialogue System Extras page, I recommend doing that, too, so you can see how it works first-hand.
Here's how I recommend setting up animated portraits:
1. If your scene doesn't have a dialogue UI in it (e.g., as a child of the Dialogue Manager's Canvas), temporarily add one.
2. Inspect one of the subtitle panel's Portrait Image GameObjects.
3. Make sure it has an Animator component. (Your actual dialogue UI's subtitle panel should also have Animator components.)
4. Create an Animator Controller asset for your actor, and assign it to the Portrait Image's Animator component. This is just temporary, so you can create the animation(s) for the actor.
5. With the Portrait Image GameObject selected, open the Animation window (Ctrl+6) and create your animations. Example:
6. When you're done, you can unassign the Portrait Image's Animator component's Animator Controller field. The Dialogue System will set it at runtime.
7. Add a Dialogue Actor component to your actor's GameObject. Assign the actor's portrait Animator Controller to Dialogue UI Settings > Portrait Animator Controller.
8. To change animations, use regular sequencer commands with the special keyword speakerportrait. Example:
Code: Select all
AnimatorPlay(Talk, speakerportrait);
required AnimatorPlay(Idle, speakerportrait)@Message(Typed)
Re: Portrait animation
Since I have multiple characters do I need to create a portrait game object for each character
Re: Portrait animation
Only if you want to show multiple portraits (subtitle panels) at the same time.
When a character shows its portrait image, it will show it through a subtitle panel. You don't need to create a separate GameObject specifically for the character. At runtime, the dialogue UI will get the character's portrait image animator controller from the character's Dialogue Actor component and assign it to the subtitle panel's Portrait Image > Animator component.
When a character shows its portrait image, it will show it through a subtitle panel. You don't need to create a separate GameObject specifically for the character. At runtime, the dialogue UI will get the character's portrait image animator controller from the character's Dialogue Actor component and assign it to the subtitle panel's Portrait Image > Animator component.
Re: Portrait animation
I am using timelines to start dialogues. I have assigned the characters with the dialogue actors and assigned their portrait animators. However, when I press play to test it the portrait animation doesn't work. I have tested it out not using the timeline and the portrait animator works it doesn't seem to work in the timelines.
Re: Portrait animation
Hi,
Can you assign the conversation's Actor to the timeline's Start Conversation track? And assign the Conversant to the StartConversationClip's Conversant field? This will ensure that it's using the intended Dialogue Actor and its portrait animator controller.
Here's an example of a conversation involving the Player as the conversation actor and Private Hart as the conversation conversant:
Can you assign the conversation's Actor to the timeline's Start Conversation track? And assign the Conversant to the StartConversationClip's Conversant field? This will ensure that it's using the intended Dialogue Actor and its portrait animator controller.
Here's an example of a conversation involving the Player as the conversation actor and Private Hart as the conversation conversant:
Re: Portrait animation
This is working it shows the portrait animation however in the timeline when I use this example in the dialogue
AnimatorPlay(Talk, speakerportrait);
required AnimatorPlay(Idle, speakerportrait)@Message(Typed)
It doesn't go to the next dialogue node it gets stuck or completely jumps to a different dialogue node when I remove it, it goes to next dialogue node this only happens in the timeline
I am using override settings that don't show the continue button
AnimatorPlay(Talk, speakerportrait);
required AnimatorPlay(Idle, speakerportrait)@Message(Typed)
It doesn't go to the next dialogue node it gets stuck or completely jumps to a different dialogue node when I remove it, it goes to next dialogue node this only happens in the timeline
I am using override settings that don't show the continue button
Re: Portrait animation
Hi,
Does this:
show the correct Talk animation and then, when the typewriter is done, show the Idle animation?
If so, then does it just get stuck there and doesn't advance to the next dialogue entry?
For this conversation, are the dialogue entries' Sequence fields blank? Have you overridden the conversation properties and set the conversation's Default Sequence to the sequence above?
Does this:
Code: Select all
AnimatorPlay(Talk, speakerportrait);
required AnimatorPlay(Idle, speakerportrait)@Message(Typed)
If so, then does it just get stuck there and doesn't advance to the next dialogue entry?
For this conversation, are the dialogue entries' Sequence fields blank? Have you overridden the conversation properties and set the conversation's Default Sequence to the sequence above?
Re: Portrait animation
It plays the Talk animation but when typewriter is done, it doesn't show the Idle animation in the same dialogue node. Sometimes occasionally for some characters, it doesn't show the animation at all even though it has a as portrait animator attached.
yes some of the dialogue entries' Sequence fields are blank. I can send a reproduction because it concerns two different timelines ones looped and not looped and they behave differently when using this
AnimatorPlay(Talk, speakerportrait);
required AnimatorPlay(Idle, speakerportrait)@Message(Typed)
yes some of the dialogue entries' Sequence fields are blank. I can send a reproduction because it concerns two different timelines ones looped and not looped and they behave differently when using this
AnimatorPlay(Talk, speakerportrait);
required AnimatorPlay(Idle, speakerportrait)@Message(Typed)
Re: Portrait animation
Hi,
Thanks for sending the reproduction project. I replied to you in email.
Thanks for sending the reproduction project. I replied to you in email.