200 likes | 346 Views
Animation. Jon Johansson. Animation. Webster, defines “animation” as a: “a motion picture made by photographing successive positions of inanimate objects (as puppets or mechanical parts)”
E N D
Animation Jon Johansson
Animation • Webster, defines “animation” as • a: “a motion picture made by photographing successive positions of inanimate objects (as puppets or mechanical parts)” • b: “Animated Cartoon, a motion picture made from a series of drawings simulating motion by means of slight progressive changes."
Animation • Animation - The best visual cue of depth and time is one of motion. • Single frame animation - generate a series of frames and convert them to an mpeg • mpeg_encode (Berkley mpeg encoder) • ppmtompeg (Berkley mpeg encoder distributed with libpbm)
Animation • Parallax - the "apparent motion" of an object against a distant background because of a perspective shift • parallax can help our brain organize the relative positions of points
Animation • the object rotates counterclockwise • red point appears to move to the left relative to the background • magenta point appears to move to the right
Animation • for our purposes we will generate a series of images, one for each step • time step • spatial movement
Animation • scientific visualization packages generally include some ability to generate a series of successive frames
MPEG Encoding • A compression standard for audio, video, and data established by the International Telecommunications Union and International Standards Organization.
MPEG-1 • MPEG-1 standard • established in 1992 • designed to produce reasonable quality images and sound at low bit rates (e.g., 352x288 images with VHS quality at 1.5 Mbits/sec) • portable results
MPEG-2 • MPEG-2 standard • established in 1994 • designed to produce higher quality images at higher bit rates (e.g., 720x480 studio quality CCIR-601 images at up to 15 Mbits/sec) • DVD video is usually encoded from digital studio master tapes to MPEG-2 format
Berkley MPEG-1 Encoder • Available from: http://bmrc.berkeley.edu/frame/research/mpeg/ • Known to compile on several Unixes: • SunOS 4.1.3 • HPUX 9.0.3 • Ultrix 4.4 • OSF • IRIX v4 • IRIX v5
MPEG Software Simulation Group (MSSG) • Provide a free encoder for MPEG 1 and 2 • mpeg2encode • Available from http://www.mpeg.org/MPEG/MSSG/ • Works under Windows 2000 (I use this) • Compiles under some unixes as well • This encoder is also distributed with ImageMagick
MPEG Encoder • Encoder is included in the VisWorkshop.zip package available by copying from • /scratch/jonj • This version compiles under Irix and the executable is included • Mpeg_encode is already installed on aurora so you just have to type • mpeg_encode param_file • Have some work to do to set up the parameter file • Sample images are available from • /scratch/dthornto/Workshop/FramesMHeimpel
MPEG Encoder • The mpeg_tutor directory contains several parameter files • Read explained.par for a good description • quality.par contains parameters for a good quality mpeg
Mpeg_encode parameters # Hi-Quality mpeg_encode parameter file # Robert Wenzlaff # # ******* Stuff you NEED to set ************************ OUTPUT quality-f-lc.mpg BASE_FILE_FORMAT PPM YUV_SIZE 360x288 #INPUT_CONVERT tgatoppm * # If you have ppm files comment this out INPUT_DIR . # Read from the current directory INPUT Regframe.*.ppm [1000-1098] END_INPUT
NetPBM • utilities for primitive manipulation of graphic images • converters from one graphics format to another • mpegs by: • ppmtompeg • can be built on many Unices including: Linux, AIX, Irix • get the package from • http://netpbm.sourceforge.net/
IrfanView (Windows) • freeware by Irfan Skiljan from Austria • http://www.irfanview.com/ • converts between almost 100 image formats • allows for some basic image manipulation • I use this almost every day – I find it extremely useful
TMpgEnc (Windows) • originally the Tsunami Mpeg Encoder • http://www.tmpgenc.net/ • shareware by Hiroyuki Hori from Japan • mpeg 1 encoding is free – must license to do mpeg 2 encoding past a 30 day trial
Mpeg Encoding • in order to create an mpeg animation from a set of frames I will typically: • use IrfanView to convert the batch of images to .bmp format • point TMpgEnc at the first .bmp in the series and click on “start” • the default values for encoding are very good, but the quality can be made better by simply increasing the bitrate