Minggu, 23 Oktober 2011
Detailed examples and pseudocode
07.58 |
Diposting oleh
Gblack |
Edit Entri
In 2D computer animation, moving objects are often referred to as “sprites.” A sprite is an image that has a location associated with it. The location of the sprite is changed slightly, between each displayed frame, to make the sprite appear to move. The following pseudocode makes a sprite move from left to right:
var int x := 0, y := screenHeight / 2; while x < screenWidth drawBackground() drawSpriteAtXY (x, y) // draw on top of the background x := x + 5 // move to the right
Computer animation uses different techniques to produce animations. Most frequently, sophisticated mathematics is used to manipulate complex three dimensional polygons, apply “textures”, lighting and other effects to the polygons and finally rendering the complete image. A sophisticated graphical user interface may be used to create the animation and arrange its choreography. Another technique called constructive solid geometry defines objects by conducting boolean operations on regular shapes, and has the advantage that animations may be accurately produced at any resolution.
Let's step through the rendering of a simple image of a room with flat wood walls with a grey pyramid in the center of the room. The pyramid will have a spotlight shining on it. Each wall, the floor and the ceiling is a simple polygon, in this case, a rectangle. Each corner of the rectangles is defined by three values referred to as X, Y and Z. X is how far left and right the point is. Y is how far up and down the point is, and Z is far in and out of the screen the point is. The wall nearest us would be defined by four points: (in the order x, y, z). Below is a representation of how the wall is defined
(0, 10, 0) (10, 10, 0) (0,0,0) (10, 0, 0)
The far wall would be:
(0, 10, 20) (10, 10, 20) (0, 0, 20) (10, 0, 20)
The pyramid is made up of five polygons: the rectangular base, and four triangular sides. To draw this image the computer uses math to calculate how to project this image, defined by three dimensional data, onto a two dimensional computer screen.
First we must also define where our view point is, that is, from what vantage point will the scene be drawn. Our view point is inside the room a bit above the floor, directly in front of the pyramid. First the computer will calculate which polygons are visible. The near wall will not be displayed at all, as it is behind our view point. The far side of the pyramid will also not be drawn as it is hidden by the front of the pyramid.
Next each point is perspective projected onto the screen. The portions of the walls ‘furthest’ from the view point will appear to be shorter than the nearer areas due to perspective. To make the walls look like wood, a wood pattern, called a texture, will be drawn on them. To accomplish this, a technique called “texture mapping” is often used. A small drawing of wood that can be repeatedly drawn in a matching tiled pattern (likedesktop wallpaper) is stretched and drawn onto the walls' final shape. The pyramid is solid grey so its surfaces can just be rendered as grey. But we also have a spotlight. Where its light falls we lighten colors, where objects blocks the light we darken colors.
Next we render the complete scene on the computer screen. If the numbers describing the position of the pyramid were changed and this process repeated, the pyramid would appear to move.
Langganan:
Posting Komentar (Atom)
Blog Archive
-
▼
2011
(157)
-
▼
Oktober
(157)
- Procedural Modeling
- Features
- History and releases
- CityEngine
- Additional rendering engines
- Modules
- Overview
- Cinema 4D
- Features
- Cheetah3D
- History
- Carrara (software)
- Sintel (Open Movie Project: Durian)
- Yo Frankie! (Open Game Project: Apricot)
- Big Buck Bunny (Open Movie Project: Peach)
- Elephants Dream (Open Movie Project: Orange)
- Use in the media industry
- Support
- Development
- Comparison with other 3D software
- File format
- Workspace management
- Numeric input
- Hotkey utilization
- Editing modes
- User interface
- Features
- Suzanne
- History
- Blender (software)
- Art of Illusion
- AC3D
- Features
- Pixol
- ZBrush
- Licensing
- Surface tool/Editable patch object
- NURBS or non-uniform rational B-spline
- Polygon modeling
- Industry usage
- Integrated Cloth Solver
- Skeletons and Inverse Kinematics (IK)
- Skinning
- Constrained Animation
- Texture Assignment/Editing
- Character Studio
- Early history and releases
- Autodesk 3ds Max
- Mastering studio
- Educational studio
- Art studio
- Studio
- Video availability
- Popeye and Superman
- U.M.M. T.V. Corp./NTA/Republic
- Acquisition by Paramount
- Later period
- Sound and color
- Silent films
- Fleischer Studios
- Word coinages
- Spinach
- Cultural origins and impact
- Video and pinball games
- Popeye (1980)
- Radio
- Theme song
- Original television cartoons
- Home video
- Theatrical Popeye cartoons on television
- Famous Studios
- Fleischer Studios
- Theatrical cartoons
- Comic books
- Artists after Segar
- Thimble Theatre and Popeye comic strips
- Characters and story
- Popeye
- List of animated feature films
- Categorization
- Definition
- Film genre
- Sources of films shown in Tournees
- History
- Typical program content
- International Tournée of Animation
- Feature-length films
- Traditional animation
- Praxinoscope (1877)
- Thaumatrope (1824)
- The magic lantern
- Zoetrope (180 AD; 1834)
- Precursors to Animation
- Virtual worlds
- Computer animation
- Interactive simulation and visualization
- Generating cloth and skin images
- Anatomical models
- Architectural scenes
- Static images and landscapes
-
▼
Oktober
(157)
0 komentar:
Posting Komentar