Challenge: Bring the scene to life

Exercise

Beginner

+60XP

90 mins

Unity Technologies

Challenge: Bring the scene to life

In this challenge, you’ll be tasked with creating at least five new in-editor animations, and configure at least one character to use three new imported animations that you source yourself.

By the end of this tutorial, you'll be able to demonstrate your new skills in animation.

1. Overview

In the previous tutorials, you learned how to create basic animations from scratch directly in the Unity Editor as well as how to configure and work with imported animations. These two animation skills cover the foundations of working with animation in Unity, and with them you can now create vibrant, lively scenes for your interactive experiences. Now it’s time to apply this understanding to a new challenge: bringing a new scene to life with animation.

In this challenge, you’ll be tasked with creating at least five new in-editor animations. You must also configure at least one character to use three new imported animations that you source yourself.

This will be the first time you design your own animations, so before you begin planning, take a moment to hear from our creators about what they think the greatest challenges are when creating animation:

2. Review your skills

You’ve learned a lot about animation! Let’s review everything you know so far, and how it might be used in the scene:

Keyframed animation: You can create Animation Clips for any object in the scene, and those animations can control any component on an object. You’ve worked a lot with animating an object’s position and scale, but what about its rotation, material, color, or even its visibility?

You can bypass having to add a property by just pressing the record button and making changes in the Inspector. So long as the record button is active, the Animation editor will automatically add the parameter. Keep in mind that this method only adds keyframes as you make changes to your object–it won't add ending keyframes for looping!

Creating Animator Controllers: Objects can have multiple Animation Clips, and those animations can transition between one another when you create a State Machine in an Animator Controller. You also learned how to create parameters that can be activated using a trigger collider and a script.

Triggering animation: Animation doesn’t have to start playing as soon as a scene starts. In learning how to work with Animator Controllers, you discovered that trigger colliders and scripts can be used to change states within a Controller. You can reuse the script from the door animation tutorial in this scene if you like!

Configuring humanoid animation: Any character setup to use Unity’s Humanoid Animation System can share animation. This gives you access to hundreds of animations online and on the Unity Asset Store. You learned how to configure it and add it to an Animator Controller, either as a default animation or part of a State Machine. You can reuse the dance party script from the previous tutorial or you can use a new script, which will be discussed below!

What should you animate? We’re leaving that completely up to you! When you’re exploring the scene, try to come up with a narrative around why things are set up the way they are (or feel free to change up what’s happening in the scene if you prefer!). Can you tell the story of the scene with animations alone?

3. Use the keycode trigger script

In the Scripts folder, you’ll find a script called AnimatorControllerTriggers. This script was designed for you to edit so you can trigger animations to occur for your characters and objects based on keyboard input.

To edit the script:

1. Open AnimatorControllerTriggers in Visual Studio by double-clicking the script in the scripts folder.

2. Scroll down to the Update method and find the section that directs you to duplicate the code block.

3. Select the code block, being sure to highlight the closing curly brace ( } ), and copy it with Ctrl/Cmd+C

4. Paste your new block several lines below the existing code block, but still inside the Update method (stay inside the second to last curly brace in the script).

5. Replace the A in Keycode.A with whatever key you wish. You can see a full list of available keys here.

6. In the anim.SetTrigger line, replace YOUR_TRIGGER_NAME_HERE_INSIDE_THE_QUOTES with the name of the parameter you wish to have called when the keyboard key is pressed.

7. Save the script.

8. Add the script to the object that the Animator Controller is attached to.

If you don’t feel comfortable with editing a script, you can always use the dance party script for this challenge! As a reminder, it’s mapped to use the Q, W, E, R, T, and Y keys only. To review how this script is configured and how to set up your Animator Controller to work with it, refer back to the previous tutorial.

4. Create your animations

1. In the scenes folder, locate and open ChallengeScene_Animation.

2. Review the scene and consider the narrative you might be able to communicate through different animations.

3. Identify several items that you can animate. You must create a minimum of five keyframed animations, but multiple animations can be on the same object, so long as you create an Animator Controller that will allow someone to see them all.

4. Identify a character in the scene that you wish to animate. Source a minimum of three animations online or on the Unity Asset Store.

5. Use either the AnimatorControllerTriggers script or the DanceParty script to control the animator with keystrokes.

6. Create your keyframed animations and configure the Animator Controller as needed.

7. Configure your imported animations for the humanoid animation system and add them to your selected character’s Animator Controller (they’re all using the SharedController Animator Controller from the previous tutorial).

8. Once you’ve completed your animations, record a video showing them all off!

9. If you’d like to share your hard work with the community here on Learn, submit your video!

You should expect to spend at least one hour and 30 minutes on this challenge.

5. Criteria

You’ll know you’re successful if you’ve met these criteria:

  • You’ve created at least five keyframed animations (again, they don’t all have to be on different objects!) and have imported at least three externally created animations.
  • You’ve created or customized Animator Controllers as needed to ensure all of your animations run correctly.
  • You’re able to communicate some kind of narrative or story with the animations you create.

If you find your imported animations online, make sure that if you need to, you credit the source. A text file that lists the creators, the website you got them from, and any other requested information is a good way to handle it!

Optional Step

6. More resources

Check out the below Unity YouTube video with one of our established creators to see how far you can take animation in Unity!

7. Next steps

Congratulations! You have completed the learning required for Core Animation.

You have the core skills and knowledge for one of the primary creative domains within the Unity Engine.

Now you’re ready to apply these skills in other projects! We can’t wait to see what you make next.

Optional Step

8. Submit your project

After you’ve fulfilled the requirements, please submit and share your project!
Follow these instructions to submit your project:

1. Take a screenshot or screen recording of your project in Play mode.

2. Add a submission title and description.

  • Make sure to include the image or video of your project. If you have additional details to share about your process or the project that you have created, you can share them in the description too.

3. Set who can view your submission.

  • Public: Anyone who views this tutorial.
  • Private: Just you.

4. Select Save and preview submission.

5. Check your submission preview and then complete the CAPTCHA test and select Submit and continue.

We highly recommend that you comment on at least one other creator's submission. Did they successfully complete the challenge? What do you like about the project?

Please login to submit

Complete this Tutorial

Submission Gallery

CreativeCore_Animation

CreativeCore_Animation

Project Overview: Interactive Animation & Environment ShowcaseDeveloped as part of the Unity Creative Core pathway, this project demonstrates advanced control of the Unity Animation system by synchronizing player input, environmental triggers, and multi-character behaviors. · Locomotion & Control: Features a fully controllable Third Person Character utilizing standard input mapping (WASD/Arrows to walk, Space to jump, and Shift to run) for fluid scene navigation. · Mouse-Driven Camera: Implements a dynamic third-person camera system where mouse movement controls orientation and rotation, keeping the camera automatically framed and focused on the player character · Dynamic Environmental Triggers: Stepping onto a designated activation platform triggers a physical barrier animation. Simultaneously, an animation controller dynamically scales the HDR emission intensity and spotlight intensity of street lamps, alongside emission maps on inanimate platform objects. · Choreographed Character System: The platform features seven distinct NPC characters. Pressing designated hotkeys (Q/1, E/2, R/3, T/4, Y/5, U/6) triggers a synchronized group dance sequence consisting of an idle state and six unique dance clips. · Intelligent Delay Logic: To create a natural, organic group reaction, the player character initiates the dance animation immediately upon keypress, while the surrounding seven characters join in with a randomized script-controlled delay of 0.5 to 1.5 seconds. · Camera Look: Mouse Movement (Orbits and adjusts orientation relative to the character)

L
Livache
0
0
Bring the scene to life

Bring the scene to life

Bring the scene to life

V
vaishnavr1234567890
2
1
In Da Club

In Da Club

Short video of my work for animation chalange of Creative Core Pathway. I have made animations for lights color change, light movement and speakers bounce. Also I imported animations for dancers and raper and configured them.

D
derpakarsen
12
0
BBF's Vegetal Fighter

BBF's Vegetal Fighter

A parody of my favorite fighting game series. For this challenge, I created 5 animations for Tutti Frutti (Idle, Walking, Guarding, Punching and Victory Pose) and two other for the eyes (Blink and Victory). Transitions are controlled by inputs: A = left; D = right; Space = Guard; E = Punch and Victory Pose is triggered by an "isKO" bool on Karter/Lex's script. Lex's animations are imported (Idle, Walking, Punching and KO _ Made by MAGICPOT.INC). The public's animations are imported too and vary during match or after KO (Made by MOTION CAST) Thanks for watching!

J
Jojo_Lewis
20
1
Animation_Challenge

Animation_Challenge

Using amination learnings i made a animation for a some objects .

G
gamitmanthan132
14
0
Simple animations of fruit and freaks

Simple animations of fruit and freaks

Movement with no narrative. Just things doing stuff for no reason other than practicing key frames and basic animating. Bouncing apple, pulsing lime, rocking banana, shifting camera, rotating light. The humanoid rigs change animation based on 1-4 number key presses.

M
MixnurShnuze
30
0