A three-dimensional terrain multi-layer ground sticking rendering method and device based on a unified height field

By using a unified height field method, the problem of inconsistent heights of multi-layer objects in 3D terrain rendering was solved, achieving accurate fitting of meshes and linear features and rendering stability.

CN123181757APending Publication Date: 2026-11-27XIAN SECLOVER INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611346052.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, when multiple objects are superimposed in 3D terrain rendering, it is difficult to ensure that all layers use the same height reference, resulting in problems such as floating, interpenetration, and misalignment, especially the edges of linear features do not fit on undulating terrain.

Method used

A unified height field method is adopted to establish a 3D rendering coordinate system and generate a unified height field. The center curve is generated by the anchor points of grid lines and linear features, the height of boundary points is calculated, and a grid and linear feature layer that fits the terrain is formed. The height offset and transparency are controlled by layer rendering to ensure a unified height reference for each layer.

Benefits of technology

It achieves accurate fit of objects in multi-layer 3D terrain rendering, reduces floating and occlusion anomalies, and improves the stability and clarity of rendering effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181757A_ABST
    Figure CN123181757A_ABST
Patent Text Reader

Abstract

The application discloses a three-dimensional terrain multi-layer ground-adhesion rendering method and device based on a unified height field, and the method comprises the following steps: establishing a unified height field; dividing a target area into a plurality of terrain grid vertices, each terrain grid vertex inquiring the unified height field by using the plane coordinates of the terrain grid vertex to obtain the height, and obtaining a three-dimensional terrain layer; each sampling point inquiring the unified height field to obtain the corresponding height, and forming a three-dimensional grid layer; generating a central curve according to a plurality of anchor points, sampling a plurality of points along the central curve, calculating a transverse normal according to the direction of the central curve, and forming a linear ground object layer that is adhered to the terrain; obtaining the plane coordinates of a marked object, and forming a marked object layer; and performing layered rendering output according to preset rendering parameters. In the scheme, the unified height field is called by each layer, and the suspension, insertion and misplacement are reduced; the grid line can follow the change of the terrain, so that the plane grid is matched with the undulating terrain; the left and right boundary points of the linear ground object also sample the height field, so that the overall belt-shaped geometry can be adhered to the terrain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This solution relates to the field of 3D terrain rendering technology, and in particular to a method and apparatus for multi-layer ground-hugging rendering of 3D terrain based on a unified height field. Background Technology

[0002] In 3D terrain visualization systems, it is often necessary to overlay multiple business objects on an undulating terrain surface. For example, the terrain itself may simultaneously display surveying grids, rivers, roads, inspection paths, ridgelines, gully lines, area boundaries, equipment points, target points, positioning posts, etc. For users, these objects should not simply "float" on the screen, but should be located on their corresponding ground positions and change naturally with the undulations of the terrain, such as slopes, valleys, and hills.

[0003] The current practice typically involves first generating a 3D terrain, and then overlaying other layers as independent objects on top of the terrain. For example, the mesh is generated as a planar grid, rivers or roads are generated as 2D curves, and marker points are placed at a fixed height or with empirical offset. This approach doesn't cause noticeable problems in flat terrain, but when the terrain is undulating, different objects can easily exhibit inconsistent heights.

[0004] Existing techniques for grounding point objects, line objects, or projecting an object onto a terrain surface typically only process a single object or only the centerline of linear features. For scenarios with multiple layers such as terrain, grids, rivers, roads, and markers, grounding only a few objects does not guarantee that all layers use the same height reference.

[0005] Furthermore, linear features such as rivers, roads, passages, and pathways are often not narrow lines, but rather strips of land with a certain width. Even if their centerline conforms to the terrain, their left and right boundaries may still be at different slope heights. If the strip geometry is generated only according to the centerline height or a fixed height offset, problems may still occur such as one edge floating, the other edge penetrating the terrain, or distortion in the width direction. Summary of the Invention

[0006] This solution aims to at least address the technical problems existing in the prior art. To this end, the first aspect of this invention proposes a three-dimensional terrain multi-layer ground-hugging rendering method based on a unified height field, the method comprising: Establish a three-dimensional rendering coordinate system for the target area and establish a unified height field H(x,z). The unified height field is used to return the corresponding ground elevation value based on the input planar position (x,z). The target area is divided into multiple terrain grid vertices. Each terrain grid vertex queries the unified height field with its planar coordinates (xi,zi) to obtain the height yi=H(xi,zi), forming a three-dimensional vertex (xi,yi,zi). Multiple three-dimensional vertices are connected to form a three-dimensional terrain grid, resulting in a three-dimensional terrain layer. The grid lines in each direction of the three-dimensional terrain layer are divided into multiple sampling points. Each sampling point queries the unified height field to obtain the corresponding height, and the grid offset is superimposed on the height to obtain multiple three-dimensional points. The multiple three-dimensional points are connected to form ground-hugging three-dimensional grid lines in each direction that change with the terrain undulations. The ground-hugging three-dimensional grid lines in each direction together constitute the ground-hugging three-dimensional grid layer. Multiple anchor points of linear features are obtained, a center curve is generated based on the multiple anchor points, multiple points are sampled along the center curve, the lateral normal is calculated based on the direction of the center curve, and the left and right boundary points are obtained by expanding to the left and right sides according to a set width. The surface height of the left and right boundary points is obtained by querying the unified height field. The left and right boundaries between adjacent sampling points are connected to form a geometric patch, forming a linear feature layer that conforms to the terrain. Obtain the planar coordinates of the marked object, query the unified height field based on the planar coordinates to obtain the ground height, and superimpose the height offset according to the mark type of the marked object to obtain the three-dimensional ground coordinates of the marked object, thus forming a marked object layer; The three-dimensional terrain layer, the ground-hugging three-dimensional mesh layer, the linear feature layer, and the marker object layer are rendered and output in layers according to preset rendering parameters.

[0007] Optionally, the unified height field is pre-generated according to the following method: Obtain basic elevation data of the target area, wherein the basic elevation data is derived from any one or more combinations of digital elevation model (DEM), height map, remote sensing data, manual modeling data, or programmed terrain algorithm; Perform coordinate transformation on the basic height data to align it with the planar coordinates (x, z) of the 3D rendering coordinate system; If the basic height data is in the form of discrete sampling points, the height value of any planar position (x, z) within the target area is calculated by interpolation algorithm; If the basic height data is in the form of a programmed algorithm, then the height value corresponding to the planar position (x, z) is calculated in real time according to the algorithm; The obtained height value is used as the return value of the unified height field H(x,z) at the position in the plane.

[0008] Optionally, the ground-hugging three-dimensional grid lines include a first-direction grid line extending along the Z-direction and having a fixed X-coordinate, and a second-direction grid line extending along the X-direction and having a fixed Z-coordinate. The ground-hugging three-dimensional grid layer, composed of the ground-hugging three-dimensional grid lines in each direction, includes: The ground-hugging three-dimensional grid layer is formed by the ground-hugging three-dimensional grid lines in the first direction and the ground-hugging three-dimensional grid lines in the second direction.

[0009] Optionally, the center curve of the linear feature is generated using any of the following curve forms: polyline, Bézier curve, B-spline curve, Catmull-Rom curve; the linear feature includes any one or more of the following: river, road, path, pipeline, inspection route, boundary line, passage line, and trajectory line.

[0010] Optionally, before performing layered rendering output of the ground-hugging 3D mesh layer, the linear feature layer, and the marker object layer according to preset rendering parameters, the method further includes: Obtain terrain enhancement lines, which are specified by artificial anchor points or automatically extracted by analyzing slope, curvature, gradient, or local extrema in the height field; the terrain enhancement lines include any one or more of the following: ridge lines, gully lines, slope highlight lines, edge lines, and contour feature lines. The corresponding three-dimensional height is obtained by querying the unified height field for the sampling points of the terrain enhancement line, and the height offset is superimposed on the three-dimensional height to obtain the terrain enhancement layer.

[0011] Optionally, before performing layered rendering output of the ground-hugging 3D mesh layer, the linear feature layer, and the marker object layer according to preset rendering parameters, the method further includes: Based on the center curve and width of the linear feature, calculate the influence value of the linear feature on each location within the target area. The influence value is used to correct the terrain height so that corresponding landform features are formed near the linear feature, and the influence value is used to adjust the surface color so as to achieve a natural transition between the linear feature and the surrounding landform.

[0012] Optionally, the step of performing layered rendering output of the ground-hugging 3D mesh layer, the linear feature layer, and the marker object layer according to preset rendering parameters includes: The rendering order of each layer type is set as follows: the 3D terrain layer, the ground-hugging 3D mesh layer, the linear feature layer, and the marker object layer; Set a height offset for each of the aforementioned layer types, so that the layer rendered later has a preset upward offset in the height direction relative to the layer rendered earlier; The three-dimensional terrain layer, the ground-hugging three-dimensional mesh layer, and the linear feature layer are rendered sequentially in a spatial logical order from low to high. Set the transparency, color, glow intensity, and blending mode for each layer type to achieve the correct color blending effect between semi-transparent and opaque layers; Set depth test and depth write parameters for each of the layer types, adjust the depth write for the ground line layer or transparent surface layer, and / or adjust the rendering order to reduce depth conflicts, flickering and occlusion anomalies between multiple texture layers; For multiple sub-layers of the same linear feature, different widths, different transparency levels, different colors, different height offsets, and different rendering orders are set respectively, so that the outer semi-transparent layer, the main strip layer, the central highlight layer, and the edge line layer of the linear feature are superimposed and displayed layer by layer in the order from the outside to the inside and from the bottom to the top.

[0013] A second aspect of the present invention provides a three-dimensional terrain multi-layer ground-following rendering device based on a unified height field, the device comprising: A module is established to establish a three-dimensional rendering coordinate system for the target area and to establish a unified height field H(x,z). The unified height field is used to return the corresponding ground elevation value based on the input planar position (x,z). The three-dimensional terrain layer generation module is used to divide the target area into multiple terrain grid vertices. Each terrain grid vertex queries the unified height field with its planar coordinates (xi,zi) to obtain the height yi=H(xi,zi), forming a three-dimensional vertex (xi,yi,zi). Multiple three-dimensional vertices are connected to form a three-dimensional terrain grid to obtain a three-dimensional terrain layer. The three-dimensional mesh layer generation module is used to split the mesh lines in each direction of the three-dimensional terrain layer into multiple sampling points. Each sampling point queries the unified height field to obtain the corresponding height, and then superimposes the mesh offset on the height to obtain multiple three-dimensional points. The multiple three-dimensional points are connected to form ground-hugging three-dimensional mesh lines in each direction that change with the terrain undulations. The ground-hugging three-dimensional mesh lines in each direction together constitute the ground-hugging three-dimensional mesh layer. The linear feature layer generation module is used to acquire multiple anchor points of linear features, generate a center curve based on the multiple anchor points, sample multiple points along the center curve, calculate the lateral normal based on the direction of the center curve, expand to the left and right sides according to a set width to obtain left and right boundary points, query the unified height field for the left and right boundary points respectively to obtain their respective surface heights, and connect the left and right boundaries between adjacent sampling points to form a geometric patch to form a linear feature layer that conforms to the terrain. The marker object layer generation module is used to obtain the planar coordinates of the marker object, query the unified height field based on the planar coordinates to obtain the ground height, and superimpose the height offset according to the marker type of the marker object to obtain the three-dimensional ground coordinates of the marker object, thus forming the marker object layer; The output module is used to perform layered rendering output of the three-dimensional terrain layer, the ground-hugging three-dimensional mesh layer, the linear feature layer, and the marker object layer according to preset rendering parameters.

[0014] A third aspect of the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the three-dimensional terrain multi-layer ground-hugging rendering method based on a unified height field as described in the first aspect.

[0015] The fourth aspect of the present invention provides a computer-readable storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the three-dimensional terrain multi-layer ground-hugging rendering method based on a unified height field as described in the first aspect.

[0016] The embodiments of the present invention have the following beneficial effects: This invention provides a method for multi-layer ground-hugging rendering of 3D terrain based on a unified height field. The method includes: establishing a 3D rendering coordinate system for a target area and establishing a unified height field H(x,z), wherein the unified height field is used to return the corresponding ground elevation value based on the input planar position (x,z); dividing the target area into multiple terrain grid vertices, each terrain grid vertex using its planar coordinates (xi,zi) to query the unified height field to obtain the elevation yi=H(xi,zi), forming a 3D vertex (xi,yi,zi); connecting multiple 3D vertices to form a 3D terrain grid, obtaining a 3D terrain layer; splitting the grid lines in each direction of the 3D terrain layer into multiple sampling points, each sampling point querying the unified height field to obtain the corresponding elevation, and superimposing a grid offset on the elevation to obtain multiple 3D points; connecting the multiple 3D points to form a multi-layer ground-hugging 3D terrain layer that varies with terrain undulations. The system consists of a grid layer composed of ground-hugging 3D grid lines in various directions. Multiple anchor points of linear features are acquired, a center curve is generated based on these anchor points, multiple points are sampled along the center curve, a lateral normal is calculated based on the direction of the center curve, and the system expands to the left and right sides with a set width to obtain left and right boundary points. The unified height field is queried for each of the left and right boundary points to obtain their respective surface heights. The left and right boundaries between adjacent sampling points are connected to form geometric patches, creating a linear feature layer that conforms to the terrain. The planar coordinates of marked objects are acquired, the surface height is obtained by querying the unified height field based on these planar coordinates, and a height offset is superimposed based on the marked object's marker type to obtain the 3D surface coordinates of the marked object, forming a marked object layer. The 3D terrain layer, the ground-hugging 3D grid layer, the linear feature layer, and the marked object layer are rendered and output in layers according to preset rendering parameters. In this solution, all layers, including the 3D terrain layer and the 3D mesh layer, utilize a unified height field and a single height reference, reducing floating, interlacing, and misalignment. Grid lines are composed of multiple height sampling points, allowing them to follow terrain undulations and avoiding mismatches between planar grids and undulating terrain. Linear features not only have their centerlines touching the ground, but their left and right boundary points also have their height fields resampled, thus ensuring that wide strip-shaped geometric entities conform to the terrain. Marked objects determine their 3D positions based on the unified height field, allowing them to be accurately anchored to or above the ground surface, reducing positional deviations. By controlling rendering parameters such as height offset and rendering order, flickering and occlusion anomalies between ground-hugging lines, transparent surfaces, and marked objects can be reduced. Attached Figure Description

[0017] Figure 1 A flowchart illustrating the steps of a three-dimensional terrain multi-layer ground-hugging rendering method based on a unified height field, provided in an embodiment of the present invention; Figure 2 A schematic diagram of a three-dimensional terrain multi-layer ground-hugging rendering provided in an embodiment of the present invention; Figure 3 This is a structural block diagram of a three-dimensional terrain multi-layer ground-following rendering device based on a unified height field, provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present solution, and not all embodiments. Based on the embodiments of the present solution, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present solution.

[0019] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more. Furthermore, the use of "based on" or "according to" implies openness and inclusiveness, because processes, steps, calculations, or other actions "based on" or "according to" one or more of the stated conditions or values ​​may in practice be based on additional conditions or beyond the stated values.

[0020] Figure 1 The flowchart illustrates the steps of a three-dimensional terrain multi-layer ground-hugging rendering method based on a unified height field, as provided in this embodiment of the invention.

[0021] like Figure 1 As shown, the method includes: Step 101: Establish a three-dimensional rendering coordinate system for the target area and establish a unified height field H(x,z). The unified height field is used to return the corresponding ground height value based on the input planar position (x,z).

[0022] A 3D rendering coordinate system is a three-dimensional spatial reference system (X, Y, Z axes) that converts real-world geographic coordinates (latitude and longitude) into three-dimensional coordinates that computers can process.

[0023] A unified height field can be understood as a public interface for querying ground elevation. Given a planar location, the system can obtain the ground elevation at that location through this height field. For ease of description, this unified height field can be denoted as H(x,z), where x and z represent planar locations, and the return value of H(x,z) represents the elevation y at that location.

[0024] Therefore, a two-dimensional point (x,z) can be converted into a three-dimensional point (x,H(x,z),z). The focus of this application is not on limiting H(x,z) to a specific formula, but on the fact that the terrain layer, grid layer, linear feature layer, geomorphic enhancement layer, and marker layer all use the same H(x,z), and the left and right boundary points of the linear features also use this H(x,z) for height resampling.

[0025] A unified height field can originate from various sources. For example, it can be generated from DEMs, height maps, remote sensing data, manually modeled data, operational data, or procedural terrain algorithms. In some implementations, the system can also integrate factors such as base height, noise undulations, mountainous areas, gully areas, edge attenuation, and the influence of linear features to obtain the height field.

[0026] As an optional embodiment, the unified height field is pre-generated according to the following method: Step 201: Obtain the basic elevation data of the target area. The basic elevation data comes from any one or more combinations of digital elevation model (DEM), height map, remote sensing data, manual modeling data, or programmed terrain algorithm.

[0027] Step 202: Perform coordinate transformation on the basic height data to align it with the planar coordinates (x, z) of the 3D rendering coordinate system; Step 203: If the basic height data is in the form of discrete sampling points, then the height value of any planar position (x, z) within the target area is calculated by interpolation algorithm; Step 204: If the basic height data is in the form of a programmed algorithm, then calculate the height value corresponding to the planar position (x, z) in real time according to the algorithm; Step 205: The obtained height value is used as the return value of the unified height field H(x,z) at the position in the plane.

[0028] In steps 201-205, the uniform height field is pre-generated according to the following method: First, the baseline elevation data of the target area is acquired. This baseline elevation data can be derived from any one or more combinations of Digital Elevation Models (DEMs), height maps, remote sensing data, manually modeled data, or procedural terrain algorithms. Then, the acquired baseline elevation data undergoes coordinate transformation, mapping its original spatial reference frame to align with the planar coordinates (x, z) of the 3D rendering coordinate system through translation, rotation, and scaling.

[0029] After coordinate alignment, different methods are used to calculate the height value depending on the type of the base height data: If the basic height data is in the form of discrete sampling points (such as DEM raster data), the height value corresponding to any planar position (x,z) within the target area is calculated by an interpolation algorithm (including but not limited to bilinear interpolation or bicubic interpolation). If the basic height data is in the form of a programmed terrain algorithm (such as Berlin noise, fractal noise, etc.), then the height value corresponding to the planar position (x,z) is directly calculated in real time according to the algorithm.

[0030] Finally, the calculated height value is used as the return value of the unified height field H(x,z) at the plane position, so that the three-dimensional terrain layer, ground grid layer, linear feature layer and marker object layer can all obtain their respective three-dimensional heights by calling the unified height field H(x,z).

[0031] Step 102: Divide the target area into multiple terrain grid vertices. Each terrain grid vertex queries the unified height field with its planar coordinates (xi,zi) to obtain the height yi=H(xi,zi), forming a three-dimensional vertex (xi,yi,zi). Multiple three-dimensional vertices are connected to form a three-dimensional terrain grid, resulting in a three-dimensional terrain layer.

[0032] The purpose of this step is to shape a flat area into an undulating three-dimensional terrain.

[0033] Specifically, the target area is divided into multiple terrain grids, and the intersection of each grid is a terrain vertex. Each vertex has planar coordinates (xi, zi), which are fed into a unified height field H(x,z) to obtain the surface height yi of that point. Thus, each vertex transforms from two-dimensional (xi, zi) to three-dimensional (xi, yi, zi). Connecting all the vertices forms an undulating three-dimensional terrain surface.

[0034] Step 103: Divide the grid lines in each direction of the three-dimensional terrain layer into multiple sampling points. For each sampling point, query the unified height field to obtain the corresponding height, and superimpose the grid offset on the height to obtain multiple three-dimensional points. Connect the multiple three-dimensional points to form ground-hugging three-dimensional grid lines in each direction that change with the terrain undulations. The ground-hugging three-dimensional grid lines in each direction together constitute the ground-hugging three-dimensional grid layer.

[0035] The purpose of this step is to generate a mapping grid line on the three-dimensional terrain layer that can undulate with the terrain, and then attach the mapping grid line to the three-dimensional terrain.

[0036] A typical mesh is a planar object, which can easily appear to float or clip through uneven terrain. In this design, a mesh line is not a simple straight line on a plane, but is composed of multiple ground-level sampling points connected together.

[0037] The grid lines are divided into two sets: X and Z, representing horizontal and vertical directions. Each grid line in each direction is broken down into many sampling points.

[0038] For each sampling point, the ground elevation is obtained by checking the uniform elevation field, and then a small offset (such as +0.1) is added to the elevation to avoid the grid lines and terrain surface completely coinciding, which would cause rendering flicker.

[0039] Connecting these three-dimensional points creates a ground-hugging grid line that follows the contours of the terrain. The intersection of the horizontal and vertical grid lines forms a ground-hugging three-dimensional grid layer.

[0040] As an optional embodiment, the ground-hugging three-dimensional mesh lines include a first-direction mesh line extending along the Z-direction and having a fixed X-coordinate, and a second-direction mesh line extending along the X-direction and having a fixed Z-coordinate. The ground-hugging three-dimensional mesh layer, composed of the ground-hugging three-dimensional mesh lines in each direction, includes: The ground-hugging three-dimensional grid layer is formed by the ground-hugging three-dimensional grid lines in the first direction and the ground-hugging three-dimensional grid lines in the second direction.

[0041] Step 104: Obtain multiple anchor points of the linear feature, generate a center curve based on the multiple anchor points, sample multiple points along the center curve, calculate the lateral normal based on the direction of the center curve, expand to the left and right sides according to a set width to obtain the left boundary point and the right boundary point, query the unified height field for the left boundary point and the right boundary point to obtain their respective surface heights, connect the left and right boundaries between adjacent sampling points to form a geometric patch, forming a linear feature layer that conforms to the terrain.

[0042] The purpose of this step is to generate linear landforms such as rivers, roads, and paths, and to make them conform to the overall terrain to form a linear landform layer.

[0043] Linear features can be rivers, roads, paths, pipelines, boundary lines, inspection routes, or passageways.

[0044] For linear features such as rivers, roads, and paths, the system can initially receive multiple anchor points. These anchor points can come from manual configuration, business paths, trajectory data, map data, or other inputs. Anchor points can be selected as key points extending in the direction of the existing feature, such as bends in a river, which can determine the approximate direction of the existing feature. Connecting the anchor points forms a smooth curve, serving as the centerline of the linear feature.

[0045] Multiple points are sampled along the centerline. At each point, a lateral normal perpendicular to the direction of travel is calculated. This normal is then extended to the left and right sides by a predetermined width to obtain left and right boundary points. For slopes, the left and right sides may have different heights. The left and right boundary points are each independently determined by consulting a unified height field to obtain their respective ground elevations. The left and right boundaries between adjacent sampling points are connected to form a triangular or quadrilateral grid, creating a complete strip-shaped surface, thus obtaining a geometric patch.

[0046] Traditional solutions only allow the centerline to touch the ground, leaving the side edges floating or clipping through the slope. This solution resamples the height of both the left and right boundaries, so the entire strip, including the side edges, conforms to the terrain.

[0047] As an optional embodiment, the center curve of the linear feature is generated using any of the following curve forms: polyline, Bézier curve, B-spline curve, Catmull-Rom curve; the linear feature includes any one or more of the following: river, road, path, pipeline, inspection route, boundary line, passage line, and trajectory line.

[0048] In this embodiment of the invention, a polyline refers to directly connecting anchor points in sequence with straight line segments, suitable for linear features such as road boundaries and area boundaries that do not require smooth curves; a Bézier curve refers to generating a smooth curve through control points, suitable for rivers, paths, etc. that require smooth transitions; a B-spline curve is more flexible than a Bézier curve, allowing for local adjustments without affecting the overall shape, suitable for linear features with complex orientations; a Catmull-Rom curve is characterized by strictly passing through every anchor point and having a smooth curve, suitable for scenarios where it is necessary to precisely pass through specified locations (such as inspection routes that must pass through every checkpoint).

[0049] Step 105: Obtain the planar coordinates of the marked object, query the unified height field based on the planar coordinates to obtain the ground height, and superimpose the height offset according to the mark type of the marked object to obtain the three-dimensional ground coordinates of the marked object, forming a marked object layer.

[0050] The marked objects can include target points, equipment points, path nodes, positioning posts, area markers, etc. The purpose of this step is to place the marked objects, such as target points, equipment points, and positioning posts, in the correct positions on the ground.

[0051] For any marked object, the system typically knows its planar coordinates (x, z). The system calls a unified height field based on these planar coordinates to obtain the ground elevation y at that location, and then superimposes an appropriate height offset according to the marked type.

[0052] For example, dot markers can be slightly raised above the ground to avoid coinciding with the terrain surface; bar markers can extend upwards from the ground position; and equipment tags can be anchored above the corresponding ground position of the equipment point. In this way, the marked object can be stably positioned near the correct ground location.

[0053] As an optional embodiment, prior to step 106, the method further includes: Step 301: Obtain terrain enhancement lines. The terrain enhancement lines are specified by artificial anchor points or automatically extracted by analyzing the slope, curvature, gradient, or local extrema in the height field. The terrain enhancement lines include any one or more of the following: ridge lines, gully lines, slope highlight lines, edge lines, and contour feature lines. Step 302: Query the unified height field to obtain the corresponding three-dimensional height for the sampling points of the terrain enhancement line, and superimpose the height offset on the three-dimensional height to obtain the terrain enhancement layer.

[0054] In steps 301-302, the terrain enhancement layer may include ridge lines, gully lines, slope highlight lines, edge lines, contour lines, etc. The terrain enhancement lines can be specified by manual anchor points or automatically extracted by analyzing slope, curvature, gradient, or local extrema in the height field.

[0055] Regardless of how the terrain enhancement lines are obtained, a uniform height field can be applied to their sampling points during rendering to obtain the corresponding 3D height, and then an appropriate layer offset can be superimposed. In this way, the terrain enhancement lines can fit the ground surface, rather than existing as independent floating lines.

[0056] As an optional embodiment, prior to step 106, the method further includes: Step 401: Calculate the influence value of the linear feature on each location within the target area based on the center curve and width of the linear feature; Step 402: Use the influence value to correct the terrain height so that corresponding landform features are formed near the linear feature, and use the influence value to adjust the surface color so as to achieve a natural transition between the linear feature and the surrounding landform.

[0057] In steps 401-402, to establish a relationship between the linear feature and the terrain itself, this application can create an influence field for the linear feature. The influence field represents the degree to which a location within the target area is affected by the linear feature.

[0058] For example, for rivers, the influence field can be designed to have a higher value closer to the river's centerline, gradually decreasing as the distance from the centerline decreases. This influence value can be used to lower terrain elevation, creating valleys near the river; it can also be used to adjust surface color, creating a natural transition between the river area and the surrounding landforms. For roads or passageways, the influence field can also be used to create gentler road areas.

[0059] Therefore, linear features are not simply post-processed graphics superimposed on the terrain surface, but can participate in the generation of terrain height, color, and display parameters. This enhances the overall consistency between linear features and the surrounding landform.

[0060] Step 106: Perform layered rendering output on the three-dimensional terrain layer, the ground-hugging three-dimensional mesh layer, the linear feature layer, and the marker object layer according to the preset rendering parameters.

[0061] The purpose of this step is to overlay all layers onto the display interface in the correct order, avoiding obscuring, flickering, and display errors.

[0062] First, set the rendering order. Draw the terrain layer (bottom), then the mesh layer, then the linear feature layer, and finally the marker object layer (top).

[0063] Then set the height offset. Each layer is offset slightly above the ground level, so that the later rendered layer is slightly higher than the earlier rendered layer, to avoid the two surfaces completely overlapping and causing flickering.

[0064] Next, set the transparency, color, and blending mode. This will ensure that semi-transparent layers (such as the semi-transparent border of a river) blend correctly with opaque layers.

[0065] Finally, configure depth testing / depth writing. For easily flickering ground-level lines or transparent surfaces, adjust the depth writing or rendering order to reduce flickering.

[0066] This step ensures stable and clear images through precise control of rendering parameters.

[0067] As an optional embodiment, step 106 includes: Step 1061: Set the rendering order of each layer type as follows: the 3D terrain layer, the ground-hugging 3D mesh layer, the linear feature layer, and the marker object layer.

[0068] The basic principle for rendering order is: draw the bottom layer first, then build up layer by layer. Therefore, first draw the 3D terrain layer (bottom layer), then the 3D mesh layer (slightly above the terrain), then the linear feature layer (roads / rivers), and finally the marker object layer (the highest icon / label). This ensures that later layers cover earlier ones, resulting in a clear visual hierarchy.

[0069] Step 1062: Set a height offset for each of the layer types, so that the layer rendered later has a preset upward offset in the height direction relative to the layer rendered earlier.

[0070] In 3D space, if two faces are exactly at the same height, the GPU cannot accurately determine which face is in front and which is behind when performing depth testing. This results in a flickering effect where the screen shows grid lines one moment and terrain the next. The solution is to raise each layer slightly above the ground surface. Later rendered layers are higher than earlier rendered layers, shifting upwards layer by layer, ensuring that each layer has a slight difference in height. This allows the GPU to easily distinguish the front and back relationships. This approach raises each layer relative to the terrain surface by different amounts: grid layers are raised the least, linear feature layers are raised slightly more, and marker layers are raised the most.

[0071] Step 1063: Render the three-dimensional terrain layer, the ground-hugging three-dimensional grid layer, the linear feature layer, and the marker object layer in a spatial logical order from low to high.

[0072] In real 3D space, marked objects are above linear features, linear features are above grids, and grids are above terrain. Rendering according to this physical law aligns with human perception of space.

[0073] Step 1064: Set the transparency, color, glow intensity and blending mode for each layer type to create the correct color blending effect between the semi-transparent layer and the opaque layer.

[0074] In a 3D scene, there are not only solid, opaque objects (such as terrain), but also semi-transparent objects (such as the soft-light boundaries of a river, transparent grid lines, and glowing paths). This step sets the transparency (how much transparency), color (what color to display), glow intensity (whether it is self-illuminating), and blending mode (how to overlay with the background color) for each layer to make the image more realistic and beautiful.

[0075] Step 1065: Set depth test and depth write parameters for each of the layer types, adjust the depth write for the ground line layer or transparent surface layer, and / or adjust the rendering order to reduce depth conflicts, flickering and occlusion anomalies between multiple texture layers.

[0076] Depth Test: Determines whether an object is allowed to cover the current pixel. Depth Write: Determines whether an object writes its own depth value after rendering.

[0077] For ground-hugging lines (such as grid lines and terrain enhancement lines) and transparent surfaces (such as the semi-transparent edges of rivers), their heights are very close to the terrain surface, and their depth values ​​are almost the same. The GPU has difficulty determining which is in front and which is behind, resulting in flickering.

[0078] Therefore, by turning off or adjusting depth writing, some layers can be prevented from writing their own depth values, thus avoiding mutual interference; the rendering order can also be adjusted to isolate layers that are prone to flickering and render them at specific times.

[0079] Step 1066: Set different widths, different transparency, different colors, different height offsets, and different rendering orders for multiple sub-layers of the same linear feature, so that the outer semi-transparent layer, the main strip layer, the central highlight layer, and the edge line layer of the linear feature are superimposed and displayed layer by layer in the order from the outside to the inside and from the bottom to the top.

[0080] To further enhance the visual richness of the same linear feature, the system sets the width, transparency, color, height offset, and rendering order of each sublayer, thereby generating different types of sublayers, such as an outer semi-transparent layer, a main strip layer, a central highlight layer, and left and right edge line layers. During rendering, each sublayer is stacked layer by layer according to a spatial logical order from the outside in and from the bottom up.

[0081] By layering and overlaying in this way, linear features can maintain overall ground-hugging consistency while presenting a rich, three-dimensional, and visually guiding graphic representation. Furthermore, the different height offsets between each sub-layer effectively avoid depth conflicts and rendering flicker.

[0082] In this application, there is a corresponding relationship between each of the main technical means and the problem solved: Multiple layers jointly invoke a unified height field, which solves the problem of inconsistent height benchmarks among terrain layer, grid layer, linear feature layer, landform enhancement layer and marker layer.

[0083] The grid lines are generated by connecting multiple sampling points using a unified height field, thus addressing the issue of planar grids floating or clipping through undulating terrain. Linear features are obtained by extending the center curve to obtain the left and right boundary points, and then resampling the unified height field for these boundary points, thus addressing the issue of strip-shaped or linear features having only their center lines touching the ground while their boundaries do not.

[0084] Linear features influence the calculation of terrain height, color, or display parameters, thus resolving the issue of disconnect between linear features and terrain representation. Layer height offset, rendering order, transparency, and depth parameter control address issues such as flickering, occlusion anomalies, and depth conflicts between transparent layers and ground-hugging lines.

[0085] Figure 2 This is a schematic diagram of a three-dimensional terrain multi-layer ground-hugging rendering provided in an embodiment of the present invention.

[0086] like Figure 2 As shown, the bottom of the image is a 3D terrain layer, which serves as the basic undulating surface of the entire scene; above it, a ground-hugging 3D grid layer is superimposed to provide a mapping reference grid that follows the terrain undulations; above that is a linear feature layer, which is used to represent strip-shaped features such as rivers, roads, and paths and fits the entire surface; the top layer is a marker object layer, which is used to anchor target points, equipment points, positioning posts, and other marker information.

[0087] By rendering in a spatial logical order from low to high, and combining the preset height offset of each layer, the upper layer is slightly raised relative to the lower layer in the height direction. This ensures that all layers have a unified height reference in three-dimensional space and clear hierarchy. In the final rendering output, it maintains the correct visual occlusion relationship and clear readability, while avoiding flickering or misalignment problems caused by depth conflicts.

[0088] Figure 3 This is a structural block diagram of a three-dimensional terrain multi-layer ground-following rendering device based on a unified height field, provided in an embodiment of the present invention.

[0089] like Figure 3 As shown, the device 500 includes: Module 501 is used to establish a three-dimensional rendering coordinate system for the target area and to establish a unified height field H(x,z). The unified height field is used to return the corresponding ground elevation value based on the input planar position (x,z). The three-dimensional terrain layer generation module 502 is used to divide the target area into multiple terrain grid vertices. Each terrain grid vertex queries the unified height field with its planar coordinates (xi,zi) to obtain the height yi=H(xi,zi), forming a three-dimensional vertex (xi,yi,zi). Multiple three-dimensional vertices are connected to form a three-dimensional terrain grid to obtain a three-dimensional terrain layer. The three-dimensional mesh layer generation module 503 is used to split the mesh lines in each direction of the three-dimensional terrain layer into multiple sampling points. Each sampling point queries the unified height field to obtain the corresponding height, and adds a mesh offset to the height to obtain multiple three-dimensional points. The multiple three-dimensional points are connected to form ground-hugging three-dimensional mesh lines in each direction that change with the terrain undulations. The ground-hugging three-dimensional mesh lines in each direction together constitute the ground-hugging three-dimensional mesh layer. The linear feature layer generation module 504 is used to acquire multiple anchor points of linear features, generate a center curve based on the multiple anchor points, sample multiple points along the center curve, calculate the lateral normal based on the direction of the center curve, expand to the left and right sides according to a set width to obtain left and right boundary points, query the unified height field for the left and right boundary points respectively to obtain their respective surface heights, and connect the left and right boundaries between adjacent sampling points to form a geometric patch to form a linear feature layer that conforms to the terrain. The marker object layer generation module 505 is used to obtain the planar coordinates of the marker object, query the unified height field based on the planar coordinates to obtain the ground height, and superimpose the height offset according to the marker type of the marker object to obtain the three-dimensional ground coordinates of the marker object, thus forming a marker object layer; The output module 506 is used to perform layered rendering output of the three-dimensional terrain layer, the ground-hugging three-dimensional mesh layer, the linear feature layer, and the marker object layer according to preset rendering parameters.

[0090] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here. Specific Implementation Taking the display of rivers, roads, grids, and equipment points in a 3D electronic sand table as an example, the system first determines the scope of the target area and establishes a unified height field. This height field can come from DEM data or be generated by a programmed algorithm. When generating the terrain, the system divides the target area into multiple grid vertices, and each vertex queries the unified height field to form undulating terrain.

[0092] The system then generates a river layer. Based on the river anchor points, the system generates a center curve and expands it to the left and right, forming river strips. For the left and right boundary points of these river strips, the system queries a unified height field again to ensure that the river's two boundaries fall at their respective ground elevations. Road or path layers can be generated in a similar manner.

[0093] If the river strip is generated solely based on the height of the river's centerline, one edge of the river may be higher than the ground surface when it crosses a slope, while the other edge may extend into the terrain. This application resamples the height field at the left and right boundary points, thus enabling the two edges of the river strip to conform to the ground surface height at their respective locations.

[0094] The system then generates a mapping grid layer. Each grid line is broken down into multiple sampling points. Each sampling point queries a unified height field and connects them to form a three-dimensional line segment, thus allowing the grid to follow the undulations of hillsides and valleys. Finally, the device point queries the unified height field based on its two-dimensional position, falls to the corresponding position on the ground surface, and is offset upwards by a certain height as needed for display.

[0095] Through the above process, the terrain, rivers, roads, grids, and equipment points all use the same elevation reference.

[0096] This solution originates from a 3D military sand table system. The 2D plane contains not only terrain data but also operational objects such as grids, marching routes, roads / rivers, area boundaries, equipment points, target points, situation markers, and path zones. This solution uses a unified height field to convert these 2D objects into ground-hugging objects on the 3D terrain. Specifically, for linear objects with width, such as routes, roads, rivers, and passageways, not only is the height calculated for the centerline, but the heights of the left and right boundary points are also resampled, ensuring that the entire linear object conforms to the terrain.

[0097] Compared with the prior art, this application has at least the following beneficial effects: 1) Consistent height across multiple layers: The terrain layer, grid layer, linear feature layer, landform enhancement layer, and marker layer all use a unified height field and the same height reference to reduce floating, overlapping, and misalignment.

[0098] 2) The grid can fit the terrain: The grid lines are made up of multiple height sampling points, which can follow the changes in terrain undulations and avoid mismatch between the planar grid and the undulating terrain.

[0099] 3) Linear features are fully grounded: Linear features not only have their centerline grounded, but their left and right boundary points also have their height fields resampled, so the wide strip-shaped geometric whole can conform to the terrain.

[0100] 4) Linear features are associated with the terrain: Through the influence field of linear features, objects such as rivers, roads or paths can participate in the calculation of terrain height and color, making the linear features more consistent with the terrain.

[0101] 5) More accurate object positioning: The three-dimensional position of the object is determined based on a unified height field, which can accurately anchor it on or above the ground surface, reducing positional deviation.

[0102] 6) Reduce display conflicts of transparent layers: By controlling the height offset, rendering order, transparency, blending mode and depth parameters, you can reduce flickering and occlusion anomalies between ground lines, transparent surfaces and marker objects.

[0103] 7) High reusability: This application does not depend on a specific rendering engine, nor is it limited to a specific business scenario. It can be reused in a variety of 3D terrain visualization systems.

[0104] In summary, the three-dimensional terrain multi-layer ground-hugging rendering method based on a unified height field provided by this invention includes: establishing a three-dimensional rendering coordinate system for the target area and establishing a unified height field H(x,z), wherein the unified height field is used to return the corresponding ground elevation value according to the input planar position (x,z); dividing the target area into multiple terrain grid vertices, each terrain grid vertex queries the unified height field with its planar coordinates (xi,zi) to obtain the elevation yi=H(xi,zi), forming a three-dimensional vertex (xi,yi,zi), and connecting multiple three-dimensional vertices to form a three-dimensional terrain grid, thereby obtaining a three-dimensional terrain layer; splitting the grid lines in each direction of the three-dimensional terrain layer into multiple sampling points, each sampling point queries the unified height field to obtain the corresponding elevation, and superimposing a grid offset on the elevation to obtain multiple three-dimensional points, and connecting the multiple three-dimensional points to form a ground-hugging layer in each direction that varies with the terrain undulations. A three-dimensional mesh layer is formed by ground-hugging three-dimensional mesh lines in various directions. Multiple anchor points of linear features are acquired, a center curve is generated based on these anchor points, multiple points are sampled along the center curve, a lateral normal is calculated based on the direction of the center curve, and the curve is expanded to the left and right sides with a set width to obtain left and right boundary points. The surface height of each left and right boundary point is obtained by querying the unified height field. The left and right boundaries between adjacent sampling points are connected to form geometric patches, creating a linear feature layer that conforms to the terrain. The planar coordinates of marked objects are acquired, the surface height is obtained by querying the unified height field based on these planar coordinates, and a height offset is superimposed based on the mark type of the marked object to obtain the surface three-dimensional coordinates of the marked object, forming a marked object layer. The three-dimensional terrain layer, the ground-hugging three-dimensional mesh layer, the linear feature layer, and the marked object layer are rendered and output in layers according to preset rendering parameters. In this solution, all layers, including the 3D terrain layer and the 3D mesh layer, utilize a unified height field and a single height reference, reducing floating, interlacing, and misalignment. Grid lines are composed of multiple height sampling points, allowing them to follow terrain undulations and avoiding mismatches between planar grids and undulating terrain. Linear features not only have their centerlines touching the ground, but their left and right boundary points also have their height fields resampled, thus ensuring that wide strip-shaped geometric entities conform to the terrain. Marked objects determine their 3D positions based on the unified height field, allowing them to be accurately anchored to or above the ground surface, reducing positional deviations. By controlling rendering parameters such as height offset and rendering order, flickering and occlusion anomalies between ground-hugging lines, transparent surfaces, and marked objects can be reduced.

[0105] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0106] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0107] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for multi-layer ground-hugging rendering of three-dimensional terrain based on a unified height field, characterized in that, The method includes: Establish a three-dimensional rendering coordinate system for the target area and establish a unified height field H(x,z). The unified height field is used to return the corresponding ground elevation value based on the input planar position (x,z). The target area is divided into multiple terrain grid vertices. Each terrain grid vertex queries the unified height field with its planar coordinates (xi,zi) to obtain the height yi=H(xi,zi), forming a three-dimensional vertex (xi,yi,zi). Multiple three-dimensional vertices are connected to form a three-dimensional terrain grid, resulting in a three-dimensional terrain layer. The grid lines in each direction of the three-dimensional terrain layer are divided into multiple sampling points. Each sampling point queries the unified height field to obtain the corresponding height, and the grid offset is superimposed on the height to obtain multiple three-dimensional points. The multiple three-dimensional points are connected to form ground-hugging three-dimensional grid lines in each direction that change with the terrain undulations. The ground-hugging three-dimensional grid lines in each direction together constitute the ground-hugging three-dimensional grid layer. Multiple anchor points of linear features are obtained, a center curve is generated based on the multiple anchor points, multiple points are sampled along the center curve, the lateral normal is calculated based on the direction of the center curve, and the left and right boundary points are obtained by expanding to the left and right sides according to a set width. The surface height of the left and right boundary points is obtained by querying the unified height field. The left and right boundaries between adjacent sampling points are connected to form a geometric patch, forming a linear feature layer that conforms to the terrain. Obtain the planar coordinates of the marked object, query the unified height field based on the planar coordinates to obtain the ground height, and superimpose the height offset according to the mark type of the marked object to obtain the three-dimensional ground coordinates of the marked object, thus forming a marked object layer; The three-dimensional terrain layer, the ground-hugging three-dimensional mesh layer, the linear feature layer, and the marker object layer are rendered and output in layers according to preset rendering parameters.

2. The method according to claim 1, characterized in that, The unified height field is pre-generated according to the following method: Obtain basic elevation data of the target area, wherein the basic elevation data is derived from any one or more combinations of digital elevation model (DEM), height map, remote sensing data, manual modeling data, or programmed terrain algorithm; Perform coordinate transformation on the basic height data to align it with the planar coordinates (x, z) of the 3D rendering coordinate system; If the basic height data is in the form of discrete sampling points, the height value of any planar position (x, z) within the target area is calculated by interpolation algorithm; If the basic height data is in the form of a programmed algorithm, then the height value corresponding to the planar position (x, z) is calculated in real time according to the algorithm; The obtained height value is used as the return value of the unified height field H(x,z) at that plane position.

3. The method according to claim 1, characterized in that, The ground-hugging three-dimensional grid lines include a first-direction grid line extending along the Z-direction and having a fixed X-coordinate, and a second-direction grid line extending along the X-direction and having a fixed Z-coordinate. The ground-hugging three-dimensional grid lines in each direction together constitute a ground-hugging three-dimensional grid layer, including: The ground-hugging three-dimensional grid layer is formed by the ground-hugging three-dimensional grid lines in the first direction and the ground-hugging three-dimensional grid lines in the second direction.

4. The method according to claim 1, characterized in that, The center curve of the linear feature is generated using any of the following curve forms: polyline, Bézier curve, B-spline curve, or Catmull-Rom curve; the linear feature includes any one or more of the following: rivers, roads, paths, pipelines, inspection routes, boundary lines, passage lines, and trajectory lines.

5. The method according to claim 1, characterized in that, Before performing layered rendering output of the ground-hugging 3D mesh layer, the linear feature layer, and the marker object layer according to preset rendering parameters, the process also includes: Obtain terrain enhancement lines, which are specified by artificial anchor points or automatically extracted by analyzing slope, curvature, gradient, or local extrema in the height field; the terrain enhancement lines include any one or more of the following: ridge lines, gully lines, slope highlight lines, edge lines, and contour feature lines. The corresponding three-dimensional height is obtained by querying the unified height field for the sampling points of the terrain enhancement line, and the height offset is superimposed on the three-dimensional height to obtain the terrain enhancement layer.

6. The method according to claim 1, characterized in that, Before performing layered rendering output of the ground-hugging 3D mesh layer, the linear feature layer, and the marker object layer according to preset rendering parameters, the process also includes: Based on the center curve and width of the linear feature, calculate the influence value of the linear feature on each location within the target area. The influence value is used to correct the terrain height so that corresponding landform features are formed near the linear feature, and the influence value is used to adjust the surface color so as to achieve a natural transition between the linear feature and the surrounding landform.

7. The method according to claim 1, characterized in that, The step of performing layered rendering output of the ground-hugging 3D mesh layer, the linear feature layer, and the marker object layer according to preset rendering parameters includes: The rendering order of each layer type is set as follows: the 3D terrain layer, the ground-hugging 3D mesh layer, the linear feature layer, and the marker object layer; Set a height offset for each of the aforementioned layer types, so that the layer rendered later has a preset upward offset in the height direction relative to the layer rendered earlier; The three-dimensional terrain layer, the ground-hugging three-dimensional mesh layer, the linear feature layer, and the marker object layer are rendered sequentially in a spatial logical order from low to high. Set the transparency, color, glow intensity, and blending mode for each layer type to achieve the correct color blending effect between semi-transparent and opaque layers; Set depth test and depth write parameters for each of the layer types, adjust the depth write for the ground line layer or transparent surface layer, and / or adjust the rendering order to reduce depth conflicts, flickering and occlusion anomalies between multiple texture layers; For multiple sub-layers of the same linear feature, different widths, different transparency levels, different colors, different height offsets, and different rendering orders are set respectively, so that the outer semi-transparent layer, the main strip layer, the central highlight layer, and the edge line layer of the linear feature are superimposed and displayed layer by layer in the order from the outside to the inside and from the bottom to the top.

8. A three-dimensional terrain multi-layer ground-following rendering device based on a unified height field, characterized in that, The device includes: A module is established to create a 3D rendering coordinate system for the target area and to create a unified height field H(x,z). The unified height field is used to return the corresponding ground elevation value based on the input planar position (x,z). The three-dimensional terrain layer generation module is used to divide the target area into multiple terrain grid vertices. Each terrain grid vertex queries the unified height field with its planar coordinates (xi,zi) to obtain the height yi=H(xi,zi), forming a three-dimensional vertex (xi,yi,zi). Multiple three-dimensional vertices are connected to form a three-dimensional terrain grid to obtain a three-dimensional terrain layer. The three-dimensional mesh layer generation module is used to split the mesh lines in each direction of the three-dimensional terrain layer into multiple sampling points. Each sampling point queries the unified height field to obtain the corresponding height, and then superimposes the mesh offset on the height to obtain multiple three-dimensional points. The multiple three-dimensional points are connected to form ground-hugging three-dimensional mesh lines in each direction that change with the terrain undulations. The ground-hugging three-dimensional mesh lines in each direction together constitute the ground-hugging three-dimensional mesh layer. The linear feature layer generation module is used to acquire multiple anchor points of linear features, generate a center curve based on the multiple anchor points, sample multiple points along the center curve, calculate the lateral normal based on the direction of the center curve, expand to the left and right sides according to a set width to obtain left and right boundary points, query the unified height field for the left and right boundary points respectively to obtain their respective surface heights, and connect the left and right boundaries between adjacent sampling points to form a geometric patch to form a linear feature layer that conforms to the terrain. The marker object layer generation module is used to obtain the planar coordinates of the marker object, query the unified height field based on the planar coordinates to obtain the ground height, and superimpose the height offset according to the marker type of the marker object to obtain the three-dimensional ground coordinates of the marker object, thus forming the marker object layer; The output module is used to perform layered rendering output of the three-dimensional terrain layer, the ground-hugging three-dimensional mesh layer, the linear feature layer, and the marker object layer according to preset rendering parameters.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the three-dimensional terrain multi-layer ground-hugging rendering method based on a unified height field as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the three-dimensional terrain multi-layer ground-hugging rendering method based on a unified height field as described in any one of claims 1-7.