Accelerated terrain rendering method based on graphics processor

A graphics processor and terrain rendering technology, applied in the field of graphics, can solve problems such as performance degradation and increase the number of triangles drawn, and achieve the effects of saving resources, eliminating T-shaped cracks, and improving processing performance

CN102750725AInactive Publication Date: 2012-10-24南京安讯网络服务有限公司
2 Cites 29 Cited by

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
Publication Date
2012-10-24
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses an accelerated terrain rendering method based on a graphics processor. Not only a problem of a T-shaped crack occurring in a level of detail (LOD) rendering process can be solved effectively, but also operation resource of a central processing unit (CPU) is saved, and a processing performance of the CPU is improved due to the fact that calculation is based on the graphics processor. By means of the method, a large-scale terrain can be rendered on a computer only supporting Direct three-dimensional (3D) 9 in high quality and high performance mode, and the method can be widely applied to 3D games and virtual reality application programs. The accelerated terrain rendering method includes the following steps: dividing an original terrain image into a plurality of terrain blocks with same area; using LOD terrain rendering arithmetic, and building different LOD-level vertex buffer and index buffer; using a quad-tree to organize the whole original terrain, each leaf node corresponds to a terrain block; rendering the terrain; using a graphics processing unit (GPU) to conduct Vertex Shader programming, obtaining height value of a terrain block vertex from a height map by using a vertex texture sampling function; and modifying the height value of a vertex.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] technical field

[0002] The invention relates to the field of graphics, in particular to a method for rendering three-dimensional terrain based on a graphics processor. Background technique

[0003] Large-scale terrain rendering is an important part of virtual natural scenes. At present, the calculation method based on the central processing unit (CPU) is usually used in domestic and foreign game terrain rendering to calculate the level of detail. Although it can greatly reduce the number of triangles rendered, the disadvantage is that every Every frame needs to update the triangle data transmitted from the CPU to the GPU, occupying precious CPU resources and bus bandwidth.

[0004] With the improvement of graphics algorithms and the performance of computer graphics cards in recent years, it has become possible to fully utilize the performance of graphics processing units (GPUs) to generate real-time terrain. T-shaped cracks will appear at the transition of diff...

Examples

Embodiment Construction

[0041] The technical solutions provided by the present invention will be described in detail below in conjunction with specific examples. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention.

[0042] The native terrain rendering method includes the following steps:

[0043] (1) First, obtain the original terrain image, the length and width of the original terrain are equal, and the length and width of the original terrain are evenly divided into 2 N equal parts, that is, there are 2 in both length and width N +1 vertex, which divides the entire terrain into 2 N x2 N A terrain block (Block) of equal area. In this example such as figure 1 As shown in the figure on the left, N is set to 16, that is, the entire terrain is divided into 16x 16=256 terrain blocks (Blocks) with equal areas.

[0044] Among them, the length and width of each terrain block ...