Updating an Animated Scene

Slides:



Advertisements
Similar presentations
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Advertisements

Animation and CS Philip Chan. Animation Hand-drawn Early Disney movies.
Revision.
Processing Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis.
Survey of Graphics and Games. Outline Overview of computer graphics – Coursework – Research Programming using game engines Computer game and animation.
Shading Languages By Markus Kummerer. Markus Kummerer 2 / 19 State of the Art Shading.
2D Physics and Camera Systems For CSE 3902 By: Matt Boggus.
Frame Part of timeline panel You can remove normal frames from a certain layer by (MRC + Remove Frames). You can remove normal frames from a certain layer.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
TERMS TO KNOW. Programming Language A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. Each language has.
Georgia Institute of Technology Student Computer Simulation Barbara Ericson Georgia Tech Sept 2005.
EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 13 Wenbing Zhao
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 5 Working with Images Starting Out with Games & Graphics in.
Graphics Systems and OpenGL. Business of Generating Images Images are made up of pixels.
COMPUTER PARTS AND COMPONENTS INPUT DEVICES
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 7 The Game Loop and Animation Starting Out with Games & Graphics.
Stream Processing Main References: “Comparing Reyes and OpenGL on a Stream Architecture”, 2002 “Polygon Rendering on a Stream Architecture”, 2000 Department.
1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the.
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
CS 112 Introduction to Programming Graphics; Animation Yang (Richard) Yang Computer Science Department Yale University 308A Watson, Phone:
Introduction to Processing. 2 What is processing? A simple programming environment that was created to make it easier to develop visually oriented applications.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Control flow for interactive applications CSE 3541 Matt Boggus.
CIS 3.5 Lecture 2.2 More programming with "Processing"
CISC 110 Day 3 Introduction to Computer Graphics.
G RAPHICS & I NTERACTIVE P ROGRAMMING Lecture 2 More Programming with Processing.
GameDevClub CODE CHEAT SHEET NOTE: ALL OF THE CODE IS CASE-SENSITIVE AND THE SYNTAX IS STRICT SO A LOT OF YOUR ERRORS WILL PROBABLY COME FROM TYPOS If.
08 – Canvas(2) Informatics Department Parahyangan Catholic University.
Over the recent years, computer vision has started to play a significant role in the Human Computer Interaction (HCI). With efficient object tracking.
Looping I (while statement). CSCE 1062 Outline  Looping/repetition construct  while statement (section 5.1)
 Motion Tween allow us to move a shape on the stage from one place to another.  In order to use motion tween, the shape to be moved must be converted.
Digital Cameras in the Classroom Day Two Details Ann Howden UEN Professional Development
Behavior trees & The C# programming language for Java programmers
Numerical Integration for physically based animation
CPT 450 Computer Graphics 12th Lecture – Animation.
Sprites (Images) and Sounds
EEC-693/793 Applied Computer Vision with Depth Cameras
Reading and Writing Image Files
Game and animation control flow
2D Physics and Camera Systems
Layers in Adobe After Effect
Pixels, Colors and Shapes
- Introduction - Graphics Pipeline
Character Animation Forward and Inverse Kinematics
EEC-693/793 Applied Computer Vision with Depth Cameras
Image Segmentation Classify pixels into groups having similar characteristics.
Deferred Lighting.
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
EEC-693/793 Applied Computer Vision with Depth Cameras
Chapter 5 Working with Images
Game and animation control flow
GUIs and Events CSE 3541/5541 Matt Boggus.
Introduction to Object-Oriented Programming
Overview What is Multimedia? Characteristics of multimedia
Numerical integration for physically based animation
Representing Images 2.6 – Data Representation.
Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
More programming with "Processing"
Chapter I Introduction
CSCE 441: Computer Graphics Hidden Surface Removal (Cont.)
EEC-693/793 Applied Computer Vision with Depth Cameras
CSC1401 Manipulating Pictures 2
Unity Game Development
Chapter 7 The Game Loop and Animation
Presentation transcript:

Updating an Animated Scene CSE 3541/5541 Matt Boggus

Overview Unity script structure reminder Animation use-case Undo/redo use-case

Unity example script using UnityEngine; using System.Collections; public class SomeScript : MonoBehaviour { // fields void Start() { // code to run when start is pressed } void Update () { // code to run on repeat during execution } // other methods }

Animation terms frame time Scene/Hierarchy objects Initially 0, increases by 1 every time the scene is drawn time Initially 0, increases by dt (a.k.a. timestep, Δt) every update Units might be seconds, minutes, or days, etc. Unity Time and Framerate Management Scene/Hierarchy objects Geometric objects Lights Camera Note the use of your own dt value for controlling the speed of the animation vs. the Unity Time.deltatime which controls frame-rate for different hardware or run-time conditions

Animating objects P’(time+dt) = P(time) + Displacement(dt) Displacement(dt) is the change in position over the amount of time, dt, passing Can have similar equation for change in orientation How is Displacement(dt) calculated? Real-time user input Physics Behavior Key-frame data / Interpolation (Motion capture – save positions at each frame instead of computing displacement)

Time control or frame selection Braid (2008) Autodesk MotionBuilder Image from http://www.mobygames.com/game/xbox360/braid/screenshots/ Image from http://www.autodesk.com/products/motionbuilder/overview

Two approaches P(time-dt) = P’(time) - Displacement(dt) Save the cause (of the position change): Displacement(dt) Save the effect or result (of the position change) P’(time)

Timeline control – undo/redo of drawing shapes Ex: see MSPaint Removes the last drawn shape Replace removed shapes, unless a new one is drawn

Undo/Redo – two options Save the cause (the data to draw each shape) Which shape? Starting mouse (x, y) Ending mouse (x, y) Save the effect (the image after drawing the new shape) Image width * image height pixels Each pixel has a red, green, and blue value

Undo/Redo – two options Save the cause (of each drawn shape) Algorithm: to undo, clear the background and redraw shapes Storage cost: 5 ints per shape Save the effect (image after each shape is drawn) Algorithm: to undo, revert to previous image Storage cost: x * y * 3 ints per shape

Tie-in with hierarchical scenes in Unity Storing the result of a series of geometric transformations in an object’s transform is comparable to “saving the effect” Image from https://www.packtpub.com/books/content/unity-3-0-enter-third-dimension

Scene drawing options Input: 3D scene + camera Output: 2D image When to redraw? Camera change [1] Object in view moves [1] Every frame [2] Every xth frame [3] [1] if(flag_set){ draw(); flag_set = false; } [2] [3] counter = (counter + 1)%draw_rate; if(counter == 0)

Summary Unity script structure reminder Animation use-case Undo/redo use-case