A meadow three-dimensional model boundary optimization method, system, terminal and storage medium

By optimizing the boundaries of the 3D grassland model using boundary fusion and region density control algorithms based on distance field, the problems of harsh material transitions and geometric penetration were solved, thereby improving the visual realism and rendering efficiency of the 3D grassland model.

CN121353576BActive Publication Date: 2026-04-07SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing 3D modeling methods for grasslands result in harsh material transitions at boundaries, leading to jagged seams and geometric penetration through the model, which reduces the reliability and realism of the modeling results.

Method used

A distance field-based boundary fusion method is used to perform gradual blending of material properties, and model points are generated through a region density control algorithm and a rejection sampling algorithm to optimize the boundary and interior domains of the grassland 3D model.

Benefits of technology

It eliminates the artificial stitching at the boundaries of the 3D grassland model, achieves natural material transitions, avoids geometric penetration, and improves visual realism and rendering efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121353576B_ABST
    Figure CN121353576B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of geographic information engineering, and discloses a meadow three-dimensional model boundary optimization method, system, terminal and storage medium, comprising: acquiring a meadow three-dimensional model to be subjected to boundary optimization in a natural scene three-dimensional model; using a distance field-based boundary fusion method to perform gradual blending of material properties of the meadow three-dimensional model and an adjacent area model; dividing a boundary domain and an internal domain of the meadow three-dimensional model, and generating model points corresponding to the boundary domain and the internal domain based on a region density control algorithm and a rejection sampling algorithm; based on the generated model points and the gradually blended material properties, optimizing the meadow three-dimensional model, and outputting an optimized meadow three-dimensional model; the present application enhances the visual consistency of the meadow three-dimensional model at the boundary, and improves the realism of the meadow three-dimensional model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of geographic information engineering technology, and in particular to a method, system, terminal, and storage medium for optimizing the boundary of a 3D grassland model. Background Technology

[0002] With the rapid development of digital twin cities and real-scene 3D construction technologies, highly realistic 3D modeling has become a key task in the fields of geographic information systems (GIS) and computer graphics. Natural scenes, as an important component of urban space, directly impact the immersion and realism of the entire virtual environment through their modeling quality. Grasslands, being a typical natural element with wide coverage and high element density, are particularly crucial for effective modeling.

[0003] In recent years, object-oriented modeling methods have gradually replaced traditional texture mapping methods and become the mainstream technology for high-realism grassland modeling in natural scenes. However, in the practical application of object-oriented modeling methods for 3D grassland modeling, the treatment of scene boundaries is neglected, resulting in obvious technical defects, mainly manifested as: (1) The material transition at the boundary is abrupt. Existing technology directly uses two-dimensional vector boundaries and performs a hard material switch on adjacent areas at the boundary, resulting in unnatural jagged seams, which destroys the visual continuity and realism of the scene; (2) The model geometry penetrates and clips at the boundary. The grass model itself has a certain geometric volume. The geometric structure of the model placement anchor point located near the boundary line of the grassland area will exceed the boundary range and have an unrealistic intersection with other 3D models in the adjacent area, which greatly reduces the reliability and realism of the modeling results.

[0004] Existing 3D grassland modeling methods still suffer from insufficient boundary realism, therefore, existing technologies need further improvement. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method, system, terminal and storage medium for optimizing the boundary of a 3D grassland model, in order to solve the problem of insufficient boundary realism in existing 3D grassland modeling methods.

[0006] The technical solution adopted by this invention to solve the technical problem is as follows:

[0007] In a first aspect, the present invention provides a method for optimizing the boundary of a three-dimensional grassland model, comprising:

[0008] Obtain the 3D model of the grassland to be optimized from the 3D model of the natural scene;

[0009] A boundary fusion method based on distance field is used to gradually blend the material properties of the 3D grassland model and the adjacent region model.

[0010] The boundary region and interior region of the grassland 3D model are divided, and model points corresponding to the boundary region and the interior region are generated based on the region density control algorithm and the rejection sampling algorithm.

[0011] Based on the generated model points and the material properties after gradient blending, the 3D model of the grassland is optimized, and the optimized 3D model of the grassland is output.

[0012] In one implementation, obtaining the 3D model of the grassland to be optimized from the 3D model of the natural scene includes:

[0013] The three-dimensional model of the natural scene is divided into regions based on the material of the elements;

[0014] Extract the boundaries of each region to obtain the vector boundary map corresponding to the three-dimensional model of the natural scene;

[0015] Based on the vector boundary map, obtain the 3D model of the grassland that requires boundary optimization.

[0016] In one implementation, the distance field-based boundary fusion method performs a gradual blending of material properties between the 3D grassland model and the adjacent region model, including:

[0017] Based on the three-dimensional model of the grassland and the model of the adjacent region, the boundary line and transition domain are obtained, and the symbolic distance field of the transition domain is established.

[0018] Based on the symbolic distance field, calculate the fusion weights of all points in the transition domain;

[0019] Based on the fusion weight, the material properties of all points within the transition domain are generated to obtain the material properties after gradient blending.

[0020] In one implementation, calculating the fusion weights of all points in the transition domain based on the symbolic distance field includes:

[0021] Based on the symbolic distance field, the width and outer contour distance values ​​of the transition domain are obtained;

[0022] Obtain the position of the boundary line, select any point within the transition domain, and calculate the distance between the selected point and the boundary line;

[0023] The weight value of the selected point is calculated based on the distance between the selected point and the boundary line, the width of the transition domain, and the distance value of the outer contour.

[0024] The fusion weight is obtained based on the weight values ​​of all points within the transition domain.

[0025] In one implementation, the step of dividing the boundary region and interior region of the grassland 3D model, and generating model points corresponding to the boundary region and the interior region based on a region density control algorithm and a rejection sampling algorithm, includes:

[0026] The three-dimensional model of the grassland is divided into a boundary domain and an interior domain;

[0027] A preset first density value is used in the boundary domain, and a second density function of the inner domain is obtained based on the first density value and a density control algorithm.

[0028] The model points corresponding to the boundary domain are obtained based on the first density value;

[0029] Based on the rejection sampling algorithm and the second density function, model points corresponding to the internal domain are generated.

[0030] In one implementation, generating the model points corresponding to the inner domain based on the rejection sampling algorithm and the second density function includes:

[0031] A point is randomly generated in the inner domain, and the second density value of the generated point is calculated according to the second density function.

[0032] Generate a random number based on the first density value, and determine whether the random number is less than the second density value;

[0033] If the random number is less than the second density value, then the generated point is retained;

[0034] Obtain all the retained generated points to get the model points corresponding to the internal domain.

[0035] In one implementation, the boundary domain is a subdomain with a width greater than the size of the grass model; the interior domain is the remaining subdomain in the 3D grass model excluding the boundary domain.

[0036] Secondly, the present invention provides a grassland three-dimensional model boundary optimization system, comprising:

[0037] The model acquisition module is used to acquire the 3D model of the grassland to be optimized in the 3D model of the natural scene;

[0038] The boundary blending module is used to perform a gradual blending of material properties between the 3D grassland model and the adjacent region model using a distance field-based boundary blending method.

[0039] The point generation module is used to divide the boundary domain and interior domain of the grassland 3D model, and generate model points corresponding to the boundary domain and the interior domain based on the region density control algorithm and the rejection sampling algorithm.

[0040] The model output module is used to optimize the 3D grassland model based on the generated model points and the material properties after gradient blending, and output the optimized 3D grassland model.

[0041] Thirdly, the present invention provides a terminal, comprising: a processor and a memory, wherein the memory stores a grassland 3D model boundary optimization program, and the grassland 3D model boundary optimization program, when executed by the processor, is used to implement the grassland 3D model boundary optimization method as described in the first aspect.

[0042] Fourthly, the present invention also provides a computer-readable storage medium storing a grassland three-dimensional model boundary optimization program, which, when executed by a processor, is used to implement the grassland three-dimensional model boundary optimization method as described in the first aspect.

[0043] The present invention, by employing the above technical solution, has the following effects:

[0044] Using a distance field-based boundary blending method, the material properties of the 3D grassland model and adjacent region models are gradually mixed. This accurately simulates the gradient and erosion effects at the boundaries between grassland and different materials in reality, eliminating the artificial stitching feel at the boundaries of the 3D grassland model and making the boundary transition natural. The 3D grassland model is divided into boundary and interior domains. Combined with a region density control algorithm, the grass model is strictly aligned with the boundary line in the boundary domain, solving the geometric penetration problem of the model at the boundary and avoiding geometric errors. In the interior domain, the density decay is achieved through the region density control algorithm, which significantly reduces the total number of models and reduces the memory usage. The optimized 3D grassland model achieves seamlessness and no penetration at the boundaries, with reasonable model distribution, strong visual consistency, and improved rendering efficiency while providing a stronger sense of visual realism. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0046] Figure 1 This is a flowchart of the grassland 3D model boundary optimization method in this invention.

[0047] Figure 2 This is a schematic diagram of material transition at the boundary of existing technology.

[0048] Figure 3 This is a schematic diagram of the geometric penetration between existing grass model and other models.

[0049] Figure 4 This is a schematic diagram of material fusion based on the distance field when the outer contour value of the transition domain is less than 0 in one implementation of the present invention.

[0050] Figure 5 This is a schematic diagram of material fusion based on the distance field when the outer contour value of the transition domain is equal to 0 in one implementation of the present invention.

[0051] Figure 6 This is a schematic diagram of material fusion based on the distance field when the outer contour value of the transition domain is greater than 0 in one implementation of the present invention.

[0052] Figure 7 This is a comparison image showing the material fusion effect before and after at the boundary where the grass material and the road material meet, in one implementation of the present invention.

[0053] Figure 8 This is a schematic diagram of the grassland scene area divided in one implementation of the present invention.

[0054] Figure 9 This is a graph showing the variation of the density values ​​of the boundary domain and the interior domain with the minimum distance s in one implementation of the present invention.

[0055] Figure 10 This is a schematic diagram illustrating the placement effect of the grass model at the front and back boundaries using the grassland 3D model boundary optimization method in one implementation of the present invention.

[0056] Figure 11 This is a technical roadmap of the optimized grassland 3D model output method in one implementation of the present invention.

[0057] Figure 12 This is a comparison image of the boundary before and after using the grassland 3D model boundary optimization method in one implementation of the present invention.

[0058] Figure 13 This is a functional schematic diagram of the terminal in one implementation of the present invention.

[0059] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0061] Exemplary methods

[0062] In recent years, object-oriented modeling has gradually replaced traditional texture mapping and become the mainstream technology for high-realism grassland modeling in natural scenes. This method discretizes the grassland into a large number of independent model instances through the "point + 3D grass model" approach, thereby expressing more refined geometric details and dynamic effects, and significantly improving the realism of close-up observation of the grassland.

[0063] However, in the practical application of object-oriented modeling methods for 3D grassland models, the neglect of scene boundary treatment leads to significant technical shortcomings, mainly manifested in the following ways:

[0064] The abrupt transitions in materials at boundaries are problematic. In 3D terrain, different elements (such as grass, roads, and water) are typically defined by materials. Current technology directly uses 2D vector boundaries, abruptly switching materials between adjacent areas at these boundaries, resulting in unnatural, jagged seams. This abrupt transition does not conform to the natural laws of gradual change and permeation between different materials in the real world (such as grass and soil), severely disrupting the visual continuity and realism of the scene. Figure 2 The diagram shown illustrates the material transition at the boundary of existing technologies. Figure 2 In the middle (a), the two-dimensional vector boundary diagram of the joint between the grass material and other material types is shown. Figure 2 (b-1) is the joint between the grass material and the brick material. Figure 2 (b-2) shows the joint between the grass material and the road material, where there is a problem of hard material switching.

[0065] At the boundary, geometric penetration and clipping occur. Grass models themselves have a certain geometric volume, and the geometry of models placed near the boundary line of the grass area will extend beyond the boundary, causing unrealistic intersections with other 3D models in adjacent areas (such as curbs and paving). This is known as the "Z-Fighting" problem in computer graphics. This geometric penetration and clipping error makes the virtual scene appear rough and inconsistent with physical laws, greatly reducing the reliability and realism of the modeling results. Therefore, existing object-based grass modeling techniques, due to their failure to properly handle the changes in boundary topology brought about by 3D spatial dimensionality upgrades, have inherent defects in material representation and geometric placement. This results in 3D scenes with insufficient realism in boundary areas, making it difficult to meet the high-precision application requirements of digital twins; for example... Figure 3 As shown, Figure 3This is a schematic diagram illustrating the geometric penetration between existing grass-like models and other models. Figure 3 Images (a) and (b) are schematic diagrams illustrating the geometric penetration between the grass model and the road model. Figure 3 (c) and (d) are schematic diagrams of the geometric penetration between the grass model and the river model.

[0066] To address the above technical problems, this invention provides a method for optimizing the boundary of a 3D grassland model, comprising: acquiring a 3D grassland model to be optimized from a 3D model of a natural scene; using a boundary fusion method based on a distance field to gradually blend the material properties of the 3D grassland model and adjacent region models; dividing the boundary domain and interior domain of the 3D grassland model, and generating model points corresponding to the boundary domain and the interior domain based on a region density control algorithm and a rejection sampling algorithm; optimizing the 3D grassland model based on the generated model points and the material properties after gradual blending, and outputting the optimized 3D grassland model; this invention enhances the visual consistency of the 3D grassland model at the boundary and improves the realism of the 3D grassland model.

[0067] It should be noted that the grassland 3D model boundary optimization method provided in this embodiment of the invention is not limited to the boundary optimization of grassland as a dense natural element model. It can also be extended to the boundary optimization of other dense natural element models, such as shrubs, flower beds, and reed beds. When applying it, it is only necessary to use a model and material that matches the selected natural element, and the core processing method remains unchanged.

[0068] like Figure 1 As shown in the figure, this embodiment of the invention provides a method for optimizing the boundary of a 3D grassland model, including the following steps:

[0069] Step S100: Obtain the 3D model of the grassland to be optimized in the 3D model of the natural scene.

[0070] It should be noted that the acquired 3D model of the natural scene must contain at least one natural element: grass. The area where the grass is located is the 3D model of the grassland. This embodiment is used for boundary optimization of the 3D model of the grassland. Therefore, in addition to acquiring the 3D model of the grassland, it is also necessary to acquire the model of the adjacent area that intersects with the 3D model of the grassland, and to acquire the grass material of the natural element corresponding to the 3D model of the grassland. It is also necessary to acquire the material of the main natural element of the adjacent area model, such as the road material, water material, soil material, etc.

[0071] In this embodiment, the orthophotos of the natural scenes are obtained from Google Earth. First, natural scene areas such as parks and wetlands are selected, and then their orthophotos are obtained from Google Earth.

[0072] Specifically, in one implementation of this embodiment, step S100 includes the following steps:

[0073] Step S101: Divide the three-dimensional model of the natural scene into regions according to the material of the elements.

[0074] In this embodiment, the 3D model of the natural scene is divided into regions according to the different materials of the natural elements.

[0075] Step S102: Extract the boundary of each region to obtain the vector boundary map corresponding to the three-dimensional model of the natural scene.

[0076] In this embodiment, the boundaries of each region are extracted to obtain a vector boundary map corresponding to the natural scene model, and the main natural element materials in each region are marked. Different colors are used to distinguish the extracted regions.

[0077] In this embodiment, the vector boundary map is obtained through a region boundary extraction algorithm, such as an edge detection algorithm.

[0078] Step S103: Based on the vector boundary map, obtain the three-dimensional model of the grassland that needs to be optimized for boundary.

[0079] In this embodiment, based on the vector boundary map after the marking process, the grassland 3D model that needs boundary optimization is located, and the adjacent region model that intersects with the grassland 3D model is obtained.

[0080] like Figure 1 As shown in the figure, this embodiment of the invention provides a method for optimizing the boundary of a 3D grassland model, including the following steps:

[0081] Step S200: Using a boundary fusion method based on distance field, the material properties of the 3D grassland model and the adjacent region model are gradually blended.

[0082] Specifically, in one implementation of this embodiment, step S200 includes the following steps:

[0083] Step S201: Obtain the boundary line and transition domain based on the grassland 3D model and the adjacent region model, and establish the symbolic distance field of the transition domain.

[0084] In this embodiment, the boundary line between the grassland 3D model and the adjacent region model is first determined. Based on the boundary line, the transition domain is determined. The side of the boundary line closer to the grassland 3D model is defined as the inner side of the transition domain, and the side of the boundary line closer to the adjacent region model is defined as the outer side of the transition domain. Thus, the signed distance field of the transition domain is established according to the boundary line and the transition domain.

[0085] In this embodiment, the location of the boundary line in the symbolic distance field is defined as zero, indicating that the point is located on the surface of the boundary line; the inner side of the transition domain, i.e. the side of the boundary line closer to the grassland 3D model, is defined as negative, indicating that the point is located inside the transition domain; the outer side of the transition domain, i.e. the side of the boundary line closer to the adjacent region model, is defined as positive, indicating that the point is located outside the past domain.

[0086] In this embodiment, the larger the absolute value of the distance between the symbol and the point in the field, the farther away it is from the boundary line, and the positive or negative sign of the point indicates the direction in which it moves away from the boundary line.

[0087] Step S202: Calculate the fusion weights of all points in the transition domain based on the symbolic distance field.

[0088] In one implementation of this embodiment, the fusion weights of all points in the transition domain are calculated based on the symbolic distance field, including the following steps:

[0089] Step S202a: Based on the symbolic distance field, obtain the width and outer contour distance values ​​of the transition domain.

[0090] Specifically, the width of the transition domain is obtained based on the symbolic distance field. Distance value between outer contour .

[0091] Step S202b: Obtain the position of the boundary line, select any point within the transition domain, and calculate the distance between the selected point and the boundary line.

[0092] Specifically, the position of the boundary line within the transition domain is obtained. Any point is selected within the transition domain, and based on the boundary line, it is determined whether the selected point is inside or outside the transition domain, thus determining the sign of the selected point. Finally, the distance between the selected point and the boundary line is calculated. .

[0093] Step S202c: Calculate the weight value of the selected point based on the distance between the selected point and the boundary line, the width of the transition domain, and the distance value of the outer contour.

[0094] In this embodiment, based on the distance between the selected point and the boundary line Determine its width relative to the transition domain. Distance value between outer contour Based on the size relationship, the weight value of the selected point is calculated using different methods:

[0095] When the selected point is at a distance from the boundary line Less than or equal to the outer contour distance value of the transition domain When the weight is 0;

[0096] When the selected point is at a distance from the boundary line Greater than the outer contour distance value of the transition domain And smaller than the width of the transition domain. When calculating the weights, use the following formula:

[0097] ;

[0098] in, This is the weighting function.

[0099] When the selected point is at a distance from the boundary line Width greater than or equal to the transition domain When the weight is 1, the weight is 1.

[0100] Step S202d: Obtain the fusion weight based on the weight values ​​of all points in the transition domain.

[0101] In this embodiment, a piecewise function is used to represent the weight values ​​of all points in the transition domain, thereby obtaining the weight function for the fused weights, as follows:

[0102] ;

[0103] It should be noted that the weight function The result is the weight value , is used to indicate the degree of control over material mixing.

[0104] Step S203: Generate the material properties of all points in the transition domain according to the fusion weight, and obtain the material properties after gradient blending.

[0105] In this embodiment, the material properties of all points within the transition domain are generated based on the fusion weights to obtain the material properties after gradient blending. That is, the material properties of the grassland 3D model and the adjacent region model are weighted and fused using weight values ​​to generate new material properties. The calculation formula for the new material properties is as follows:

[0106] ;

[0107] in, The new material properties after fusion and Representing regions and region Material properties.

[0108] It should be noted that the outer contour distance value of the transition domain also affects the generated new material properties. For example... Figure 4 The figure shows a schematic diagram of material fusion based on the distance field when the outer contour value of the transition domain is less than 0. Figure 4 (1) indicates The sign distance field at time, (2) represents Time, region ,area And a schematic diagram of the transition domain location, (3) indicates At that time, the distance between the selected point and the boundary line within the transition domain. The corresponding curve of the new material property value function.

[0109] Similarly, Figure 5 A schematic diagram of material fusion based on the distance field when the outer contour value of the transition domain is equal to 0. Figure 5 (1) indicates The sign distance field at time, (2) represents Time, region ,area And a schematic diagram of the transition domain location, (3) indicates At that time, the distance between the selected point and the boundary line within the transition domain. The corresponding curve of the new material property value function.

[0110] Figure 6 A schematic diagram of material fusion based on the distance field when the outer contour value of the transition domain is greater than 0. Figure 6 (1) indicates The sign distance field at time, (2) represents Time, region ,area And a schematic diagram of the transition domain location, (3) indicates At that time, the distance between the selected point and the boundary line within the transition domain. The corresponding curve of the new material property value function.

[0111] In this embodiment, the region A 3D model of the grassland, region For adjacent region models; material properties include at least color, roughness, and normals.

[0112] In this embodiment, the transition domain width is adjusted. The blending mode can simulate the natural interaction between different materials, such as the soft blending effect of grass and soil, or the hard blending effect of grass and road.

[0113] like Figure 7 The image shown is a comparison of the material blending effects before and after at the boundary where the grass and road materials meet. Figure 7 (a-1) is a top view of the boundary before fusion; Figure 7 (a-2) is the front view of the boundary before fusion; Figure 7 (b-1) is a top view of the boundary before fusion; Figure 7(b-2) is the front view of the boundary after fusion. By using a boundary fusion method based on a distance field, the material properties of the 3D model of the grassland and the adjacent area model are gradually mixed, which can simulate the natural gradual transition of materials at the boundaries of different areas in a natural scene, so as to eliminate harsh jagged seams; by establishing a spatial distance field to calculate the weight of material fusion, a smooth transition effect can be generated.

[0114] In this embodiment, traditional image processing techniques can be used to replace distance field calculation. The boundary region of the material image is processed by filtering algorithms such as Gaussian blur and edge softening. Then, the transparency channel is calculated by combining alpha blending technology, and the filtered layers are superimposed and blended to achieve a gradual transition of the boundary material.

[0115] like Figure 1 As shown in the figure, this embodiment of the invention provides a method for optimizing the boundary of a 3D grassland model, including the following steps:

[0116] Step S300: Divide the boundary domain and interior domain of the grassland 3D model, and generate model points corresponding to the boundary domain and the interior domain based on the region density control algorithm and the rejection sampling algorithm.

[0117] like Figure 8 As shown, this is a schematic diagram of the divided grassland scene area. The 3D grassland model is divided into two sub-domains: a boundary domain and an interior domain. Different density values ​​are selected for different sub-domains based on the density function. Model points are generated according to the characteristics of the sub-domains. The model points corresponding to the boundary domain are generated in a regular arrangement, while the model points corresponding to the interior domain are randomly generated using a rejection sampling algorithm.

[0118] Specifically, in one implementation of this embodiment, step S300 includes the following steps:

[0119] Step S301: Divide the three-dimensional grassland model into a boundary domain and an interior domain.

[0120] In this embodiment, the boundary domain is a subdomain with a width greater than the size of the grass model, so that the grass model can be strictly aligned with the boundary line and ensure that the model does not exceed the boundary of the region after placement, thereby solving the geometric penetration problem of the model at the boundary; the inner domain is the remaining subdomain in the grass 3D model excluding the boundary domain, and the boundary domain usually wraps the inner domain, and the model density of the inner domain decreases as the distance from the boundary increases.

[0121] Step S302: Using a preset first density value in the boundary domain, a second density function of the inner domain is obtained based on the first density value and a density control algorithm.

[0122] In this embodiment, the boundary region uses a preset first density value. First density value A constant high density value is used to ensure that the model is neatly arranged and does not exceed the limits.

[0123] In this embodiment, since the model density of the inner domain decays with increasing distance from the boundary, different points within the inner domain correspond to different density values. Based on the first density value of the boundary domain and the density algorithm, the second density function of the inner domain is obtained. The second density function uses an exponentially decaying density function to calculate the second density value at any point within the inner domain, and its formula is as follows:

[0124] ;

[0125] in, For the width of the boundary domain, For boundary domain density, This is the minimum distance between the current point and the boundary of the internal domain. The attenuation coefficient is the attenuation coefficient. satisfy .

[0126] In this embodiment, the second density function can also be replaced by other functions, such as linear decay function or polynomial decay function. Linear decay function can make the density decrease linearly from the boundary line, while polynomial decay function can control the curve shape of density decay by adjusting the degree of function. Both satisfy the characteristic that the density of the internal domain model decreases with the increase of distance from the boundary.

[0127] like Figure 9 The figure shows the curves of density values ​​in the boundary and interior domains as a function of minimum distance s. The first density value remains constant; however, when using the second density function, the density value changes with the minimum distance s. and boundary domain width When the relationship between the two densities is different, the second density value corresponding to the second density function changes as follows:

[0128] when At that time, the second density value remains constant;

[0129] when At that time, the second density value changes with the minimum distance. The increase is exponentially decreasing.

[0130] Step S303: Obtain the model points corresponding to the boundary domain based on the first density value.

[0131] In this embodiment, the points in the boundary domain are arranged in a regular manner, with the first density value... For a constant high density value, based on the first density value Obtain the model points corresponding to the boundary domain.

[0132] Step S304: Based on the rejection sampling algorithm and the second density function, generate model points corresponding to the internal domain.

[0133] In this embodiment, the second density value of the inner domain is not a constant density value. Different points have different second density values ​​due to their location. Therefore, a point is randomly generated in the inner domain each time, and the rejection sampling algorithm is used to determine whether the generated point needs to be retained. In this way, all the retained generated points are obtained, thereby generating the model points corresponding to the inner domain.

[0134] Specifically, in one implementation of this embodiment, step S304 includes the following steps:

[0135] Step S304a: Randomly generate a point in the inner domain, and calculate the second density value of the generated point according to the second density function.

[0136] Specifically, taking the center of the internal domain as the origin. Randomly generate a point The domain boundary of the inner domain is Axis distance from origin The distance is The domain boundary of the inner domain is Axis distance from origin The distance is First calculate the point Minimum distance between the inner domain and the domain boundary The formula is as follows:

[0137] ;

[0138] Substituting the calculated minimum distance into the density formula in step S302, we obtain the second density value of the generated point calculated based on the second density function. .

[0139] Step S304b: Generate a random number based on the first density value, and determine whether the random number is less than the second density value.

[0140] In this embodiment, based on the first density value Generate a random number to determine if it is less than the second density value. The formula for generating the random number is as follows:

[0141] .

[0142] Step S304c: If the random number is less than the second density value, then the generated point is retained. .

[0143] In this embodiment, when the judgment result is a random number Less than the second density value At that time, retain the generated points. Otherwise, refuse to retain the generated point. .

[0144] Step S304d: Obtain all the retained generated points to obtain the model points corresponding to the internal domain.

[0145] In this embodiment, a point array is used. This represents all model points corresponding to the inner domain, and the generated points in step S304c. When retaining, add it to the point array. middle.

[0146] In this embodiment, the interior domain randomly generates model points using a density control algorithm and a rejection sampling algorithm, and the distribution of the generated model points is consistent with the density function. Based on the content of step S304, the sampling algorithm for the placement points of the interior domain model is obtained: Generate_Interior_Points. Based on this algorithm, the interior domain model points are generated quickly, as follows:

[0147] The input to the sampling algorithm for the placement points of the internal domain model is: ;in Indicates the total number of generated points;

[0148] The output is: ;

[0149] The corresponding procedure is as follows:

[0150] :

[0151] ;

[0152] ;

[0153] ;

[0154] ;

[0155] :

[0156] ;

[0157] The above program is programmed in Python. This indicates that points will be generated. Add to point array .

[0158] like Figure 10The image shown is a schematic diagram illustrating the placement effect of the grass model at the boundary before and after using the grassland 3D model boundary optimization method in this embodiment. Figure 10 (a-1) is the top view at the optimized front boundary; Figure 10 (a-2) is the front view at the front boundary before optimization; Figure 10 (b-1) is the top view of the optimized boundary; Figure 10 (b-2) is the front view of the optimized boundary. Density decay was achieved in the inner domain through a region density control algorithm, so that the model density decreases from the inner boundary to the center. Furthermore, by optimizing the spatial distribution of the model, the total number of model instances was significantly reduced while ensuring visual coverage, thus reducing memory usage and achieving a significant improvement in rendering performance.

[0159] like Figure 1 As shown in the figure, this embodiment of the invention provides a method for optimizing the boundary of a 3D grassland model, including the following steps:

[0160] Step S400: Based on the generated model points and the material properties after gradient blending, optimize the 3D model of the grassland and output the optimized 3D model of the grassland.

[0161] In this embodiment, based on the material properties after gradient blending The boundary domain corresponds to the regularly arranged model points, and the interior domain corresponds to the model point array. The boundary areas of the 3D grassland model were optimized, resulting in an optimized 3D grassland model. Scene rendering after modeling was performed using the open-source game engine Unreal Engine 5.2, with the merged materials... Both the grass model and the grass model need to be converted into data assets in Unreal Engine 5.2. The merged material is applied to the terrain surface, and the grass model is placed on the terrain according to the points.

[0162] like Figure 11 The diagram shows the technical roadmap for the optimized grassland 3D model output method. The original grassland 3D model output method's flow is as follows: data input, boundary extraction, boundary blending, density calculation, scene rendering, and data output, as detailed below:

[0163] Data input: refers to the input of orthophotos of natural scenes, and the area for grassland modeling is selected through AI models and human-computer interaction;

[0164] Boundary extraction: Edge detection is performed on the semantically segmented grassland modeling region to convert it from a region surface into a vector boundary line;

[0165] Boundary blending: The materials of grass and other types of areas need to be blended. The method used is the distance field function to obtain a mixed material.

[0166] Density calculation: The grassland area is divided into boundary area and inner area. Different point generation algorithms are used in different areas, and the corresponding density functions are also different, which finally obtains the point placement information of the model.

[0167] Scene rendering: The scene rendering stage requires the use of 3D models. This embodiment includes four 3D models, namely grass, flowers, leaves and stones. Through instantiation technology, the models are instantiated according to the obtained point information. It can be seen that the distribution of the models is consistent with the distribution of the points, and finally a complete grassland scene is obtained.

[0168] The boundary extraction step is used to obtain the vector boundary map of the grassland 3D model. The data input step corresponds to step S100 in this embodiment. The boundary fusion step is used to fuse the materials of the grassland 3D model at the boundary with the adjacent area model. This corresponds to step S200 in this embodiment. The density calculation step is used to calculate the model points corresponding to the boundary domain and the internal domain. This corresponds to step S300 in this embodiment. The scene rendering step and the data output step are used to perform scene rendering and output of the optimized grassland 3D model. This corresponds to step S400 in this embodiment.

[0169] like Figure 12 The image shown is a comparison of the boundary before and after using the grassland 3D model boundary optimization method. Figure 10 In the middle, (a-1), (a-2), (a-3), and (a-4) are, respectively, the placement point map at the boundary of the grassland 3D model before optimization, the placement point map of the boundary domain, the placement point map of the internal domain, and the actual effect map; Figure 12 In the middle, (b-1), (b-2), (b-3), and (b-4) are, respectively, the placement points at the boundary of the optimized 3D grassland model, the placement points in the boundary domain, the placement points in the interior domain, and the actual effect diagram.

[0170] In this embodiment, when the attenuation coefficient When the value is 1, the corresponding model generation efficiency data before and after optimization are shown in Table 1 below.

[0171] Table 1. Comparison of model generation efficiency data at the boundary of the 3D grassland model before and after optimization;

[0172]

[0173] It should be noted that the frame rates in the table use the average frame rate generated by the model.

[0174] According to the results in Table 1, after using the grassland 3D model boundary optimization method in this embodiment, the number of models was reduced by 26.42%, the model generation time was reduced by 37.51%, the video memory usage was reduced by 44.59%, and the average frame rate during generation was increased by 30.4%.

[0175] This embodiment achieves the following technical effects through the above technical solution:

[0176] The grassland 3D model boundary optimization method in this embodiment, in addition to eliminating the artificial splicing feel of grass at the boundary through material fusion and making the boundary transition natural, also uses partitioned density control. In the boundary domain, a constant high density value is used to regularly arrange the model generation points, ensuring that the grass model is strictly located inside the region, solving the geometric penetration problem of the model at the boundary, and making the grass strictly aligned with the boundary line. At the same time, the internal domain uses a decay density function to make the model density decrease from the inner boundary to the center, reducing memory usage and generation time. Moreover, the optimized grassland 3D model has a reasonable model distribution at the boundary and strong visual consistency, solving the problem of insufficient realism of the grassland 3D model at the boundary.

[0177] Exemplary device

[0178] Based on the above embodiments, the present invention also provides a grassland 3D model boundary optimization system, comprising:

[0179] The model acquisition module is used to acquire the 3D model of the grassland to be optimized in the 3D model of the natural scene;

[0180] The boundary blending module is used to perform a gradual blending of material properties between the 3D grassland model and the adjacent region model using a distance field-based boundary blending method.

[0181] The point generation module is used to divide the boundary domain and interior domain of the grassland 3D model, and generate model points corresponding to the boundary domain and the interior domain based on the region density control algorithm and the rejection sampling algorithm.

[0182] The model output module is used to optimize the 3D grassland model based on the generated model points and the material properties after gradient blending, and output the optimized 3D grassland model.

[0183] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 13 As shown.

[0184] The terminal includes: a processor, a memory, an interface, a display screen, and a communication module connected via a system bus; wherein, the processor of the terminal provides computing and control capabilities; the memory of the terminal includes a computer-readable storage medium and internal memory; the computer-readable storage medium stores an operating system and computer programs; the internal memory provides an environment for the operation of the operating system and computer programs in the computer-readable storage medium; the interface is used to connect to external devices; the display screen is used to display relevant information; and the communication module is used to communicate with a cloud server or other devices.

[0185] When executed by the processor, this computer program is used to implement the boundary optimization method for the three-dimensional model of grassland.

[0186] It will be understood by those skilled in the art that Figure 13 The schematic diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal to which the present invention is applied. A specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0187] In one embodiment, a terminal is provided, comprising: a processor and a memory, the memory storing a grassland 3D model boundary optimization program, which, when executed by the processor, is used to implement the grassland 3D model boundary optimization method described above.

[0188] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a grassland 3D model boundary optimization program, which, when executed by a processor, is used to implement the grassland 3D model boundary optimization method described above.

[0189] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, database, or other media used in the embodiments provided by this invention can include both non-volatile and volatile memory.

[0190] In summary, this invention provides a method, system, terminal, and storage medium for optimizing the boundary of a 3D grassland model, comprising: acquiring and preprocessing a multimodal image dataset to obtain an initial image dataset; inputting the initial image dataset into corresponding autoencoders to obtain corresponding time-invariant features, and pre-training the corresponding modal autoencoders by feature reconstruction; classifying the obtained features using the geographic location information of the initial image data to generate positive and negative sample pairs, and adjusting the trained autoencoders using a contrastive loss function constrained by cosine similarity; based on the adjusted autoencoders, extracting features with spatiotemporal invariant information from the corresponding modal images, and performing feature fusion by integrating spatiotemporal invariant information that takes into account modal importance; and outputting the fused image features. This invention improves the fusion accuracy of multimodal remote sensing image features.

[0191] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for optimizing the boundary of a three-dimensional grassland model, characterized in that, include: Obtain the 3D model of the grassland to be optimized from the 3D model of the natural scene; The boundary fusion method based on distance field performs gradient blending of material properties on the 3D model of the grassland and the model of the adjacent region. The boundary region and interior region of the grassland 3D model are divided, and model points corresponding to the boundary region and the interior region are generated based on the region density control algorithm and the rejection sampling algorithm. Based on the generated model points and the material properties after gradient blending, the 3D model of the grassland is optimized, and the optimized 3D model of the grassland is output. The density control algorithm includes: generating corresponding model points in the boundary domain using a regular arrangement, and randomly generating corresponding model points in the inner domain using a rejection sampling algorithm; The step of dividing the boundary and interior regions of the 3D grassland model and generating model points corresponding to the boundary and interior regions based on a region density control algorithm and a rejection sampling algorithm includes: The three-dimensional model of the grassland is divided into a boundary domain and an interior domain; A preset first density value is used in the boundary domain, and a second density function of the inner domain is obtained based on the first density value and a density control algorithm. The model points corresponding to the boundary domain are obtained based on the first density value; Based on the rejection sampling algorithm and the second density function, model points corresponding to the internal domain are generated.

2. The grassland 3D model boundary optimization method according to claim 1, characterized in that, The process of obtaining the grassland 3D model to be optimized from the 3D model of the natural scene includes: The three-dimensional model of the natural scene is divided into regions based on the material of the elements; Extract the boundaries of each region to obtain the vector boundary map corresponding to the three-dimensional model of the natural scene; Based on the vector boundary map, obtain the 3D model of the grassland that requires boundary optimization.

3. The grassland 3D model boundary optimization method according to claim 1, characterized in that, The distance field-based boundary fusion method performs a gradual blending of material properties between the 3D grassland model and the adjacent region model, including: Based on the three-dimensional model of the grassland and the model of the adjacent region, the boundary line and transition domain are obtained, and the symbolic distance field of the transition domain is established. Based on the symbolic distance field, calculate the fusion weights of all points in the transition domain; Based on the fusion weight, the material properties of all points within the transition domain are generated to obtain the material properties after gradient blending.

4. The grassland three-dimensional model boundary optimization method according to claim 3, characterized in that, The calculation of the fusion weights for all points in the transition domain based on the symbolic distance field includes: Based on the symbolic distance field, the width and outer contour distance values ​​of the transition domain are obtained; Obtain the position of the boundary line, select any point within the transition domain, and calculate the distance between the selected point and the boundary line; The weight value of the selected point is calculated based on the distance between the selected point and the boundary line, the width of the transition domain, and the distance value of the outer contour. The fusion weight is obtained based on the weight values ​​of all points within the transition domain.

5. The grassland 3D model boundary optimization method according to claim 1, characterized in that, The step of generating model points corresponding to the inner domain based on the rejection sampling algorithm and the second density function includes: A point is randomly generated in the inner domain, and the second density value of the generated point is calculated according to the second density function. Generate a random number based on the first density value, and determine whether the random number is less than the second density value; If the random number is less than the second density value, then the generated point is retained; Obtain all the retained generated points to get the model points corresponding to the internal domain.

6. The grassland 3D model boundary optimization method according to claim 1, characterized in that, The boundary domain is a subdomain with a width greater than the size of the grass model; the interior domain is the remaining subdomain in the 3D grass model excluding the boundary domain.

7. A grassland 3D model boundary optimization system, used to implement the grassland 3D model boundary optimization method as described in any one of claims 1-6, characterized in that, include: The model acquisition module is used to acquire the 3D model of the grassland to be optimized in the 3D model of the natural scene; The boundary blending module is used to perform a gradual blending of material properties between the 3D grassland model and the adjacent region model using a distance field-based boundary blending method. The point generation module is used to divide the boundary domain and interior domain of the grassland 3D model, and generate model points corresponding to the boundary domain and the interior domain based on the region density control algorithm and the rejection sampling algorithm. The model output module is used to optimize the 3D grassland model based on the generated model points and the material properties after gradient blending, and output the optimized 3D grassland model.

8. A terminal, characterized in that, include: The processor and memory, wherein the memory stores a grassland 3D model boundary optimization program, which, when executed by the processor, is used to implement the grassland 3D model boundary optimization method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a grassland 3D model boundary optimization program, which, when executed by a processor, is used to implement the grassland 3D model boundary optimization method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Three-dimensional model optimization method and device, electronic equipment and computer storage medium

    CN119418001A

  • Three-dimensional image reconstruction method and device based on sparse view and computer equipment

    CN120543786A