1 / 12

MTA Exam 98-374

MTA Exam 98-374. Gaming Development Fundamentals. 98-374: OBJECTIVE 4. Understand Animation. Transform objects. LESSON 4.2. overview Lesson 4.2. In this lesson, you will review the following: Forming Deforming Moving Point distance Planes Interpolation Frames per second (FPS)

osias
Télécharger la présentation

MTA Exam 98-374

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. MTA Exam 98-374 Gaming Development Fundamentals

  2. 98-374: OBJECTIVE 4 Understand Animation

  3. Transform objects LESSON 4.2

  4. overviewLesson 4.2 In this lesson, you will review the following: • Forming • Deforming • Moving • Point distance • Planes • Interpolation • Frames per second (FPS) • Translation • Scale • Rotation

  5. Lecture Lesson 4.2 Forming and Deforming • Forming is the process of putting together texture elements to create a background or terrain using primitives. • Deforming occurs when something happens, such as an explosion, that causes the animation to break apart the texture. The image becomes distorted.

  6. lecture Lesson 4.2 Moving, Point Distance, and Planes • Moving is the process of changing the coordinates and redrawing the image on the screen to make it appear as if it is moving over time. • Point distances used to show a light source and the distance from the light source to the object. • Planes are the viewing portion of the 3-D animation; they are defined with Vector4. • The Plane structure represents a plane using a 3-D vector normal and a distance value. • Interpolation is also used to move objects; it describes how an animation transitions between values over its duration.

  7. lecture Lesson 4.2 Animation • Frames per second (FPS) is a value that represents the number of visual frames drawn each second. • The animation FPS must be consistent across platforms; therefore, you must have a way to control the speed of your animation. • Here is an example of generating a Vector that changes the object position using the time between frames for this device: Vector3 Position += IncrementXYZ * TimeBetweenFrames/ConstantScale;

  8. lecture Lesson 4.2 Translation, Scale, and Rotation • Translation • Moves the image/object horizontally, vertically, up, down, and diagonally • Scale • Used to resize an image • Rotation • Rotates the image around its own axis (revolution) or rotates around an external point (orbit) • In 3-D, all three transformations can be done using matrix algebra.

  9. Translation, Scale, and RotationCONTINUED These steps must be done in this order from left to right.

  10. lecture Lesson 4.2 Examples • Transformations in 2-D • Scale: Use a 2-D vector (2.0f, 2.0f) in the Draw() method to double the size. • Rotation: Use a float value of radians to rotate around the point marked at the origin [use MathHelper.ToRadians(20) to convert from degrees to radians]. • Translation: Change the x and y values. • 3-D Equivalents • Scale: Multiply by a scaling matrix (Matrix matrix = Matrix.CreateScale(0.5f, 0.5f, 0.5f)). • Rotation: Provide the radians of rotation; be aware of the point of origin that will determine the type of rotation. • Translation: Move objects along the x, y, and z axes.

  11. REVIEW Lesson 4.2 Can you answer these? • How are objects transformed? • Where is translation (scale and rotation) applied within the code? • Describe each of the following in the context of animation: • Moving • Point distances • Planes

  12. ADDITIONAL RESOURCES Lesson 4.2

More Related