CN111462318B - Three-dimensional tree model real-time simplification method based on viewpoint mutual information - Google Patents

Three-dimensional tree model real-time simplification method based on viewpoint mutual information Download PDF

Info

Publication number
CN111462318B
CN111462318B CN202010455416.8A CN202010455416A CN111462318B CN 111462318 B CN111462318 B CN 111462318B CN 202010455416 A CN202010455416 A CN 202010455416A CN 111462318 B CN111462318 B CN 111462318B
Authority
CN
China
Prior art keywords
leaf
tree
nodes
viewpoint
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010455416.8A
Other languages
Chinese (zh)
Other versions
CN111462318A (en
Inventor
佘江峰
王超凡
李梦瑶
陈博
王标
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University
Original Assignee
Nanjing University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University filed Critical Nanjing University
Priority to CN202010455416.8A priority Critical patent/CN111462318B/en
Publication of CN111462318A publication Critical patent/CN111462318A/en
Application granted granted Critical
Publication of CN111462318B publication Critical patent/CN111462318B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/005Tree description, e.g. octree, quadtree
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/30Clipping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/61Scene description

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a real-time simplification method of a three-dimensional tree model based on viewpoint mutual information, which can make rendering of trees in a forest scene smoother and obtain better visualization effect, and specifically comprises the following steps: dividing the tree into nodes with parent-child relationship according to the topological relationship among the branches, and organizing the nodes in a multi-branch tree form; calculating the visual importance of each leaf in the leaf node according to the viewpoint mutual information VMI, and reordering the leaves according to the visual importance; providing a plurality of factors influencing the real-time simplification rate of the node, and setting a corresponding function for each factor to determine the real-time simplification rate of the node; the method is used for optimizing measures in the process of rendering a large-scale forest scene, and comprises the steps of switching control of LOD, replacement rendering of a distant view tree crown and the like. By virtue of VMI-based leaf sorting, the tree visual appearance characteristic can be better maintained while a higher simplification rate is achieved. In addition, the optimization measures in the rendering process ensure better visualization effect and rendering efficiency.

Description

Three-dimensional tree model real-time simplification method based on viewpoint mutual information
Technical Field
The invention belongs to the field of computer graphics and virtual geographic environments, and particularly relates to a three-dimensional tree model real-time simplifying method based on Viewpoint Mutual Information (VMI).
Background
At present, the three-dimensional tree model is simplified mainly by an image-based method and a geometric-based method. The Image-based rendering method (IBR) uses a two-dimensional Image of a tree to replace a geometric model for rendering, thereby significantly reducing the rendering load and improving the rendering efficiency. However, since the image is a two-dimensional object, this method has some inevitable disadvantages. Firstly, due to the limitation of image resolution, the method cannot be generally used for rendering of a close-range model, otherwise, strong non-photorealism is generated; secondly, the visualization effect of the method is static, and the dynamic illumination effect or the growth process simulation of the tree is difficult to perform; in addition, the IBR method mostly uses a single or several tree pictures to replace many trees, so the generated forest scene is often lack of diversity.
Compared with the method based on images, the method based on geometry can accurately simulate trees at any distance and can generate a visual effect with extremely high reality. However, due to the existence of a large number of rendering primitives, the tree simplification method based on geometry often needs to make articles on the simplification method so as to reduce the number of rendering primitives. According to different simplified objects, the simplification method based on geometry can be divided into simplification of a branch model and simplification of a leaf model. Branches are generally represented by polygonal prisms, and the simplification mode of branches is mostly to reduce the complexity of geometric primitives from the transverse direction and the longitudinal direction. However, most of the current methods generate discrete LODs for the branch models, which results in a large amount of data redundancy, and the problem is particularly serious for large-scale forest scenes. At present, a simplified scheme for leaves is generally based on a random clipping mode, and the simplified scheme for random clipping considers that all the leaves in a crown have the same importance degree, and a certain number of leaves are randomly deleted when the crown is simplified, so that the simplification of the leaves is completed. However, considering that the orientation, size and position of the leaf all affect the number of pixels occupied by the leaf on the screen, and further affect the visual importance degree of the leaf, the leaf simplification method based on random clipping still has the problem of unreasonable clipping sequence. The concept of viewpoint mutual information in the information theory is applied to tree simplification, a discrete LOD model is generated for the tree, but the concept is not used for the tree simplification in real time, and the problems of data redundancy, visual jump during LOD switching and the like still exist in a scene.
Overall, the real-time simplification of current three-dimensional tree models presents a significant challenge: the order of leaf cutting is not considered, so that a low-quality visual effect is caused; the balance of effects and efficiency is not comprehensively considered, and the problems of serious visual jump, low performance and the like can be caused.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the defects of the existing three-dimensional tree model real-time simplification method in the aspects of visualization effect and rendering efficiency, the invention discloses a three-dimensional tree model real-time simplification method based on viewpoint mutual information, which can meet the requirements of visualization effect improvement and rendering efficiency improvement in a large-scale forest scene.
The technical scheme is as follows: in order to achieve the purpose, the invention discloses a three-dimensional tree model real-time simplification method based on viewpoint mutual information, which comprises the steps of sorting leaves according to visual importance by utilizing VMI in preprocessing, generating a level of detail model (LOD) for branches, combining optimization measures in a rendering process, controlling LOD switching of nodes to reduce DrawCall times, scaling the geometric size of the leaves in real time to reduce visual information loss caused by a simplification process, expressing crown visualization effect by using a proper outline model in a long-range view and the like, and improving the rendering efficiency and visualization effect of a large-scale forest scene, and comprises the following steps:
(1) dividing the tree into a plurality of nodes with parent-child relations according to the topological relation among the branches, wherein the nodes comprise branch nodes and tree leaf nodes, and the leaf nodes are child nodes of the final-stage branch nodes;
(2) calculating the visual importance of each leaf in the leaf node according to the viewpoint mutual information VMI, rearranging the vertex data of the leaves in the vertex array according to the visual importance, and placing more important data in front of the vertex array;
(3) simplifying the branch model according to the VMI to generate a level of detail LOD model, and arranging vertex data in a vertex array according to the sequence of the LOD model;
(4) in the real-time operation process, the simplification rate of the nodes is determined according to the tree crown bounding sphere level, the tree branch level, the leaf density, the distance between the viewpoint and the leaves and the included angle between the sight line and the growth direction of the branches;
(5) when a large-scale forest scene is rendered in real time, the rendering optimization measures adopted comprise: the LOD change amplitude of a near node and the LOD change frequency of a far node are controlled, so that LOD switching is reduced; the geometric dimension of the leaves is scaled in real time to reduce the visual information loss caused by the simplification process and ensure the visual consistency among different LOD models of the tree; and (3) constructing a contour model expression tree crown model by utilizing a Poisson surface reconstruction algorithm in a distant view.
Further, the step (1) specifically comprises:
(1.1) recording the topological relation among branches and the length, the branch level and the leaf data information grown in the branches during tree modeling;
(1.2) constructing a structure data structure for each branch node, wherein the structure comprises the attribute information, the geometric information and the rendering state information of the node, and two dynamic arrays used for storing parent node and child node structure pointers respectively;
and (1.3) determining the pointers of the father node and the child nodes of the nodes according to the topological relation among the branches.
Further, the process of calculating the visual importance of the leaves according to the VMI in the step (2) is based on the nodes, and the specific steps are as follows:
(2.1) placing N around the treevEach viewpoint, all the viewpoint sets are V, and the V is used for indexing; if all the geometric patches in an object are collected as O, and O represents a single patch, then the overall visibility of the object O at a certain viewpoint v is:
Figure BDA0002509163680000031
where p (o | v) represents the conditional probability of visibility of a patch o at view v, and p (o) represents the average visibility of a patch o at all views, where node visibility is determined by the fraction of pixels in screen space;
(2.2) when a node changes from O to O' due to the removal of a certain leaf, the VMI error caused by the change is:
Figure BDA0002509163680000032
if eVMIIf the size of the leaf is larger, the visibility of the leaf node O of the whole tree is influenced greatly visually by removing the leaf, so that the leaf is important in visual perception;
(2.3) according to eVMIThe size of the value of (a) can determine the visual importance of a certain leaf, and the leaves are sorted in the vertex array according to the visual importance, and the more important leaves are placed in front of the vertex array.
Further, generating a plurality of LOD models for the branch model in the step (3), wherein the finer LOD model is constructed by adding some supplementary data on the basis of the coarse LOD model, arranging vertexes in a vertex array of the branch model according to the sequence of the LOD models, and arranging vertexes of the same LOD model together; the LOD model to be rendered is determined during rendering from different index arrays. In this way, the data redundancy of conventional discrete LOD models can be completely eliminated.
Further, the real-time reduction rate of the node in the step (4) is determined by five reduction rate influence factors: the tree crown encirclement Sphere Level (BSL), the Branch Level (BL), the Leaf Density (LD), the distance between a viewpoint and a Leaf (dist), and the included angle between a sight line and the growth direction of a Branch (dir). The specific introduction is as follows:
crown-bounding sphere level BSL: the node is represented to be close to the center of the crown in the crown surrounding sphere, nodes closer to the inside of the crown have higher BSL values and are more likely to be blocked by other nodes, and therefore the real-time simplification rate of the part of nodes is higher relative to the external nodes. The calculation formula is as follows:
Figure BDA0002509163680000041
branch level BL: the method for adjusting the tree distance by using the BL parameters comprises the following steps of: the first-level and second-level branch models (BL ═ 1, 2) can often reflect the overall outline of the tree, so that when the distance becomes larger, the simplification rate of the nodes is reduced to reduce the visual negative effect caused by excessive simplification, and the calculation formula is as follows:
Figure BDA0002509163680000042
wherein near and far represent the distance thresholds, max, corresponding to the finest and coarsest LODs, respectivelyBLRepresenting the maximum value of the BL parameter, the parameter h being used to control f2(BL, dist) magnitude of change with distance; parameter k1Guarantee f2(BL, dist) results were not less than-0.5.
Leaf density LD: the invention utilizes LD to ensure that sparse leaves are not excessively simplified so as to keep the consistency of nodes among different LODs, and the calculation formula is as follows:
f3(LD)=k2*(LD-ld)
where ld represents the average leaf density of all nodes, k2=1/ld。
Distance dist between viewpoint and leaf: the influence of the distance parameter on the simplification rate is the most direct and greatest, and the calculation formula is defined as:
Figure BDA0002509163680000043
wherein k is3=1/log10far. The logarithmic relationship of distance to reduction rate reduces the effect of distance at distance.
The included angle dir between the sight line and the growth direction of the branches: dir represents an included angle between the sight line direction and the growth direction of the node (for the leaf node, the parent node thereof), and the calculation formula is as follows:
Figure BDA0002509163680000044
the real-time simplification rate of the node is determined by the five functions, and the calculation formula is as follows:
Rs=α1*f1(BSL)+α2*f2(BL,dist)+α3*f3(LD)+α4*f4(dist)+α5*f5(dir)
wherein alpha is1、α2、α3、α4、α5Equal to the weight of the influence factor and alpha123451. In the present invention let alpha4=0.3,α2=0.1,α1=α3=α5=0.2。
Further, the multiple rendering optimization measures in the step (5) for rendering the large-scale forest scene specifically include:
distance-based LOD switching control: only when the reduction rate varies by Δ rate and the time during which the reduction rate remains unchangedlastThe LOD of the node is updated when the following formula is satisfied;
Figure BDA0002509163680000051
wherein
Figure BDA0002509163680000052
k4、k5Are all larger than 0 and are respectively used for controlling delta rate and delta timelastIntensity as a function of distance;
leaf amplification measures for maintaining appearance characteristics of trees: magnifying leaves by 1.0/(1-R) according to the change of simplification rate in a geometry shaders) Doubling to keep the total area of the leaves in the crown stable;
a contour model of the crown is constructed by utilizing a Poisson surface reconstruction algorithm, and the contour model is used for replacing a geometric model of a tree when a tree at a distance is rendered, so that the rendering burden is reduced.
Has the advantages that: the method calculates the average visibility of each leaf under a plurality of viewpoints in the preprocessing so as to judge the visual importance of the leaves, and has the advantages that the sequence of cutting the leaves is more reasonable in the real-time simplification process, the tree simplification rate is effectively improved, and meanwhile, the tree deformation is reduced; in the real-time simplification process, a plurality of influence factors are comprehensively considered, so that the shielded part of the tree is effectively simplified, and the tree simplification related to the viewpoint is realized; the measure of dividing trees into a plurality of nodes is combined, the continuous LOD effect in the browsing process is achieved, and the visual jumping sense during LOD switching is effectively reduced. In addition, to achieve smooth rendering of large-scale forest scenes, a number of optimization measures are proposed to achieve a balance of efficiency and effectiveness.
Drawings
Fig. 1 is a technical route diagram of the present invention.
FIG. 2 is a schematic diagram of a tree divided into a plurality of nodes; wherein: (a) dividing the tree into a plurality of nodes according to the topological relation among the branches; (b) parent-child relationships of nodes and corresponding data structures.
FIG. 3 is a schematic view of an LOD model of a branch; wherein: (a) the numbers of the edges corresponding to (b), (c) and (d) are respectively 12, 3 and 3, and the numbers of the vertexes are 18660, 5530, 928 and 530.
FIG. 4 is a schematic diagram of a process for constructing a tree profile model; wherein: (a) extracting characteristic points in the crown; (b) generating a closed contour model for the crown according to a Poisson surface reconstruction algorithm; (c) displaying the tree outline model in a wire frame mode; (d) and the data volume of the contour model is further reduced by using an edge folding algorithm.
FIG. 5 is a schematic view of leaves enlarged to maintain the overall appearance of the crown; wherein: (a) distances corresponding to (b) and (c) are respectively 5m, 30m and 100m, and the simplification rates are respectively 0%, 90% and 98%.
FIG. 6 is a LOD model of a tree obtained using the method of the present invention; wherein: (a) the reduction ratios of (a), (b) and (c) were 0%, 50% and 98%, respectively.
FIG. 7 is a diagram of the visualization effect of a forest scene viewed from a distance rendered by the method of the present invention.
FIG. 8 is a visual effect diagram of a forest scene viewed from near, rendered by the method of the present invention.
Detailed Description
As shown in FIG. 1, the invention discloses a three-dimensional tree model real-time simplification method based on viewpoint mutual information, which mainly comprises the steps of dividing a tree into a plurality of nodes, sequencing leaves according to visual importance based on VMI, generating an LOD model in an incremental form for branches, calculating a real-time simplification rate for the nodes and optimizing measures in a rendering process. The technical solution of the present invention will be further described with reference to the accompanying drawings and the detailed description.
1. And dividing the tree into a plurality of nodes with parent-child relations according to the topological relation among the branches.
When the tree model is established, attribute information such as branch length and branch level, geometric information such as vertex, normal and texture, rendering state information and topological relation of branches are recorded. As shown in fig. 2 (a), each branch is represented by a node, a secondary branch is derived from a primary branch, and a tertiary branch is derived from the secondary branch until the final branch is derived. The child nodes under the last branch include all leaves growing on the branch. The node data is organized in a multi-way tree, as in (b) of fig. 2. The tree data structure has the advantages that the information such as the simplification rate, the rendering state and the like of the child nodes can be conveniently controlled through the father node, and meanwhile, the DrawCall of the nodes can be merged during rendering, so that the process that a CPU sends data to a GPU is greatly reduced.
2. And judging the average visibility of the leaves under a plurality of visual angles according to the change of the VMI, and sequencing the leaves according to the average visibility.
Placing N around the treevAssuming that all viewpoints are set to be V (e.g., 20 viewpoints are placed around the tree and the viewpoints are located at 20 vertices on a regular dodecahedron completely surrounded by the tree), and V is an index, the set of object patches is set to be O, and O represents a single patch. a isoIs the projection area, a, of the patch o on a spherical surface with the viewpoint v as the center of the spheret=∑o∈OaoIs shown byThe sum of the projected areas of all patches at the viewpoint v, the conditional probability p (o | v) ═ a of the visibility of the patch o at the viewpoint vo/atFrom this, we derive the average visibility of patch o at all views as:
Figure BDA0002509163680000061
it should be noted that the projected area aoRefers to the portion of the projected area of patch o that is visible. If a patch o 'is completely occluded, the projected area of o' is 0. Finally, the definition of VMI can be derived as follows, which reflects the overall visibility of the object O at a certain viewpoint v.
Figure BDA0002509163680000071
VMI is very sensitive to geometric primitives outside the object, and compared with the occluded leaves inside, when the outer leaves are simplified, the VMI value changes more, so that the VMI can be used for measuring the visual importance degree of the leaves in the nodes. When a node changes from O to O' due to simplification, the VMI error introduced thereby is:
Figure BDA0002509163680000072
in the present invention, each leaf node is regarded as an independent object O, and each leaf is regarded as a patch O (actually containing two triangular meshes). The visual importance of each leaf is calculated in the pre-processing and the leaves are sorted accordingly. In the sorting process, e is selected each timeVMIThe largest leaf is the most important leaf. It should be noted that since the visibility of other leaves may be affected after one leaf is cut out, the calculation of VMI needs to be performed again each time one leaf is cut out. Finally, we will get all the leaf nodes that rank the leaves.
3. An incremental form LOD model is generated for the branch model.
The branch model in the present invention is represented by polygonal prisms. Depending on the geometry of the prisms, the simplification of branches can be divided into three categories: transversely changing the number of the sides of the prism polygon; longitudinally combining branch segments; and removing small branch segments. The first method can effectively reduce the data volume of the branches without generating large deformation, but cannot be further simplified in the transverse direction when the prism is simplified into a triangular prism. When the distance between the viewpoint and the leaves is large, the detail of turning the branches does not need to be expressed too finely. By means of eVMIThe method can judge the deformation degree of the combined branch sections before and after simplification, and judge the sequence of the combined branch sections according to the deformation degree. Furthermore, some smaller branches are too thin or too small to be viewed by the user. For these branches, it is necessary to remove them. We use the magnitude of the Hausdorff distance to determine if a branch should be removed. The Hausdorff distance of a branch refers to the cumulative value of the distance of the branch node from its parent node and siblings. The branch LOD construction process is shown in fig. 3, the numbers of edges (a) - (d) in fig. 3 are 12, 3 and 3, respectively, and the number of vertices is 18660, 5530, 928 and 530, respectively. In fig. 3, (a) and (b) are the branch segment merging process; FIG. 3 (b), (c) shows how the number of polygon edges affects the amount of data; on the basis of the above two simplified methods, the data volume is further reduced by removing thinner branches, as shown in fig. 3(c), (d).
Compared with the initial LOD model of the tree branches, all tree LOD models do not generate new vertexes, and the finer LOD model can be constructed by adding some supplementary data on the basis of the rough LOD model. Therefore, the vertices are arranged in the vertex array according to the LOD order, and the index array corresponding to each LOD model is recorded in advance. When the LOD model of the branch is switched, only the index array needs to be switched, and the vertex array and the like do not need to be operated. This incremental LOD structure eliminates data redundancy of discrete LODs.
4. A real-time reduction rate is calculated for each node.
The real-time reduction rate of a node is determined by five reduction rate impact factors: the tree crown surrounding sphere level BSL, the branch level BL, the leaf density LD, the distance dist between the viewpoint and the leaves, and the included angle dir between the sight line and the branch growing direction.
The concrete introduction is as follows:
(4.1) crown-bounding sphere level BSL: the node is close to the center of the crown in the crown surrounding sphere, nodes closer to the inside of the crown have higher BSL values and are more likely to be blocked by other nodes, and therefore the real-time simplification rate of the part of nodes is higher relative to the external nodes. The calculation formula is as follows:
Figure BDA0002509163680000081
(4.2) Branch level BL: the method for adjusting the tree appearance comprises the following steps that observation key points of a user browsing the tree at a near place and a far place are inconsistent, the user pays more attention to geometric details of the tree at the near place, and pays more attention to the overall appearance characteristic of the tree when the user observes the tree at the far place, and the method utilizes BL parameters to adjust a simplifying strategy of different distances, and the specific operation is as follows: for the first-level and second-level branch models (BL ═ 1, 2), when the distance becomes larger, the simplification rate is gradually reduced, and the calculation formula is as follows:
Figure BDA0002509163680000082
where near, far represent the corresponding distance thresholds, max, at the finest and coarsest LODs, respectivelyBLRepresenting the maximum value of the BL parameter, the parameter h being used to control f2(BL, dist) magnitude of change with distance; parameter k1Guarantee f2(BL, dist) results were not less than-0.5.
(4.3) leaf density LD: the invention utilizes LD to ensure that sparse leaves are not excessively simplified so as to keep the consistency of nodes among different LODs, and the calculation formula is as follows:
f3(LD)=k2*(LD-ld)
wherein ld tableMean leaf density, k, of all nodes21/ld. When leaf density is greater than ld, f3(LD) is positive number, the leaf density has promoting effect on the simplification rate; when leaf density is less than ld, f3(LD) is positive number, and the leaf density has inhibiting effect on the simplification rate.
(4.4) distance dist between viewpoint and leaf: the influence of the distance parameter on the simplification rate is the most direct and greatest, and the calculation formula is defined as follows:
Figure BDA0002509163680000091
wherein k is3=1/log10far. The logarithmic relationship of distance to reduction rate reduces the effect of distance at distance.
(4.5) an included angle dir between the sight line and the growth direction of the branches: dir represents the angle between the sight line direction and the growth direction of the node (for the leaf node, the parent node thereof), and the calculation formula is as follows:
Figure BDA0002509163680000092
when dir is in [0, pi/2 ]]When the range is within the range, the branch grows on the back of the crown taking the viewpoint as a reference point and is shielded by the branch in front, and the greater the dir value is, the more serious the branch is shielded; when dir is in [ pi/2, pi]Within range, it is said that the branch grows on the front of the crown, so f is5The value of (dir) is 0.
The real-time simplification rate of the node is determined by the five functions, and the calculation formula is as follows:
Rs=α1*f1(BSL)+α2*f2(BL,dist)+α3*f3(LD)+α4*f4(dist)+α5*f5(dir)
wherein alpha is1、α2Equal to the weight of the influence factor and alpha123451. Considering distance pair simplificationThe influence of the conversion rate is maximized, in the present invention, let α4=0.3,α2=0.1,α1=α3=α5=0.2。
5. And optimizing the visualization effect and efficiency when rendering the large-scale forest scene.
In order to realize the efficient rendering of the large-scale forest scene, the invention adopts various optimization measures during rendering, and the specific introduction is as follows:
and (5.1) replacing the tree outline model when rendering the distant trees. The steps of constructing the tree profile model are shown in fig. 4: firstly, selecting top end points of all branches as feature points, setting a distance threshold value theta as shown in (b) in fig. 4, and deleting all end points with the distance to the center of the crown smaller than theta; then, a tree crown contour model is generated by using a poisson surface reconstruction method, as shown in (c) of fig. 4. The generated crown model can show the whole contour of the crown in a real way; finally, the number of vertices is further compressed by edge folding, and the final result is shown as (d) in fig. 4. Compared with 310364 vertices in the original crown model, the crown contour model constructed finally has only 744 vertices. By the method, the burden and the frequency of DrawCall can be obviously rendered, and the rendering efficiency of the large-scale forest scene is greatly improved.
And (5.2) LOD switching control based on distance. The near nodes tend to occupy more pixels on the screen due to being closer to the camera, so the LOD change of the nodes is not too severe, otherwise, strong jump feeling is generated; for nodes far away, the LOD change is small and hardly noticed by a viewer due to the long distance and the serious shielding. Thus, the LOD does not have to change too often for these nodes. Because of the nodes, both near and far, the frequency and amplitude of their LOD changes are closely related to distance. In a specific implementation, we record for each node, in each frame, the change Δ rate of its reduction rate and the time during which the reduction rate remains constantlast. Only when Δ rate and timelastThe LOD of a node is updated when the following equation is satisfied.
Figure BDA0002509163680000101
Here, the
Figure BDA0002509163680000102
k4、k5Are all larger than 0 and are respectively used for controlling the delta rate and the delta timelastIntensity as a function of distance. Through this kind of mode, the effectual unnecessary LOD that has reduced switches, has promoted the efficiency of rendering up greatly.
(5.3) altering the position of the leaf vertex in the geometry shader to enlarge the leaf to maintain the overall appearance of the crown. For node i, assuming that the number of leaves in the initial state is n, the total area of all leaves is S, the reduction rate is 0.0, and when the reduction rate becomes R at a certain timesMeaning that there will be n RsThe leaves of the leaf will be cut out, and the total area of the leaves can be approximately expressed as:
a′total=(1-Rs)*atotal
the reduction of the leaf area causes a certain loss of visual quality, and in order to compensate for the deformation of the node caused by simplification, the invention expands the remaining leaves outwards by s times along the center of each leaf, and at the moment, the total area of the node becomes:
a′total=s2*(1-Rs)*atotal,s=sqrt(1.0/(1-Rs))
the coordinates of the center of the leaf are equal to the average value of the four vertexes of the leaf, and the calculation for changing the vertex position is carried out in the geometry shader, and almost no extra rendering cost is brought. The effect of enlarging the leaves is shown in figure 5. Fig. 5 (a), (b), and (c) show LOD models with distances of 5m, 30m, and 100m between the tree and the viewpoint, respectively, and the corresponding simplification rates are 0%, 90%, and 98%, respectively, from which it can be seen that even if the tree model simplification rate reaches 98%, the overall appearance characteristics of the tree are well maintained by virtue of the leaf amplification scheme provided by the present invention.
Fig. 6 shows the LOD model map of the tree generated by the present invention, wherein the simplification rates of (a), (b) and (c) are 0%, 50% and 98%, respectively. The tree is a quercus robur tree and totally contains 133327 triangle primitives. It can be seen from the figure that even when the tree model reduction rate has reached 98%, the simplified tree model can still better maintain the appearance characteristics of the original model without generating large visual distortion.
Fig. 7 and 8 are respectively a visualization effect diagram of browsing in a large-scale forest scene by using the invention, wherein fig. 7 is browsing in a forest far away, and fig. 8 is roaming in the forest. The scene contains 2000 trees in total, and the number of triangle primitives is over 2 hundred million in the initial state. In the view frustum shown in fig. 7, there are 621 trees in total, 540 triangle primitives, the average simplification rate is 9.13%, and the real-time frame rate is 40.21 fps. In the view frustum shown in fig. 8, there are 403 trees, 37 ten thousand triangle primitives, the average reduction rate is 10.57, and the real-time frame rate is 52.41 fps. It can be seen that, no matter far-away browsing or near-around roaming, the tree simplification method and the optimization measure provided by the invention can achieve very smooth rendering and better visualization effect on large-scale forest scene rendering.

Claims (5)

1. A three-dimensional tree model real-time simplification method based on viewpoint mutual information is characterized by comprising the following steps:
(1) dividing the tree into a plurality of nodes with parent-child relations according to the topological relation among the branches, wherein the nodes comprise branch nodes and tree leaf nodes, and the leaf nodes are child nodes of the final-stage branch nodes;
(2) calculating the visual importance of each leaf in the leaf node according to the viewpoint mutual information VMI, and rearranging the vertex data of the leaves from large to small in the vertex array according to the visual importance;
(3) simplifying the branch model according to the VMI to generate a level of detail LOD model, and arranging vertex data in a vertex array according to the sequence of the LOD model;
(4) in the real-time operation process, the simplification rate of the nodes is determined according to the tree crown bounding sphere level, the tree branch level, the leaf density, the distance between the viewpoint and the leaves and the included angle between the sight line and the growth direction of the branches; the simplification rate is determined by the weighted sum of a crown bounding sphere level calculation function, a branch level calculation function, a leaf density calculation function, a distance calculation function between a viewpoint and a leaf, and an included angle calculation function between a sight line and the branch growth direction;
(5) when a large-scale forest scene is rendered in real time, the rendering optimization measures adopted comprise: the LOD change amplitude of a near node and the LOD change frequency of a far node are controlled, so that LOD switching is reduced; only when the reduction rate varies by Δ rate and the time during which the reduction rate remains constant by Δ timelastThe LOD of the node is updated when the following formula is satisfied;
Figure FDA0003546954890000011
wherein
Figure FDA0003546954890000012
near and far represent the distance thresholds, k, for the finest and coarsest LODs, respectively4、k5Are all larger than 0 and are respectively used for controlling the delta rate and the delta timelastIntensity as a function of distance; real-time scaling of leaf geometry to reduce visual information loss caused by the simplification process, in the geometry shader according to the simplification rate RsThe change of (a) amplifies the leaves by 1.0/(1-R)s) The visual consistency among different LOD models of the tree is ensured; and (3) constructing a contour model expression crown model by using a Poisson surface reconstruction algorithm in a distant view.
2. The method for simplifying the three-dimensional tree model based on the viewpoint mutual information in real time as claimed in claim 1, wherein the step (1) specifically comprises:
(1.1) recording the topological relation among branches and the length, the branch level and the leaf data information grown in the branches during tree modeling;
(1.2) constructing a structure data structure for each branch node, wherein the structure comprises the attribute information, the geometric information and the rendering state information of the node, and two dynamic arrays used for storing parent node and child node structure pointers respectively;
and (1.3) determining the pointers of the father node and the child nodes of the nodes according to the topological relation among the branches.
3. The method for simplifying the three-dimensional tree model based on the viewpoint mutual information in real time as claimed in claim 1, wherein the step (2) of calculating the visual importance of the leaves according to the VMI is performed in a screen space, and the nodes are independent of each other, and the specific steps include:
(2.1) placing N around the treevEach viewpoint, all the viewpoint sets are V, and the V is used for indexing; if the set of all geometric patches in an object is O, and O represents a single patch, the overall visibility of the object O at a certain viewpoint v is:
Figure FDA0003546954890000021
where p (o | v) represents the conditional probability of visibility of a patch o at view v, and p (o) represents the average visibility of a patch o at all views, where node visibility is determined by the fraction of pixels in screen space;
(2.2) when a node changes from O to O' due to the removal of a certain leaf, the VMI error caused by the change is:
Figure FDA0003546954890000022
if eVMIThe larger, the more visually the removal of the leaf has an effect on the visibility of the entire leaf node O, and thus the more visually the leaf is important;
(2.3) according to eVMIThe value of (A) determines the visual importance of a leaf, and accordingly pairs trees from large to small in the vertex arrayThe leaves are sorted.
4. The method for simplifying the three-dimensional tree model based on the viewpoint mutual information in real time as claimed in claim 1, wherein in the step (3), a plurality of LOD models are generated for the branch model, wherein the finer LOD model is constructed by adding some supplementary data on the basis of the coarse LOD model, the vertexes are arranged in the vertex array of the branch model according to the sequence of the LOD models, and the vertexes of the same LOD model are arranged together; the LOD model to be rendered is determined during rendering from different index arrays.
5. The method for real-time simplification of a three-dimensional tree model based on viewpoint mutual information as claimed in claim 1, wherein the real-time simplification rate of the nodes in step (4) is determined by five simplification rate influence factors: the crown surrounds distance dist between ball level BSL, branch level BL, leaf density LD, viewpoint and the leaf, the contained angle dir of sight and branch growth direction, and the function calculation that corresponds is as follows respectively:
the calculation formula corresponding to the BSL is as follows:
Figure FDA0003546954890000031
the corresponding calculation formula of BL is:
Figure FDA0003546954890000032
wherein near and far represent the distance thresholds, max, corresponding to the finest and coarsest LODs, respectivelyBLRepresenting the maximum value of the BL parameter, and the parameter h is used to control f2(BL, dist) magnitude of change with distance; parameter k1Guarantee f2(BL, dist) result is not less than-0.5;
the corresponding calculation formula of LD is:
f3(LD)=k2*(LD-ld)
where ld denotes all nodes at the initial stateMean leaf density in State, k2=1/ld;
The corresponding calculation formula of dist is:
Figure FDA0003546954890000033
wherein k is3=1/log10(far-near+1);
The calculation formula corresponding to dir is as follows:
Figure FDA0003546954890000034
real-time reduction rate R of nodessDetermined by the five functions, the calculation formula is as follows:
Rs=α1*f1(BSL)+α2*f2(BL,dist)+α3*f3(LD)+α4*f4(dist)+α5*f5(dir)
wherein alpha is1、α2、α3、α4、α5Represents the weight of the influence factor and alpha12345=1。
CN202010455416.8A 2020-05-26 2020-05-26 Three-dimensional tree model real-time simplification method based on viewpoint mutual information Active CN111462318B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010455416.8A CN111462318B (en) 2020-05-26 2020-05-26 Three-dimensional tree model real-time simplification method based on viewpoint mutual information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010455416.8A CN111462318B (en) 2020-05-26 2020-05-26 Three-dimensional tree model real-time simplification method based on viewpoint mutual information

Publications (2)

Publication Number Publication Date
CN111462318A CN111462318A (en) 2020-07-28
CN111462318B true CN111462318B (en) 2022-05-17

Family

ID=71682882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010455416.8A Active CN111462318B (en) 2020-05-26 2020-05-26 Three-dimensional tree model real-time simplification method based on viewpoint mutual information

Country Status (1)

Country Link
CN (1) CN111462318B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111882677B (en) * 2020-08-04 2024-02-23 网易(杭州)网络有限公司 Method and device for editing three-dimensional plant model, electronic equipment and storage medium
CN112206528B (en) * 2020-10-12 2024-03-01 网易(杭州)网络有限公司 Vegetation model rendering method, device, equipment and storage medium
CN112308974B (en) * 2020-10-30 2022-02-18 南京航空航天大学 Large-scale point cloud visualization method for improving octree and adaptive reading
CN114565709A (en) * 2020-11-13 2022-05-31 华为技术有限公司 Data storage management method, object rendering method and device
CN115862304B (en) * 2023-03-03 2023-05-05 吉林省林业科学研究院 Intelligent early warning system and method for ecological restoration of degraded natural secondary forest
CN116433838A (en) * 2023-03-31 2023-07-14 广州市城市规划勘测设计研究院 Three-dimensional tree symbol dynamic generation method, device, terminal and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751694A (en) * 2008-12-10 2010-06-23 中国科学院自动化研究所 Method for rapidly simplifying and drawing complex leaf
CN103942838A (en) * 2014-05-13 2014-07-23 福州大学 Point cloud data based single tree three-dimensional modeling and morphological parameter extracting method
CN105205861A (en) * 2015-10-09 2015-12-30 南京大学 Tree three-dimensional visualization model realization method based on Sphere-Board
CN110751615A (en) * 2019-08-29 2020-02-04 浙江工业大学 Three-dimensional tree image fusion method based on environment perception

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012083508A1 (en) * 2010-12-24 2012-06-28 中国科学院自动化研究所 Fast rendering method of third dimension of complex scenes in internet

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751694A (en) * 2008-12-10 2010-06-23 中国科学院自动化研究所 Method for rapidly simplifying and drawing complex leaf
CN103942838A (en) * 2014-05-13 2014-07-23 福州大学 Point cloud data based single tree three-dimensional modeling and morphological parameter extracting method
CN105205861A (en) * 2015-10-09 2015-12-30 南京大学 Tree three-dimensional visualization model realization method based on Sphere-Board
CN110751615A (en) * 2019-08-29 2020-02-04 浙江工业大学 Three-dimensional tree image fusion method based on environment perception

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Realistic real-time rendering for large-scale forest scenes;Bao GB 等;《2011 IEEE International Symposium on Virtual Reality Innovation》;20111231;第217-223页 *
Screened poisson surface reconstruction;Kazhdan M 等;《ACM Transactions on Graphics》;20130704;第29:1-29:13页 *
View-dependent pruning for real-time rendering of trees;Gumbau, J 等;《Computers &Graphics》;20101127;第364-374页 *
Viewpoint-Driven Simplification of Plant and Tree Foliage;Cristina Gasch 等;《Entropy》;20180521;全文 *
森林三维真实感建模与可视化LOD技术研究;刘真余等;《中国科学院研究生院学报》;20110515(第03期);第323-327页 *

Also Published As

Publication number Publication date
CN111462318A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN111462318B (en) Three-dimensional tree model real-time simplification method based on viewpoint mutual information
Wimmer et al. Instant Points: Fast Rendering of Unprocessed Point Clouds.
US9773343B2 (en) Method for real-time and realistic rendering of complex scenes on internet
US7561156B2 (en) Adaptive quadtree-based scalable surface rendering
CN112308974B (en) Large-scale point cloud visualization method for improving octree and adaptive reading
CN109636889B (en) Large-scale three-dimensional terrain model rendering method based on dynamic sewing belt
KR100959349B1 (en) A method for accelerating terrain rendering based on quadtree using graphics processing unit
KR20160126329A (en) Method and apparatus for processing a image by performing adaptive sampling
KR20080018404A (en) Computer readable recording medium having background making program for making game
Sander et al. Progressive buffers: view-dependent geometry and texture lod rendering
CN105205861A (en) Tree three-dimensional visualization model realization method based on Sphere-Board
US6201542B1 (en) Three-dimensional polygon display apparatus using progressive polygon data
Ribelles et al. Multiresolution modeling of arbitrary polygonal surfaces: a characterization
Zach et al. Time-critical rendering of discrete and continuous levels of detail
Frasson et al. Efficient screen-space rendering of vector features on virtual terrains
US6664957B1 (en) Apparatus and method for three-dimensional graphics drawing through occlusion culling
Deng et al. Multiresolution foliage for forest rendering
JP2003228725A (en) 3d image processing system
CN111275806A (en) Parallelization real-time rendering system and method based on points
US11436797B2 (en) Image generation system and method
Chang et al. Hierarchical simplification of city models to maintain urban legibility.
CN113470177A (en) Three-dimensional model geometric self-adaptive simplification method in GIS system
KR102061835B1 (en) How to implement LOD in non-square Grid data with NaN
Zhang Foliage Simplification Based on Multi-viewpoints for Efficient Rendering.
Hesse et al. A Quantitative Analysis of Culling Techniques for Real-time Rendering of Digital Elevation Models

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 210008 No. 22, Hankou Road, Gulou District, Jiangsu, Nanjing

Applicant after: NANJING University

Address before: 210023 163 Xianlin Road, Qixia District, Nanjing, Jiangsu

Applicant before: NANJING University

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant