1 / 10

Computer Graphics Animation Basics

Learn about animation in computer graphics, including frame rates, video formats, and timing. Explore various animation options and techniques.

jhartsell
Download Presentation

Computer Graphics Animation Basics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CPT 450 Computer Graphics 12th Lecture – Animation

  2. Animation • A series of images (of the same size), shown in rapid succession, to give the illusion of motion to the human brain. • Animation is not new to computer graphics and was done using hand drawn frames (as in cartoons) or using still photographs (see Edison’s National Historical Site in West Orange, NJ.)

  3. Monitors • In the USA, standard TV broadcasts 30 frames per sec • Computer monitor have refresh rates > 60 Hz to avoid interference with lighting. (users complain of flicker, headaches, etc.) • Interlaced scan – screen refreshed at twice the frame rate. • First pass, the odd number rows of pixels are updated. • Second pass, the even rows of pixels are updated. • This scheme makes the motion appear smoother. • Progressive scan – all the rows of pixels are updated sequentially, in one pass. Used by computer monitors.

  4. Frame Rates • Frame rate (Hz) = 1 / (time interval in seconds) (frames/sec or Hz) = 1000 / (time interval in mSecs) • Too slow - the motion will appear jerky, like an old silent movie. (< 12 frames per second or Hz) • Too fast - faster than the monitor can update - can cause image tearing. (> ~85 Hz, see your graphics card and monitor specs.) • Just right - To give the appearance of smooth motion, you should try to use a frame rate of at least 30 Hz. * Depends on speed of object moving within the frames. Larger changes between frames require faster frame rates.

  5. Temporal Aliasing • If the frame rate is too slow, you may see wheels turning in the wrong direction – a strobe effect. • The is called temporal aliasing. • It is analogous to spatial aliasing, except in the time domain, instead of in the spatial domain. • Aliasing occurs when the rate is below the Nyquist frequency.

  6. Video Formats • A wide variety of format exist for displaying video. • QuickTime, Flash, AVI, animated GIF, MPEG, MOV, … • AVI is short for "Audio Video Interleave", the file format for Microsoft's Video for Windows standard • MOV (Quick Time Movie File Extension) is a video and animation system developed by Apple Computer • MPEG1, MPEG2 - Motion Picture Experts Group • Frame rate - These formats are expected to played back at a certain frame rate. • Streaming versus non-streaming • Compressed versus non-compressed • Common players - Windows Media Player, Apple Quick Time, Real Player

  7. Timing • Timing is very important! 2 methods • Clock watching • sit in a loop and watch the system clock until we reach the desired time. Do doEvents Loop While (currentTime() < endTime) • Use Timer control. • Important properties: • Interval property (msec) • Enabled property (boolean) • Your code inside timer event is executed every “interval” milliseconds. • Timing is not exact, but close enough for us.

  8. Animation Options • Clear and Redraw - Clear everything and then redraw everything. • Store animation frames for replay or compute them in real time. (This can be computationally intensive). • Save background image and only redraw changes in foreground. • Double buffering

  9. Animation • Simulation - applying the laws of Physics. Used by academia, industry and the military. And in project 3! (See Stephens’ planets demo) • Scripts – contain lists of positions and angles of objects at each discrete time. Sensors can be placed on human body to record these positions. This technique is used by the movie industry. • Sprites: a programming abstraction that represents some object in animation. Sprite classes contain methods to moveSprite and drawSprite • Tweening & Morphing – in between frames are interpolated

  10. Project 3 • Use clear and redraw approach, inside of a timer event. • Choose appropriate frame rate, based on your computer’s speed. • Class mySprite contains methods for drawing and moving the sprite.

More Related