Coastline and ocean transition method and system in simulation scene

By inserting smooth data points at the junction of the coastline and the ocean and blending them, the problem of unnatural transitions in the coastline terrain is solved, and the visual realism and detail of the 3D terrain are improved.

CN119006272APending Publication Date: 2024-11-22XIAN LINGKONG ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411085034.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

When constructing virtual 3D terrain, the transition between the coastline and the ocean is often awkward and unnatural, affecting the visual experience and realism of the 3D terrain.

Method used

An interpolation algorithm is used to insert N smooth data points between two adjacent coastline topographic vertex data, and a quadratic Bézier curve interpolation algorithm is used to form a coastline topographic curve. At the same time, the coastline topographic vertex data and the seabed topographic vertex data are fused and transitioned to generate a smooth coastline and ocean transition.

Benefits of technology

It achieves a natural and smooth transition between the coastline and the ocean topography, enhances the visual realism and detail of the 3D terrain simulation model, and improves the realism and visual experience of the simulation scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006272A_ABST
    Figure CN119006272A_ABST
Patent Text Reader

Abstract

The invention provides a coastline and ocean transition method and system in a simulation scene, and belongs to the technical field of simulation, and the method comprises the steps: obtaining coastline terrain vertex data; inserting N smooth data points between two adjacent coastline terrain vertex data by using an interpolation algorithm to form a coastline terrain curve; performing fusion transition on the coastline terrain vertex data and the submarine topography vertex data to generate the altitude of the submarine topography vertex; and combining the coastline topographic curve with the altitude of the vertex of the submarine topography to finish the transition between the coastline and the ocean. According to the method, the N smooth data points are inserted between the two adjacent coastline terrain vertex data by using the interpolation algorithm, so that smooth transition can be performed between the two adjacent coastline terrain vertex data, and meanwhile, fusion transition is performed on the coastline terrain and the submarine terrain, so that the generated coastline terrain curve is smoother, and the accuracy of the coastline terrain curve is improved. And hard and unnatural transition effects are eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of simulation technology, and relates to a simulation scene construction technology, and specifically to a method and system for transition between a coastline and an ocean in a simulation scene. Background Art

[0002] With the development of science and technology, virtual simulation technology has penetrated into various fields. It has the advantages of good controllability, strong safety, non-destructiveness, and no influence from climate, space, or site. It plays an increasingly important role in various fields.

[0003] When developing large-scale virtual simulation software, it is usually necessary to construct a large-scale virtual three-dimensional terrain based on elevation data, and the virtual three-dimensional terrain can better display the visual effect of the real terrain. For example, the Chinese patent document with application number CN200910235974.7 discloses an expandable general three-dimensional landscape simulation system, including a three-dimensional terrain construction module, a mapping module, a texture module and a cache module, and the mapping module and the texture module are respectively connected to the three-dimensional terrain construction module and the cache module data; the three-dimensional terrain construction module requests and receives the elevation data from the mapping module and the texture data from the texture module, constructs the three-dimensional terrain, and outputs the drawing information to the drawer; the mapping module receives the elevation data request, the camera information input and the user control information input, and maps the elevation data; the texture module provides texture data; the cache module requests data from the data source and caches part of the data. It can be seen that in virtual simulation, the virtual three-dimensional terrain construction technology is becoming more and more mature. However, in the process of constructing virtual three-dimensional terrain, when it comes to the coastline terrain where the land and the sea meet, due to the significant height difference between the land and the sea, there are often abrupt and unnatural technical problems in the transition between the coastline terrain and the sea, which seriously affects the visual experience of the three-dimensional terrain and has a negative effect on the realism of the virtual simulation scene. Summary of the invention

[0004] In view of the technical problem described in the above background technology, when constructing the coastline terrain where the land and the sea meet, due to the significant height difference between the land and the sea, there is a stiff and unnatural transition between the coastline terrain and the sea. To address this technical problem, the present invention proposes a method and system for the transition between the coastline and the sea in a simulation scene.

[0005] The present invention utilizes an interpolation algorithm to insert N smooth data points between two adjacent coastline terrain vertex data, so that a smooth transition can be performed between the two adjacent coastline terrain vertex data, and at the same time, the coastline terrain and the seabed terrain are integrated and transitioned, so that the generated coastline terrain curve is smoother, the abrupt and unnatural transition effect is eliminated, and a natural and smooth transition between the coastline terrain and the ocean terrain is achieved, which significantly improves the visual realism and detail expression of the three-dimensional terrain simulation model.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0007] The present invention provides a method for simulating the transition between a coastline and an ocean in a scene, comprising the following steps:

[0008] Get the coastline terrain vertex data;

[0009] Using the interpolation algorithm, N smooth data points are inserted between two adjacent coastline terrain vertex data to form a coastline terrain curve;

[0010] Merge and transition the vertex data of the coastline terrain with the vertex data of the seabed terrain to generate the altitude of the seabed terrain vertex;

[0011] Merge the coastline terrain curve with the altitude of the seabed terrain vertex to complete the transition between the coastline and the ocean.

[0012] It is further defined that the acquisition of coastline terrain vertex data specifically includes:

[0013] Get all vertex data of the three-dimensional terrain;

[0014] Set the altitude range of the coastline terrain vertex data to [-δ,δ];

[0015] Traverse all vertex data of the three-dimensional terrain, and take the vertex data corresponding to the altitude range of [-δ,δ] as the coastline terrain vertex data.

[0016] It is further defined that the method of using an interpolation algorithm to insert N smooth data points between two adjacent coastline terrain vertex data to form a coastline terrain curve specifically includes:

[0017] Using the quadratic Bezier curve interpolation algorithm, N smooth data points are inserted between the vertex data of two adjacent coastline terrains;

[0018] The smooth data points are substituted into the smooth transition function, and the smooth data points are smoothly connected by the smooth transition factor in the smooth transition function to form a coastline terrain curve.

[0019] It is further defined that the fusion and transition of the coastline terrain vertex data and the seabed terrain vertex data to generate the altitude of the seabed terrain vertex specifically includes:

[0020] Acquire the elevation data of the seabed topography, and determine the vertex data of the seabed topography according to the elevation data of the seabed topography;

[0021] Determine the index difference between the seabed terrain vertex data and the coastline terrain vertex data;

[0022] The altitude of the seafloor topography vertex is calculated based on the index difference and the altitude attenuation coefficient.

[0023] It is further defined that the calculation of the altitude of the seabed terrain vertex based on the index difference and the altitude attenuation coefficient specifically includes: performing linear attenuation processing on the seabed terrain vertex according to the index difference and the altitude attenuation coefficient, and calculating the altitude of the seabed terrain vertex based on the seabed terrain vertex after the linear attenuation processing.

[0024] It is further defined that the method for transitioning between the coastline and the ocean in the simulation scene also includes:

[0025] Generate marine resources including land, coastline and seabed according to the combined coastline topographic curve and the altitude of the seabed topography vertex;

[0026] Render the ocean resources to generate translucent ocean resources.

[0027] It is further defined that the coastline terrain vertex data includes the index value, longitude and latitude and altitude of the vertex.

[0028] The present invention provides a system for simulating the transition between coastline and ocean in a scene, comprising:

[0029] Vertex data acquisition module: used to obtain coastline terrain vertex data;

[0030] Smooth transition module: used to use interpolation algorithm to insert N smooth data points between two adjacent coastline terrain vertex data to form a coastline terrain curve;

[0031] Fusion transition module: used to fuse and transition the coastline terrain vertex data with the seabed terrain vertex data to generate the altitude of the seabed terrain vertex;

[0032] And the merge transition module: used to merge the coastline terrain curve with the altitude of the seabed terrain vertex to complete the transition between the coastline and the ocean.

[0033] The present invention provides a storage medium storing a program file, wherein the program file is executed to implement the method for transition between coastline and ocean in the above-mentioned simulation scene.

[0034] The present invention provides an electronic device, comprising a processor and a memory coupled to each other, wherein:

[0035] The memory is used to store the method for realizing the transition between the coastline and the ocean in the above-mentioned simulation scene;

[0036] The processor is used to execute program instructions stored in the memory.

[0037] Compared with the prior art, the beneficial effects of the present invention are:

[0038] 1. The method for transitioning the coastline and the ocean in a simulation scene of the present invention uses an interpolation algorithm to insert N smooth data points between two adjacent coastline terrain vertex data, so that a smooth transition can be performed between the two adjacent coastline terrain vertex data, and at the same time, the coastline terrain and the seabed terrain are fused and transitioned, so that the generated coastline terrain curve is smoother, the abrupt and unnatural transition effect is eliminated, and a natural and smooth transition between the coastline terrain and the ocean terrain is achieved, which significantly improves the visual realism and detail expression of the three-dimensional terrain simulation model, thereby improving the visual experience of the three-dimensional terrain in the simulation scene and the realism of the simulation scene.

[0039] 2. The method of transitioning the coastline and the ocean in the simulation scene of the present invention fuses the coastline terrain vertex data with the seabed terrain vertex data, and merges the coastline terrain curve with the altitude of the seabed terrain vertex, thereby improving the natural transition effect between the coastline and the ocean, and then improving the visual expression effect of the coastline terrain.

[0040] 3. The method for transitioning the coastline and the ocean in the simulation scene of the present invention renders the ocean resources to generate translucent ocean resources. The translucent ocean resources can better reflect the natural transition effect between the coastline and the deep sea, further enhancing the visual experience of the three-dimensional terrain in the simulation scene and the realism of the simulation scene. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of a method for transitioning between a coastline and an ocean in a simulation scene of the present invention;

[0042] Figure 2 A schematic diagram of a system for transition between a coastline and an ocean in a simulation scenario of the present invention;

[0043] Figure 3 The coastline terrain is not processed by the method for transition between the coastline and the ocean in the simulation scene of the present invention;

[0044] Figure 4 The coastline terrain is processed using the method of the present invention for simulating the transition between the coastline and the ocean in a scene. DETAILED DESCRIPTION

[0045] The technical solution of the present invention is further explained below in conjunction with the accompanying drawings and embodiments, but the present invention is not limited to the implementation modes described below.

[0046] See also Figure 1 The present invention provides a method for simulating the transition between coastline and ocean in a scene, comprising the following steps:

[0047] S1: Obtain coastline terrain vertex data and generate a vertex data set; wherein obtaining coastline terrain vertex data specifically includes: obtaining all vertex data of three-dimensional terrain; setting the altitude range of coastline terrain vertex data to [-δ,δ]; traversing all vertex data of three-dimensional terrain, taking vertex data corresponding to the altitude range of [-δ,δ] as coastline terrain vertex data, the δ value can be 0.5, 1, 1.5 or 2, etc., and the user can adjust it according to actual conditions; preferably, the δ value is 1.

[0048] S2: Using the interpolation algorithm, insert N smooth data points between two adjacent coastline terrain vertex data to form a coastline terrain curve. Specifically, it includes: using the quadratic Bezier curve interpolation algorithm, inserting N smooth data points between two adjacent coastline terrain vertex data; substituting the smooth data points into the smooth transition function, and connecting the smooth data points through the smooth transition factor in the smooth transition function to form a coastline terrain curve. The smooth transition function is:

[0049] B=((1-t) 2 *P0+2t*(1-t)*P1+t 2 *P2)*F

[0050] Wherein, B is the smooth curve formed by two adjacent coastline terrain vertices; t is the parameter value, which ranges from 0 to 1, and the specific value is known in the art; P0 and P2 are two adjacent coastline terrain vertices; F is the smooth transition factor; P1 is the control point of the smooth curve, which affects the shape of the smooth curve, that is, by adjusting the position of P1, the curvature and direction of the smooth curve can be changed.

[0051] When t=0, B=P0, which is the starting point of the smooth curve; when t=1, B=P2, which is the end point of the smooth curve; when t changes between 0 and 1, B will smoothly transition between P0 and P2, and will be affected by the control point P1 of the smooth curve. t starts from 0 and increases by 1 / N in sequence. After being substituted into the quadratic Bezier curve interpolation algorithm, N smooth data points are obtained and filled between the vertex data of two adjacent coastline terrains. According to the smoothness, curvature and parameter value of the required smooth curve, the values ​​of F, P1 and N can be dynamically set to calculate the coordinates and height of each smooth data point. Make the coastline terrain curve smoother, eliminate the stiff and unnatural transition effect, and ensure that the generated coastline terrain is smooth and diverse without being too complex.

[0052] S3: Fusing the coastline terrain vertex data with the seabed terrain vertex data to generate the altitude of the seabed terrain vertex; specifically, this step includes: obtaining the elevation data of the seabed terrain, and determining the seabed terrain vertex data based on the elevation data of the seabed terrain; determining the index difference between the seabed terrain vertex data and the coastline terrain vertex data; and calculating the altitude of the seabed terrain vertex based on the index difference and the altitude attenuation coefficient.

[0053] The altitude attenuation coefficient is determined according to different types of coastlines. For example, steep cliffs require a larger altitude attenuation coefficient to increase the rate of change of the transition between the coastline terrain and the seabed terrain. Generally, the altitude attenuation coefficient corresponding to a steep cliff is 1. A gentle beach requires a smaller altitude attenuation coefficient to reduce the rate of change of the transition between the coastline terrain and the seabed terrain. Generally, the altitude attenuation coefficient corresponding to a gentle beach is 0.1.

[0054] The altitude attenuation coefficient provides a quantitative method to determine the rate at which the altitude gradually decays when transitioning from the coastline terrain to the seabed terrain. In the process of integrating the coastline terrain with the seabed terrain, in order to avoid sudden changes in altitude, a smooth transition method is required. The altitude attenuation coefficient achieves this smooth transition method by adjusting the rate of change of altitude, making the coastline terrain look more natural and realistic.

[0055] Preferably, calculating the altitude of the seabed terrain vertices according to the index difference and the altitude attenuation coefficient specifically includes: performing linear attenuation processing on the seabed terrain vertices according to the index difference and the altitude attenuation coefficient, and calculating the altitude of the seabed terrain vertices according to the seabed terrain vertices after the linear attenuation processing.

[0056] The specific method for obtaining the elevation data of the seabed terrain is as follows:

[0057] a) Set the data range (M) corresponding to the two adjacent seabed terrain vertex data to be obtained to 2;

[0058] b) Set the maximum seafloor topography altitude (Mh) to -1;

[0059] c) looping and iterating the following process to obtain M seabed terrain vertex data adjacent to each coastline terrain vertex data;

[0060] Set Ax and Ay to represent the index values ​​of coastline vertex data respectively; find the adjacent seabed terrain vertex data by increasing or decreasing the index value of coastline terrain vertex data, the index values ​​of horizontally adjacent seabed terrain vertex data are: (Ax-1, Ay), (Ax-2, Ay), (Ax+1, Ay), (Ax+2, Ay); the index values ​​of vertically adjacent seabed terrain vertex data are: (Ax, Ay-1), (Ax, Ay-2), (Ax, Ay+1), (Ax, Ay+2); determine whether the altitude of the adjacent seabed terrain vertex is less than Mh. If it is less than Mh, determine that the point is a seabed terrain vertex; otherwise, discard the point.

[0061] The fusion transition of the coastline terrain vertex data and the seabed terrain vertex data specifically includes:

[0062] a) Set Dx and Dy to represent the index difference between each seabed terrain vertex and the corresponding coastline terrain vertex in the horizontal and vertical directions;

[0063] b) Determine the altitude Dh of the topography of the seabed according to the following formula, in meters;

[0064] Dh=Ah-(Dx*R+Dy*R)

[0065] Where R is the altitude attenuation coefficient, unit: m; Ah is the altitude of the coastline terrain vertex corresponding to the seabed terrain vertex, unit: m.

[0066] S4: Merge the coastline terrain curve with the altitude of the seabed terrain vertex to complete the transition between the coastline and the ocean, and enhance the visual performance of the coastline terrain.

[0067] Preferably, the method for transitioning between coastline and ocean in a simulation scene of the present invention further comprises:

[0068] Generate marine resources including land, coastline and seabed according to the combined coastline topographic curve and the altitude of the seabed topography vertex;

[0069] Render the ocean resources to generate translucent ocean resources.

[0070] Among them, rendering is done through Alpha blending rendering technology or depth sorting rendering technology. Through rendering, the ocean resources are set to a translucent effect to show the natural transition between the coastline and the deep sea.

[0071] Preferably, the coastline terrain vertex data of the present invention includes the index value, longitude and latitude and altitude of the vertex.

[0072] pass Figure 3 and Figure 4 The coastline and ocean transition portion processed by the method for transitioning the coastline and the ocean in the simulation scene of the present invention is smoother and more natural, which improves the visual realism and detail expression of the three-dimensional terrain simulation model, thereby improving the visual experience of the three-dimensional terrain in the simulation scene and the realism of the simulation scene.

[0073] See also Figure 2 The present invention provides a system for simulating the transition between coastline and ocean in a scene, comprising:

[0074] Vertex data acquisition module: used to obtain coastline terrain vertex data;

[0075] Smooth transition module: used to use interpolation algorithm to insert N smooth data points between two adjacent coastline terrain vertex data to form a coastline terrain curve;

[0076] Fusion transition module: used to fuse and transition the coastline terrain vertex data with the seabed terrain vertex data to generate the altitude of the seabed terrain vertex;

[0077] And the merge transition module: used to merge the coastline terrain curve with the altitude of the seabed terrain vertex to complete the transition between the coastline and the ocean.

[0078] The system for transitioning the coastline and the ocean in a simulation scene of the present invention corresponds to the method for transitioning the coastline and the ocean in a simulation scene. For details of the vertex data acquisition module, the smooth transition module, the fusion transition module and the merged transition module, please refer to the description of the method for transitioning the coastline and the ocean in a simulation scene.

[0079] The present invention provides a storage medium storing a program file, wherein the program file is executed to implement the method for transition between the coastline and the ocean in the above-mentioned simulation scene.

[0080] The storage medium in the present invention may specifically include random access memory (RAM), internal memory, read-only memory (ROM), programmable ROM, erasable programmable ROM, register, hard disk, removable disk or CD-ROM. It should be noted that those skilled in the art may specifically select the form and type of storage medium according to actual use requirements, and the present invention does not make further specific limitations.

[0081] The present invention discloses an electronic device, comprising a processor and a memory coupled to each other, wherein the memory is used to store a method for realizing the transition between the coastline and the ocean in the above-mentioned simulation scene; and the processor is used to execute program instructions stored in the memory.

[0082] The electronic device in the present invention includes any electronic device that can execute program instructions, such as a computer, a mobile terminal or a wearable device.

[0083] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the present invention. Although the present invention is described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or part or all of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the present invention.

Claims

1. A method for transitioning between coastline and ocean in a simulation scene, characterized in that: The following steps are involved: Get the coastline terrain vertex data; Using the interpolation algorithm, N smooth data points are inserted between two adjacent coastline terrain vertex data to form a coastline terrain curve; Merge and transition the vertex data of the coastline terrain with the vertex data of the seabed terrain to generate the altitude of the seabed terrain vertex; Merge the coastline terrain curve with the altitude of the seabed terrain vertex to complete the transition between the coastline and the ocean.

2. The method for transitioning between coastline and ocean in a simulation scene according to claim 1, characterized in that: The acquisition of coastline terrain vertex data specifically includes: Get all vertex data of the three-dimensional terrain; Set the altitude range of the coastline terrain vertex data to [-δ,δ]; Traverse all vertex data of the three-dimensional terrain, and take the vertex data corresponding to the altitude range of [-δ,δ] as the coastline terrain vertex data.

3. The method for transitioning between coastline and ocean in a simulation scene according to claim 1, characterized in that: The method of using an interpolation algorithm to insert N smooth data points between two adjacent coastline terrain vertex data to form a coastline terrain curve specifically includes: Using the quadratic Bezier curve interpolation algorithm, N smooth data points are inserted between the vertex data of two adjacent coastline terrains; The smooth data points are substituted into the smooth transition function, and the smooth data points are smoothly connected by the smooth transition factor in the smooth transition function to form a coastline terrain curve.

4. The method for transitioning between coastline and ocean in a simulation scene according to claim 1, characterized in that: The step of fusing and transitioning the coastline terrain vertex data with the seabed terrain vertex data to generate the altitude of the seabed terrain vertex specifically includes: Acquire the elevation data of the seabed topography, and determine the vertex data of the seabed topography according to the elevation data of the seabed topography; Determine the index difference between the seabed terrain vertex data and the coastline terrain vertex data; The altitude of the seafloor topography vertex is calculated based on the index difference and the altitude attenuation coefficient.

5. The method for transition between coastline and ocean in a simulation scene according to claim 4, characterized in that: The method of calculating the altitude of the seabed terrain vertex according to the index difference and the altitude attenuation coefficient specifically includes: performing linear attenuation processing on the seabed terrain vertex according to the index difference and the altitude attenuation coefficient, and calculating the altitude of the seabed terrain vertex according to the seabed terrain vertex after the linear attenuation processing.

6. The method for transition between coastline and ocean in a simulation scene according to any one of claims 1 to 5, characterized in that: The method for transitioning the coastline and the ocean in the simulation scene also includes: Generate marine resources including land, coastline and seabed according to the combined coastline topographic curve and the altitude of the seabed topography vertex; Render the ocean resources to generate translucent ocean resources.

7. The method for transitioning between coastline and ocean in a simulation scene according to claim 1, characterized in that: The coastline terrain vertex data includes the index value, longitude and latitude and altitude of the vertex.

8. A system for simulating the transition between coastline and ocean in a scene, characterized in that: include: Vertex data acquisition module: used to obtain coastline terrain vertex data; Smooth transition module: used to use interpolation algorithm to insert N smooth data points between two adjacent coastline terrain vertex data to form a coastline terrain curve; Fusion transition module: used to fuse and transition the coastline terrain vertex data with the seabed terrain vertex data to generate the altitude of the seabed terrain vertex; And the merge transition module: used to merge the coastline terrain curve with the altitude of the seabed terrain vertex to complete the transition between the coastline and the ocean.

9. A storage medium, characterized in that: A program file is stored, and the program file is executed to implement the method for transition between coastline and ocean in a simulation scene as described in any one of claims 1-7.

10. An electronic device, characterized in that: The invention comprises a processor and a memory coupled to each other, wherein: The memory is used to store the method for implementing the transition between the coastline and the ocean in the simulation scene according to any one of claims 1 to 7; The processor is used to execute program instructions stored in the memory.