Large-scale 3D forest rendering method
By reading ground elevation data, using grassland noise texture and forest density random distribution function to generate tree distribution information, combined with multi-detail hierarchy technology, the problem of difficulty in quickly rendering large-scale three-dimensional forests in the existing technology is solved, and the realism is achieved Efficient three-dimensional forest drawing and dynamic display.
Patent Information
- Application Number
- CN201811565227.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-20
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2038-12-20
AI Technical Summary
It is difficult for the prior art to quickly and realistically draw large-scale three-dimensional forest images, especially in the case of complex forest areas, and existing methods are difficult to achieve dynamic display and efficient rendering.
By reading ground elevation data, building a digital ground model, using grassland noise texture to render forest areas, setting a random distribution function for forest density to generate tree distribution point information, and realizing tree texture display based on ground elevation data and basic tree pattern information, combining multiple details levels The technology displays visible and hidden according to the observation distance.
It realizes the rapid drawing of large-scale three-dimensional forest images with a sense of reality, which can dynamically display the tree growth process, saves computer computing resources, and improves rendering speed and reality.
Smart Images

Figure CN111354081B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to digital earth visualization technology, and in particular to a large-scale three-dimensional forest rendering method. Background Art
[0002] Digital Earth is a technology that uses massive amounts of earth information to describe the earth in three dimensions with multiple resolutions, scales, time and space, and types, and uses it as a tool to support and improve human activities and quality of life. It has extremely wide applications in both civil and military fields. Digital Earth can only play its role through the construction and rendering of three-dimensional images, and the biggest challenge facing the construction and rendering of three-dimensional images is the generation and real-time rendering of large scenes. In particular, the morphological structure of forest areas is complex and it is difficult to render them using a unified modeling method.
[0003] According to different modeling methods, the construction technology of 3D forests is divided into drawing based on polyhedrons or other simple geometric bodies, drawing based on points, drawing based on images, and drawing based on textures. The technology of drawing 3D forests based on polyhedrons or other simple geometric bodies can only symbolically represent the distribution of trees, but the realism of the forest is greatly reduced, and it is difficult to achieve dynamic display of the forest; the 3D forest drawn by point-based drawing technology has a strong sense of reality, but the method of obtaining sample data is complicated and is greatly affected by noise; the image-based drawing technology is suitable for drawing complex scenes, but it is greatly affected by image resolution, the sense of reality is low, and it is difficult to achieve dynamic display of 3D forests; the texture-based drawing technology relies on real 3D models, so the drawing speed will be greatly affected, and it is difficult to achieve fast and large-scale drawing. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.
[0005] Therefore, the object of the present invention is to provide a large-scale three-dimensional forest rendering method, which can quickly render a realistic three-dimensional forest image.
[0006] The three-dimensional forest rendering method provided by the present invention comprises the following steps:
[0007] S1: Read the ground elevation data of the 3D forest mapping area and build a digital ground model;
[0008] S2: separating a forest area from the digital terrain model and rendering the forest area using a grass noise texture;
[0009] S3: Setting a random distribution function of forest density and generating a tree distribution point information map in the forest area;
[0010] S4: Setting tree basic pattern information for each tree distribution point;
[0011] S5: Obtaining tree comprehensive pattern information according to the ground elevation data, tree distribution point information and tree basic pattern information;
[0012] S6: Displaying tree textures at different viewing angles at close range according to the tree comprehensive pattern information;
[0013] S7: Use multiple levels of detail technology to make the forest visible and invisible as the viewing distance changes.
[0014] Furthermore, in step S1, the read ground elevation data of the three-dimensional forest rendering area is stored using a quadtree data structure.
[0015] Furthermore, in step S1, a quadratic parabola interpolation method is used to construct a digital terrain model.
[0016] Furthermore, in step S2, texture is generated using vector data of forest occupied land and non-occupied land, and the forest area is separated using masking technology based on the generated texture.
[0017] Furthermore, in step S3, the tree density and tree positions per unit area in the forest area are calculated using a forest density random distribution function to obtain tree distribution point information.
[0018] Furthermore, the basic tree pattern information includes observation angle, two-dimensional coordinates and scale information.
[0019] Furthermore, the tree comprehensive pattern information includes three-dimensional position information, scale information, observation angle information and texture file of each tree.
[0020] Furthermore, in step S6, textures of different regions in the texture map are selected based on the range of the observation angle, and regions without patterns are eliminated according to the transparency of each texture region.
[0021] Furthermore, in step S7, it is determined whether to draw trees in the forest area according to the observation distance.
[0022] The present invention provides a method for fast realistic rendering of a large-scale three-dimensional forest. The method determines the forest area by using occupied and unoccupied land vector data and renders it with a grass noise texture. Then, the forest density random distribution function is used to set the basic tree pattern information of each tree distribution point, thereby obtaining the comprehensive tree pattern information. Finally, the texture selection and rendering of the tree are realized. The method can achieve the purpose of fast rendering of a large-scale three-dimensional forest, and the rendered three-dimensional forest has a strong sense of reality. At the same time, a callback function can be used to realize the dynamic display of the forest. Further, the forest area is rendered by using the grass noise texture, which not only provides a visual judgment basis for the forest rendering range for close-range tree rendering, but also provides ground grass texture for long-distance observation. Further, the storage method of the quadtree data structure facilitates the real-time display of digital elevation models of different resolutions without real-time rendering. Further, determining whether to render trees according to the distance of observation can not only ensure the realism of the large-scale three-dimensional forest to the greatest extent, but also greatly save the computing resources of the computer, so that the rendering speed of the large-scale three-dimensional forest is faster.
[0023] Additional aspects and advantages of the present invention will be given in part in the following description and, in part, will be obvious from the following description or learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0025] Figure 1 The flowchart of the large-scale three-dimensional forest drawing method according to the present invention.
[0026] Figure 2 This is a grass noise texture rendering according to the present invention.
[0027] Figure 3 A rendering of a three-dimensional forest area according to the present invention.
[0028] Figure 4 Renderings of individual trees from different viewing angles according to the present invention.
[0029] Figure 5 Graphs showing the visibility of the forest at different observation distances according to the present invention. DETAILED DESCRIPTION
[0030] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0031] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0032] refer to Figure 1 , which shows the large-scale three-dimensional forest rendering method of the present invention, comprising the following steps:
[0033] S1: Read the ground elevation data of the 3D forest mapping area and build a digital ground model.
[0034] The original elevation data of the drawing area is written into the underlying database using C++ language, and the quadtree data structure is used to store this information. The DEM data is interpolated using the quadratic parabola interpolation method to facilitate the rapid drawing of the rendered digital terrain model during the scaling process.
[0035] S2: Separating a forest area from the digital terrain model and rendering the forest area using a grass noise texture.
[0036] The texture data is generated in real time using the vector data of occupied and unoccupied land. The forest area is separated using masking technology based on the generated texture. That is, the texture is covered on the surface of the digital ground model. The area not occupied by other objects is the forest area, thereby limiting the area for tree generation and avoiding the situation where trees are generated in areas such as buildings. Then, the surface of the forest area is rendered using grass noise texture, which is a green texture with grass effect. The result of rendering with grass noise texture is shown in the figure below. Figure 2 shown.
[0037] S3: Setting a random distribution function of forest density and generating a tree distribution point information map in the forest area.
[0038] According to the needs, set the random distribution function of forest density, use it to calculate the tree density and tree position per unit area in the forest area, and generate a simple tree distribution point information map. The three-dimensional forest result generated and rendered in the forest area is as follows Figure 3 shown.
[0039] S4: Setting tree basic pattern information for each tree distribution point.
[0040] Set unified basic pattern information for the trees in the forest to be drawn, including the ratio of tree height to diameter, highest point height, observation angle and other information;
[0041] S5: Obtaining tree comprehensive pattern information according to the ground elevation data, tree distribution point information and tree basic pattern information.
[0042] Preferably, the tree comprehensive pattern information includes three-dimensional position information, scale information, observation angle information and texture file of each tree.
[0043] S6: Displaying tree textures at different viewing angles at close range is achieved according to the tree comprehensive pattern information.
[0044] In this step, the comprehensive pattern information of a single tree is first read using C++ language, including the 3D coordinates of the single tree, the height of the tree, the diameter of the tree, the angle at which the tree is observed, the texture file of the tree, etc. Then, OpenGL's shader language GLSL is used to obtain different parameters according to the angle range at which the tree is observed, and then the texture patterns of different areas in the tree's texture file are extracted. At the same time, OpenGL's shader language GLSL is also used to determine the image transparency of the read texture area, and the blank areas in the read texture area are removed according to their transparency, leaving only the patterned areas, which are then loaded as two-dimensional textures onto the observed trees, so that the trees in the three-dimensional forest change with the change of the observation angle, which is closer to the display effect of realistic observation. The rendering results of single trees at different angles are shown below. Figure 4 As shown, Figure 4 (a) is the upper perspective. Figure 4 (b) in the figure is the normal viewing angle.
[0045] S7: Use multiple levels of detail technology to make the forest visible and invisible as the viewing distance changes.
[0046] Preferably, whether to draw trees in the forest area is determined according to the distance of observation. The LOD (multiple level of detail) technology method is used to control the visibility of the three-dimensional forest as the observation distance changes. The visibility images of the three-dimensional forest at different distances are as follows: Figure 5 As shown, Figure 5 (a) is when the forest is hidden at a long distance. Figure 5 (b) shows the forest at a close distance.
[0047] Through the above method, a realistic three-dimensional forest can be quickly drawn. In the drawn large-scale three-dimensional forest, the callback parameters can be called using C++ language to change them over time, showing the growth process of trees in the forest from small to large.
[0048] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0049] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A three-dimensional forest rendering method, characterized in that: The following steps are involved: S1: Read the ground elevation data of the 3D forest mapping area and build a digital ground model; S2: separating a forest area from the digital terrain model and rendering the forest area using a grass noise texture; S3: Setting a random distribution function of forest density and generating a tree distribution point information map in the forest area; S4: Setting tree basic pattern information for each tree distribution point, where: The basic tree pattern information includes: observation angle, two-dimensional coordinates and scale information; S5: Obtaining tree comprehensive pattern information according to the ground elevation data, tree distribution point information and tree basic pattern information, wherein: The tree comprehensive model information includes: three-dimensional position information, scale information, observation angle information and texture file of each tree; S6: Displaying tree textures at different viewing angles at close range according to the tree comprehensive pattern information, wherein: First, the comprehensive pattern information of a single tree is read using C++ language, and then OpenGL's shader language GLSL is used to obtain different parameters according to the angle range at which the tree is observed, and then the texture patterns of different areas in the tree's texture file are extracted. Then, OpenGL's shader language GLSL is used to obtain different parameters according to the angle range at which the tree is observed, and then the texture patterns of different areas in the tree's texture file are extracted. At the same time, OpenGL's shader language GLSL is also used to determine the image transparency of the read texture area, and the blank area in the read texture area is eliminated according to its transparency, leaving only the area with the pattern, which is then loaded as a two-dimensional texture onto the observed tree; S7: Use multiple levels of detail technology to make the forest visible and invisible as the viewing distance changes.
2. The drawing method according to claim 1, characterized in that: In step S1, the read ground elevation data of the three-dimensional forest rendering area is stored using a quadtree data structure.
3. The drawing method according to claim 1 or 2, characterized in that: In step S1, a digital terrain model is constructed using a quadratic parabola interpolation method.
4. The drawing method according to claim 1, characterized in that: In step S2, texture is generated using vector data of forest occupied land and non-occupied land, and masking technology is used to separate the forest area based on the generated texture.
5. The drawing method according to claim 1, characterized in that: In step S3, the tree density and tree positions per unit area in the forest area are calculated using the forest density random distribution function to obtain tree distribution point information.
6. The drawing method according to claim 1, characterized in that: In step S7, it is determined whether to draw trees in the forest area according to the observation distance.
Citation Information
Patent Citations
Method for extracting point cloud data of tree height based on space three-dimensional template
CN102521835A
Method for dispatching growth models for simulation of vast forests
CN102662729A
