Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 11 Animation F To understand the.

Slides:



Advertisements
Similar presentations
9.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
Advertisements

Linear Interpolation Applying “weighted averages” to some graphics problems: animations and curve-drawing.
Material obtained from a Guilford County Workshop, July, 2014 V
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 10 Behavior and Interaction.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
SE 313 – Computer Graphics Lecture 14: Armatures Lecturer: Gazihan Alankuş 1.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Computer Graphics Lab Electrical Engineering, Technion, Israel June 2009 [1] [1] Xuemiao Xu, Animating Animal Motion From Still, Siggraph 2008.
Lecture21 Other Java Gamming technologies – Java3D (This lecture will not be assessed)
Business and Computing Deanery 3D Modelling Tools Week 13 Animation.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 8 Views.
Image Morphing : Rendering and Image Processing Alexei Efros.
1 Chapter 10 Behavior and Interaction  To understand dynamic behaviors in graphics  To understand Java 3D Behavior and WakeupCondition classes  To apply.
Java 3D Pablo Figueroa University of Alberta April 2000.
Level of Detail CS184-Sp05 Section. Level of Detail Basic Idea –Use simpler versions of an object as it makes less of a contribution Generation –How to.
Animation. Outline  Key frame animation  Hierarchical animation  Inverse kinematics.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 9 Lighting and Texturing F To understand.
Painterly Rendering for Animation Barbara J. Meier Walt Disney Feature Animation SIGGRAPH 96.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
SET09115 Intro Graphics Programming
Basic 3D Graphics Chapter 5. Bird’s Eye View  Basic 3D Graphics –Basic concepts of 3D graphics, rendering pipeline, Java 3D programming, scene graph,
3-D Modeling Concepts V part 2.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
1 Review of COMPSCI 221  Chapters 1-11 in text  User Interfaces will be addressed as a take- home question.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Java ME & Blackberry APIs for Game Dev Week III. Overview Java 2D API Java 3D API SVG Blackberry APIs
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 6 Graphics Contents.
C O M P U T E R G R A P H I C S Stuff CMSC 435 / 634 Transformations 1/29 Geometric Transformations Readings: Chapters 5-6.
Shapes Properties Binding Chung Ji Hye.
CS324e - Elements of Graphics and Visualization Checkerboard World.
Java3D Overview Scene graph Java 3D classes Describing objects Groups, transforms Behaviors, interpolators Lighting.
1 Animation & Java3D ©Anthony Steed Overview n Introduction to Animation Kinematics Dynamics Boids n Java3D Scene graph Animation Vehicles.
CS 551/651 Advanced Computer Graphics Warping and Morphing Spring 2002.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 12 Additional 3D Topics.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
1 Virtual Reality Modeling Language (VRML97) ©Anthony Steed
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 3 2D Graphics: Rendering Details.
INT 840E Computer graphics Introduction & Graphic’s Architecture.
CSC505 Particle Systems. CSC505 Object Representations So far we have represented (rendered) objects with –Lines –Polygons (triangles) –Curves These techniques.
Game Programming 06 The Rendering Engine
Business and Computing Deanery 3D Modelling Tools Week 13 Animation.
CHAPTER 8 Color and Texture Mapping © 2008 Cengage Learning EMEA.
CS324e - Elements of Graphics and Visualization Java 3D Intro.
VRML Anthony Steed Department of Computer Science University College London ©Anthony Steed
CS324e - Elements of Graphics and Visualization Timing Framework.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Modeling, CG, and others Jyun-Ming Chen Fall 2001.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques Presented by SooKyun Kim.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 9 Lighting and Texturing.
1 9 Lighting a Scene v There are four types of lighting: –ambient light –directional light –point light –spotlight v Any number of these can be added to.
Computer Animation 3D Animation. How do I develop 3D models using a variety of editing tools and texturing techniques? Vocabulary: Meshes- Represent 3D.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 11 Animation.
Handle By, S.JENILA AP/IT
In the name of God Computer Graphics. Introduction Modeling techniques modeling techniques managements Some renderings.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 5 Basic 3D Graphics.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Stefan Rufer, HTA Biel, 2000 Java 3D – an Introduction Animation Interpolators Alpha Object Billboard Level of Detail (LOD) Morphing.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 5 – Animation in VRML.
1 6.Interpolation v Animation is implemented using time- based interpolation (or morphing) –time is specified using the class –time is specified using.
1© 2009 Autodesk Hardware Shade – Presenting Your Designs Hardware and Software Shading HW Shade Workflow Tessellation Quality Settings Lighting Settings.
MPEG-4 Binary Information for Scenes (BIFS)
Advanced Computer Animation Techniques
Section 2.5 Graphing Techniques; Transformations
Meshes.
Section 2.5 Graphing Techniques; Transformations
Prepared by: Engr . Syed Atir Iftikhar
Computer Graphics Lecture 15.
Chap 10. Geometric Level of Detail
Presentation transcript:

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 11 Animation F To understand the concept and methods of animation F To understand and create Alpha objects F To apply various interpolators to creating animations F To create morphing with Morph nodes and behaviors F To use LOD behaviors F To use billboard behaviors

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 2 Animation F Generate sequences of graphics renderings that vary with time F An effect of live motions F Producing frames, the intermediate results of the changing process, is often the main objective F To produce the animated graphics effects, the rendered scene must change dynamically with time F The changes may involve different attributes of the scene such as geometry, transformation, position, color, and transparency

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 3 Behavior F The Interpolator subclasses of Behavior encapsulate common animation actions F The Alpha class represents a function ot time that can be used to drive the interpolator.

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 4 Alpha F A function of time –usually periodic F Has a range from 0.0 to 1.0

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 5 Alpha Parameters F Times in milliseconds F loopCount - number of cycles (Default -1) –Use -1 to repeat forever F startTime (system start time) F triggerTime (0) F phaseDelayDuration(0) F isPaused (false), pause time (0) F alphaAtZeroDuration (0) F alphaAtOneDuration (0) F increasingAlphaDuration (1000) F decreasingAlphaDuration (0) F increasingAlphaRampDuration (0) –acceleration interval F decreasingAlphaRampDuration (0) –deceleration interval

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 6 Alpha Constructors public Alpha() public Alpha( int loopCount, long increasingAlphaRampDuration) public Alpha( int loopCount, long triggerTime, long phaseDuration, long increasingAlphaRampDuration, long alphaAtOneDuration) public Alpha( int loopCount, long triggerTime, long phaseDuration, long increasingAlphaRampDuration, long alphaAtOneDuration, long decreasingAlphaRampDuration, long alphaAtZeroDuration)

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 7 TestAlpha.java F Plots the alpha waveform for different sets of parameters F To get the value of alpha –at current time public float value() –at a specified time public float value(long atTime)

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 8 Interpolator F Interpolator is an abstract subclass of Behavior –It has a number of predefined subclasses containing typical behaviors needed for animation u For example, Color, Switch, Transparency, Transform F The idea is to set two values for a particular attribute and interpolate values in between as a function of time F Alpha object is used to trigger the changes

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 9 Interpolator F Specify endpoints F Interpolate intermediate points –Assign an Alpha object to the Interpolator

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 10 Interpolator Classes

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 11 ColorInterpolator F Interpolate between two colors for a Material Alpha alpha = new Alpha(); Material mat = new Material(); ColorInterpolator ci = new ColorInterpolator( alpha, mat, red, green); ci.setSchedulingBounds( bounds);

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 12 TransparencyInterpolator F Interpolate between two transparency values for a particular TransparencyAttributes object TransparencyInterpolator( Alpha a, TransparencyAttributes target); TransparencyInterpolator( Alpha a, TransparencyAttributes target, float t1, float t2);

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 13 TransforInterpolator F Applied to a TransformGroup F Maintains a Transform3D object to represent the operation F Has several subclasses –RotationInterpolator –ScaleInterpolator –PositionInterpolator

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 14 PathInterpolator F Two positions aren't always enough to specify a sequence of position changes F PathInterpolator allows you to specify a sequence of control points or key frames F Linearly interpolate the intermediate values between each pair of adjacent points F The timing of the interpolation related to the alpha values is controlled by a sequence of numbers called knots F Subclasses for interpolating positions and rotations

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 15 PathInterpolator Point3f [] positions = { new Point3f(0,0,0), new Point3f(1,1,0), new Point3f(2,0,0)}; float [] knots = {0f,.3f, 1f}; PositionPathInterpolator interpolator = new PositionPathInterpolator( alpha, target, axis, knots, positions);

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 16 Pendulum.java F Adds a pendulum to the clock from chapter 10 –pendulum consists of a cylinder and a sphere F Uses a RotationInterpolator to control the pendulum –Axis of rotation is y-axis by default –Add a Transform3D object to make it rotate about the z-axis (rotate by  /2 about x-axis)

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 17 A Pendulum

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 18 Morphing F Animation technique that smoothly transforms one object to another –Not limited to affine transformations

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 19 Morph Class F Morph is a leaf node class –Contains one appearance bundle –Has an array of geometries –An associated array of weights is also defined F Typically the weights are modified by a Behavior object to achieve the animation.

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 20 Weighted Sum of Geometries F The geometry of the Morph object is defined by the weighted sum of the geometries in the array

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 21 Morphing.java F Four GeometryArray objects –Two vertical tubes of different lengths u createGeometry1 –Two sections of a torus with different lengths u createGeometry2 F MorphingBehavior class sets weight based on alpha values

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 22 MorphingBehavior.java F WakeupCondition is 10 elapsed frames F Three sub-intervals for alpha values –[0, 1/3], [1/3, 2/3], [2/3, 1] –In each subinterval, interpolate between two adjacent geometries

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 23 Morphing.java Scene Graph

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 24 LOD F LOD = Level-Of-Detail F Useful for reducing the computational cost of rendering complex shapes –A visual object closer to the viewer will be larger and show more details than the same object viewed from a distance –Can render a distant object with less resolution and detail without significantly affecting the quality

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 25 LOD class F An abstract subclass of Behavior F DistanceLOD is a concrete subclass of LOD F LOD object contains a list of switch nodes –Child of each switch node is selected based on distance to the viewer F LOD also contains an array of distances that determine when to change from one level of detail to the next

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 26 TestLOD.java F Switch node with 4 children which are spheres with different numbers of divisions –First three are texture mapped with textures of different resolutions –Fourth sphere is a solid color

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 27 LOD Example

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 28 Billboard F Operates on a TransformGroup whose children will always be aligned to face the viewer –Two modes: ROTATE_ABOUT_POINT, ROTATE_ABOUT_AXIS F Useful for –Text labels –Simulating complex 3D scene with a 2D object such as an image

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 29 TestBillboard.java

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 30 AxesBillboard.java F Like Axes class except each Text3D object is attached to a TransformGroup controlled by a Billboard object F Billboard objects are set to ROTATE_ABOUT_POINT mode