Download presentation
Presentation is loading. Please wait.
Published byLaurence Bailey Modified over 9 years ago
1
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 11 Animation
2
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 2 Objectives 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
3
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 3 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
4
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 4 Alpha SourceRun A function of time with a range from 0.0 to 1.0
5
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 5 Interpolator F Specify endpoints F Interpolate intermediate points F Driven by Alpha F Color, Switch, Transparency, Transform
6
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 6 Path Interpolator F 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
7
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 7 Interpolator Classes SourceRun
8
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 8 A Pendulum SourceRun
9
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 9 Morphing F Use the Morph leaf node class F Controlled by behavior objects F Morph contains one appearance bundle F Morph has an array of geometries F An associated array of weights is also defined F The geometry of the Morph object is defined by the weighted sum of the geometries in the array F Typically the weights are modified by a Behavior object to achieve the animation.
10
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 10 Weighted Sum of Geometries
11
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 11 Morphing Example SourceRun
12
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 12 LOD F The Level-Of-Detail (LOD) F Useful for reducing the computational cost of rendering complex shapes F A visual object closer to the viewer will be larger and show more details than the same object viewed from a distance F To render a distant object with less resolution and detail without significantly affecting the quality
13
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 13 LOD Example Source Run
14
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 14 Billboard F Operates on a target TransformGroup object so that the children of the target will always be aligned to face the viewer F Useful for text labels F Simulating complex 3D scene with a 2D object such as an image
15
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 15 Billboard Example Source Run
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.