Multistage animations with segments and poses - acidbubbles/vam-timeline GitHub Wiki
THIS GUIDE IS UNFINISHED
This guides explains how to create animations that have multiple stages. I find this is a good technique when you need separate animations, each with their own pose. This guide will suggest best practices, but feel free to adapt to your own needs and preferences.
The result will be similar to scenes like Succubus' Pet or The Boss.
What you'll need
- Timeline 6
- VAMOverlays (for transitions and subtitles)
- Embody (for possession)
- Keybindings is recommended to quickly navigate Timeline and toggle Embody on and off quickly. This plugin is not covered in this guide.
Planning
First of all, it's always good to have a vague idea of what you're trying to do. The more you tweak and increase the complexity of your scene, the harder it will be to make big changes. For example, here's our plan for this guide's scene:
- We'll have a male (Tom) and a female (Sarah) who are meeting up. The male waves at Sarah and says "Sarah? Is that you?". Sarah is looking away.
- Sarah is now facing Tom, and responds with "Tom! What a nice surprise!"
- Sarah puts her hand on Tom's chest and says "You know I had quite a crush on you?"
We'll keep animations to a minimum, enough to show the features and make the scene feel more alive, but we won't make animations for transitions, they will fade to black.
Setup your scene
We'll add what we need in our scene first.
Adding the person atoms
Add a male atom, name it Tom, and move it away. Add a female atom and name it Sarah. If you don't know how to do that, refer to VaM's wiki.
Adding Timeline
Add Timeline to both Tom and Sarah's Plugin tab.
In the Edit tab for both atoms, change the segment name to Intro.
We'll make Tom the "master". What that means is that when Tom animation changes, it will also change Sarah's. This is much simpler than trying to keep transitions in sync, especially if we use randomization. Go to Tom's Timeline UI, in the Sequence tab, and toggle Master on.
Adding VAMOverlays
We'll add VAMOverlays right away; add an Empty atom, rename it to Overlays so it's easy to find later. Add the plugin VAMOverlays.cslist
from hazmhox.vamoverlays
on it. We're good to go! I suggest lowering the fade in and fade out time to something short; 1 second should be enough. If you set a time that's longer than the time of the animation before it transitions to another, it will instantly black out instead of fading.
Also in Tom's Timeline, at the bottom of the Sequence tab, you'll find the VAMOverlays section. Select Overlays in the drop-down, and toggle "Fade on transition". This will automatically trigger fade out and fade it with the correct timing.
Adding Embody
We will also add Embody. Go to Tom's Plugins tab, and add Embody. In the Presets, select Passenger. This will use Tom's point of view of during the animation.
Adding a Play button
Finally, add a UIButton atom to start the scene. There should be two triggers. First, on atom Tom, storable plugin#0_VamTimeline.AtomPlugin, Play Segment Intro. Second, still on atom Tom, storable plugin#1_Embody, Active, on.
Tweak
You can also optionally add a CustomUnityAsset for the environment, add a floor, adjust lights, etc; but for this guide, we will only focus on the animation structure.
Testing your scene
Now if you click on the button, you'll see through Tom's eyes (in VR too) and the animation will play, even though nothing moves. You can stop the animation by going to Tom's Timeline UI and pressing Stop twice; the first Stop will stop progression, the second stop will reset the animation.
Save often!
Now's a good time to save your work. Remember, VaM has no undo, so don't lose an hour of work, save often! I suggest also rotating your saves, so if you break something and save, you'll have a backup too.
Animation segments
To begin, we will create a draft of how the animation will play out. This will help us try out timing, get a feel for the different poses and how they feel. From there we'll be able to animate them separately.
Saving the pose
You can now position Tom and Sarah the way you want them; Tom facing Sarah, and Sarah looking away. Once you're happy with the pose, you can save it to Timeline. Go to both atom's Timeline UI, in the Pose tab, and select Use current pose
.
Toggle Apply pose on transition
, this will make the pose change during transitions.
Adding a segment
Let's add a second segment right away. Go to Tom's Timeline UI, and select the "+" next to Animations on the top left. Select Create segment, and toggle on the Copy settings option; this will carry things over to the new animations. Name the segment Surprise, and click Create. Do the same on Sarah's Timeline. Move them into the desired pose, facing each other, and in both atom's Pose tab, click on Use current pose
and toggle Apply pose on transition
again.
If you switch from one segment to another, you should see both atoms moving into position right away. Both segments should have one animation called Main.
Transitions
We now need to transition from the first to the second segment. Select Tom, select the Intro segment, and go to the Sequence tab. In the Play next field, select Segment: Surprise, and in the Play next in slider, enter 5. This means that after playing the Intro animation for 5 seconds, the Surprise segment will play. And because we configured VAMOverlays, we'll have a nice fade to black too.
You can try it now, click on your UIButton!
Fade
To enable fading, toggle the Fade on transitions
toggle in the Sequence tab for the Surprise/Anim 1 animation. When the animation transitions from the first to the second segment, you'll see a nice transition!
Subtitles
Because we use VAMOverlays, we also get subtitles, which is pretty cool. There are other techniques to show subtitles, but we'll use this one for now.
On Tom's Timeline, click on the "+" next to Targets, and click on "Add triggers track". Now go to the Targets tab, click on the small "v" at the right of "Triggers 1", and rename the triggers track "Subtitles". Now click on "Create trigger", and add Overlays / plugin#0_VAMOverlays / Set and show subtitles / "Sarah? Is that you?".
Copy that keyframe, move to the Surprise segment, and paste. Now you can click Edit triggers and just change the text to "Tom! What a nice surprise!"
Testing your scene
Try pressing the UIButton now. It should activate Embody, and five seconds later fade to black and switch to the new pose. Congratulations, you now have enough to make a nice story!
Also, remember to save!
Recap
Here's what we did up to now:
- Empty Atom: Overlays
- VAMOverlays plugin
- UIButton Atom: Play
- Trigger: Tom, Timeline, Play Intro
- Trigger: Tom, Embody, Active = on
- Person Atom: Tom (male)
- Timeline plugin
- Edit: Overlays configured
- Segment: Intro
- Animation: Main
- Sequence, Fade on transition: on
- Sequence, Next: Surprise in 5 seconds
- Pose
- Animation: Main
- Segment: Surprise
- Animation: Main
- Pose
- Animation: Main
- Embody plugin
- Preset: Passenger
- Timeline plugin
- Person Atom: Sarah (female)
- Timeline plugin
- Segment: Intro
- Animation: Main
- Pose
- Animation: Main
- Segment: Surprise
- Animation: Main
- Pose
- Animation: Main
- Segment: Intro
- Timeline plugin
Creating the third segment
With what you learned, try adding the third segment "Touch Chest". Remember to add the segment on both atoms, configure the sequence on the Surprise segment in Tom's Timeline, copy and paste the triggers track and change the subtitles. You can do that as many times as you want and push the story further if you want, but for now we will focus on the first three stages.
Make sure the pose has Sarah facing Tom, her hand on his chest, and the face towards his.
Animating a segment
Now let's see how we can create some animations within a segment. We'll modify the Surprise segment and do a few things:
- Add controls
- Extract to layer
- Add variations (randomize)
- Add morphs
- Extract to layer
- Add variations
Additional tips
- Use same name animations on both atom's segment to keep them in sync, even when randomized (they sync across layers)
- Use triggers on the Main animation of each segment to change the environment
- Add Timeline on other atoms if you also want them to change according to the scene
- Consider adding an Empty atom with Timeline to manage the segments sequencing if you don't have a clear "master" character.