3D graphics and animation software development processes

zhaozj2021-02-08  232

The display of the three-dimensional graphics and animation scenes is the process of complex the established three-dimensional spatial model with computers, ultimately displayed on a computer 2D screen. Generally, design 3D graphics software should pass through the following steps: A. Establish a three-dimensional model. (Take OpenGL (Open Graphics Library) as an example, OpenGL is an open graphics library that can be run in UNIX, Windows 95, Windows NT, etc.) B. Set the window and viewpoint of viewing objects (viewpoint). C. Set the properties of each object (such as color, lighting, texture mapping, etc.) D. If you want to move, you have to perform graphical transformation (such as geometry, window transformation, projection transformation, etc.). E. Three dimensional graphic. The process is as follows: Using the OperNGL library function, we can easily follow the steps to implement the design of the 3D graphics processing software. 1. Establish a three-dimensional model to establish a three-dimensional model, which is painted in three-dimensional coordinate system. Complex spatial models can be established with functions such as Point, Plotting Carters, Plugging Polygon. When representing three-dimensional space, homogeneous coordinate is generally used. A series of vertices (Vertex) is generally organized to form an object or element. 2. Set the area of ​​the window and the viewport graphic display called the display window. The process order is: Define a window is usually completed by the following steps: Settings Window Mode, Settings Window Location, Size, Initialization Window, Window Color Settings. Cleaning the window refers to a color of a color. To watch the scene, you also need a window, that is, the viewport. Popularly, the viewport is large, the scene is amplified; the viewport is small, the scene is reduced. 3. Setting the light to make the object with a true sense, it is necessary to illuminate the object. In computer graphics, the actual sensing of objects consider two factors: light source and object material. Light source: For the eye, the light irradiation object can see two light: reflected light and transmission light, wherein the reflected light has three components: ambient reflection, diffuse reflection and mirror reflection. The implementation process of the light source is: commonly used: ambient light, diffuse reflected light, mirror reflected light, light source position, point light source concentrating index, point light source concentrating index, point light source hair loss angle. Material: The color of the material is defined by the reflectance of the object to R, G, and B light, which is also divided into ambient light, diffuse reflected light, and the specular reflected light. 4. Animated three-dimensional animation is to transform the three-dimensional object through a variety of three-dimensional graphics and project it into the viewport. OpenGL offers a dual-cache to make an animation. The computer is simultaneously displayed in the front cache, and the next frame is drawn in the background cache, and when you need to display the screen in the background cache, just use the function to swap the front and rear tanks: Graphical transformation common functions, there is: translation, Rotate, conflate. The three-dimensional graphics are viewed by a two-dimensional view (screen), so the three-dimensional graphics should be projected and perspective.

转载请注明原文地址:https://www.9cbs.com/read-1579.html

New Post(0)