Regional fusion method and apparatus
Patent Information
- Application Number
- CN202311271589.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-09-27
AI Technical Summary
[0003]比如,在游戏领域,游戏动画场景制作过程中,一般会涉及到场景中各区域内地形的制作,对于区域内地形的制作通常由人工手动设计区域地形和地貌,即使已知区域的地形,也需要由人工手动进行仿照复刻,在需要制作的区域内地形较多的情况下,人工制作区域内地形的方法耗费大量时间与人工成本,导致制作区域内地形生成游戏动画场景的效率较低,因此,亟需一种提高区域内地形制作效率的方法
[0017]本申请提供的区域融合方法,获取目标区域的目标地形和待融合区域的基础地形;按照融合策略确定目标地形和基础地形的融合数据;根据融合数据,将目标区域的目标地形融合至待融合区域,生成待融合区域的融合地形,其中,融合地形用于指示目标地形和基础地形的融合情况;在当前融合情况不符合约束条件的情况下,调整融合策略,重新生成融合地形,直至符合约束条件输出区域融合参数,其中,区域融合参数为目标区域和待融合区域的融合参数,区域融合参数包括融合策略和/或融合地形。
Smart Images

Figure CN117315095B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a method for regional fusion. This application also relates to a regional fusion apparatus, a computing device, and a computer-readable storage medium. Background Technology
[0002] In animation production, the creation of animation generally involves the creation of terrain in various areas within the animation and the placement of objects within those areas. This process typically involves manually designing the terrain and placing objects within those areas to generate the animation. When there are many areas in the animation, manually creating these areas to generate the animation is inefficient.
[0003] For example, in the game industry, the production of game animation scenes usually involves the creation of terrain in various areas of the scene. The creation of terrain in an area is usually done manually by designing the terrain and landforms. Even if the terrain of a known area is known, it still needs to be manually copied. When there are many areas of terrain to be created, the method of manually creating the terrain in an area consumes a lot of time and labor costs, resulting in low efficiency in creating game animation scenes from the terrain in an area. Therefore, there is an urgent need for a method to improve the efficiency of terrain creation in an area. Summary of the Invention
[0004] In view of this, embodiments of this application provide a region fusion method. This application also relates to a region fusion apparatus, a computing device, and a computer-readable storage medium, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this application, a region fusion method is provided, comprising:
[0006] Obtain the target terrain of the target area and the basic terrain of the area to be merged;
[0007] The fused data of the target terrain and the base terrain are determined according to the fusion strategy;
[0008] Based on the fusion data, the target terrain of the target area is fused to the area to be fused to generate the fused terrain of the area to be fused, wherein the fused terrain is used to indicate the fusion status of the target terrain and the base terrain;
[0009] If the current fusion situation does not meet the constraints, the fusion strategy is adjusted, the fusion terrain is regenerated, and the fusion parameters are output until the constraints are met. The fusion parameters are the fusion parameters of the target region and the region to be fused, and the fusion parameters include the fusion strategy and / or the fusion terrain.
[0010] According to a second aspect of the embodiments of this application, a region fusion apparatus is provided, comprising:
[0011] The acquisition module is configured to acquire the target terrain of the target area and the basic terrain of the area to be merged.
[0012] The determination module is configured to determine the fused data of the target terrain and the base terrain according to the fusion strategy;
[0013] The fusion module is configured to fuse the target terrain of the target area to the area to be fused based on the fusion data, thereby generating the fused terrain of the area to be fused, wherein the fused terrain is used to indicate the fusion status of the target terrain and the base terrain;
[0014] The output module is configured to adjust the fusion strategy and regenerate the fused terrain when the current fusion situation does not meet the constraints, until the constraints are met and the region fusion parameters are output. The region fusion parameters are the fusion parameters of the target region and the region to be fused, and the region fusion parameters include the fusion strategy and / or the fused terrain.
[0015] According to a third aspect of the present application, a computing device is provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor executes the computer instructions to implement the steps of the region fusion method.
[0016] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided that stores computer instructions which, when executed by a processor, implement the steps of the region fusion method.
[0017] The regional fusion method provided in this application acquires the target terrain of a target area and the basic terrain of the area to be fused; determines the fusion data of the target terrain and the basic terrain according to a fusion strategy; based on the fusion data, merges the target terrain of the target area into the area to be fused to generate the fused terrain of the area to be fused, wherein the fused terrain is used to indicate the fusion status of the target terrain and the basic terrain; if the current fusion status does not meet the constraints, adjusts the fusion strategy, regenerates the fused terrain, until the constraints are met, and outputs the regional fusion parameters, wherein the regional fusion parameters are the fusion parameters of the target area and the area to be fused, and the regional fusion parameters include the fusion strategy and / or the fused terrain.
[0018] One embodiment of this application determines the fusion data of the target terrain and the base terrain through a fusion strategy, and merges the target terrain and the base terrain according to the fusion data to generate the fused terrain of the area to be merged, thereby realizing automated terrain fusion and improving the efficiency of generating fused terrain in the area to be merged. The fused terrain is used to indicate the fusion status of the target terrain and the base terrain. The fusion status is judged based on the fused terrain. If the fusion status meets the constraints, the area fusion parameters are output. This allows the fusion status to be determined in advance after the fused terrain is obtained, avoiding the waste of computing power to re-execute terrain fusion and all other functions if the fusion status does not meet the constraints after the fused terrain and all other functions have been executed. Attached Figure Description
[0019] Figure 1 This is a flowchart of a region fusion method provided in an embodiment of this application;
[0020] Figure 2a This is a flowchart illustrating a region blending method applied to a game animation scene, provided in one embodiment of this application.
[0021] Figure 2b This is a schematic diagram of the terrain in a single scene in a region fusion method provided in an embodiment of this application;
[0022] Figure 2c This is a schematic diagram of the large-world terrain in a region fusion method provided in an embodiment of this application;
[0023] Figure 2d This is a schematic diagram of terrain fusion in a region fusion method provided in an embodiment of this application;
[0024] Figure 2e This is a schematic diagram of the batch replacement of base points in a region fusion method provided in an embodiment of this application;
[0025] Figure 2f This is a schematic diagram of the final fused terrain in a region fusion method provided in an embodiment of this application;
[0026] Figure 3 This is a flowchart illustrating the generation of fusion points in a regional fusion method according to an embodiment of this application;
[0027] Figure 4 This is a schematic diagram of the structure of a region fusion device provided in an embodiment of this application;
[0028] Figure 5 This is a structural block diagram of a computing device provided in one embodiment of this application. Detailed Implementation
[0029] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0030] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this application refers to and includes any or all possible combinations of one or more associated listed items.
[0031] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0032] In animation production, the creation of animation generally involves the creation of terrain in various areas within the animation and the placement of objects within those areas. This process typically involves manually designing the terrain and placing objects within those areas to generate the animation. When there are many areas in the animation, manually creating these areas to generate the animation is inefficient.
[0033] For example, in the game industry, the creation of strongholds in game animation scene production generally involves stronghold terrain and objects within the stronghold. A stronghold refers to a specific area within an animation scene. For large-scale strongholds, artists typically design the stronghold terrain manually on the planned area's basic terrain, and then manually place the objects and lighting within the stronghold. However, if you want to replicate an existing stronghold from a scene onto the large-scale scene, you also have to manually create the terrain on the large-scale scene where you want to replicate the stronghold, and then manually place the objects from that scene's stronghold. This is manageable for a small number of strongholds, but for large-scale strongholds, the terrain is vast, and the number of strongholds is numerous. This manual method of creating strongholds is extremely time-consuming and labor-intensive, and may not even achieve the desired replication of the original stronghold.
[0034] Furthermore, when using automated methods to replicate a stronghold in a scene into the open world terrain through fusion, if terrain fusion is performed directly, and rivers, cliffs, lakes, vegetation, etc. are constructed within the stronghold, the terrain fusion effect is found to be poor. Therefore, it is necessary to re-execute the terrain fusion and the subsequent construction of a series of contents, which leads to a huge consumption of computing power and also results in low efficiency of terrain fusion in the region. Therefore, there is an urgent need for a method to improve the efficiency of generating terrain in the region.
[0035] This application provides a region fusion method, and also relates to a region fusion apparatus, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.
[0036] Figure 1 The flowchart of a region fusion method according to an embodiment of this application is shown, which specifically includes the following steps:
[0037] Step 102: Obtain the target terrain of the target area and the basic terrain of the area to be merged.
[0038] The region fusion method provided in this application is generally executed by the server. However, in other embodiments of this application, the client may also have similar functions to the server, thereby executing the region fusion method provided in this application. In other embodiments, the region fusion method provided in this application can also be executed jointly by the client and the server. In practical applications, the client and / or the server include applications with region fusion functionality. The following description uses the server executing the region fusion method provided in this application as an example.
[0039] When there is a need for regional fusion, the server will obtain the target terrain of the target area and the basic terrain of the area to be merged, so as to merge the target terrain and the basic terrain.
[0040] Specifically, the target area refers to the area that provides pre-blended terrain. For example, to blend the terrain of a specific outpost area within a single scene into a specific area of the open world, the outpost area is used as the target area. Target terrain refers to the terrain corresponding to the target area; for example, the terrain within the outpost area is the target terrain. The area to be blended refers to the area where the target terrain needs to be blended. For example, to blend the terrain of a specific outpost area within a single scene into a specific area of the open world, the specific area of the open world is used as the area to be blended. Basic terrain refers to the terrain corresponding to the area to be blended; for example, the terrain within a specific area of the open world is the basic terrain.
[0041] Optionally, one or more embodiments of this application are applied to a computing engine.
[0042] There are various ways to obtain the target terrain of the target area and the basic terrain of the area to be merged. The specific method should be determined according to the actual situation. This application does not limit the specific method.
[0043] In one possible implementation of this application, obtaining the target terrain of the target area and the basic terrain of the area to be merged can be achieved by receiving a request for area merging, obtaining the file corresponding to the file identifier based on the file identifier carried in the request, and obtaining the target area, the area to be merged, and the basic terrain of the target area and the area to be merged from the file.
[0044] The file generation process is as follows: the server receives a region selection request for the first scene screen, determines the target region from the first scene screen, determines the region to be merged from the second scene screen based on the target region, and stores the target region, the region to be merged, and the target terrain and basic terrain corresponding to the target region and the region to be merged into the corresponding file. The file is then exported as a file in a specified format. The first scene screen is the scene screen that provides the merged terrain, and the second scene screen is the scene screen that provides the merged region.
[0045] In another possible implementation of this application, obtaining the target terrain of the target area and the basic terrain of the area to be merged can be achieved by obtaining the target area and the area to be merged, and then searching from a database storing terrain based on the target area and the area to be merged to obtain the target terrain of the target area and the basic terrain of the area to be merged.
[0046] The implementation of obtaining the target area and the area to be merged can be as follows: receive a region selection request for the first scene image, determine the target area from the first scene image, and determine the area to be merged from the second scene image based on the target area.
[0047] Optionally, after obtaining the target terrain of the target area and the basic terrain of the area to be merged, the mask value of the target terrain and the basic terrain is set to 1, where setting the mask to 1 indicates that the set terrain is judged and processed.
[0048] In one optional embodiment of this application, before obtaining the target terrain of the target area and the basic terrain of the area to be merged in the above steps, the following steps are further included:
[0049] Receive a region selection request for a first scene screen, and determine a target region in the first scene screen based on the region selection request, wherein the first scene screen is a scene screen that provides blended terrain;
[0050] Based on the region parameters of the target region, the corresponding region to be merged is determined at a specified location in the second scene screen. The second scene screen is the scene screen that provides the merging region, and the specified location is a pre-set location for terrain merging.
[0051] Specifically, a region selection request refers to a request to select a region to be merged. The form of a region selection request can be either a first scene image of the defined region submitted by the user on the front end, or location data of the corresponding location of the selected region.
[0052] The method for determining the target region in the first scene based on the region selection request can be to parse the region selection request, obtain at least one location point corresponding to the region, and determine the target region from the first scene based on at least one location point.
[0053] The method of determining the corresponding region to be merged at a specified location in the second scene based on the region parameters of the target region can be as follows: extract the region range and region orientation of the target region from the region parameters of the target region, and determine the region to be merged at a specified location in the second scene based on the region range and region orientation.
[0054] The solution of this application embodiment receives a region selection request for a first scene screen, and determines a target region in the first scene screen based on the region selection request, wherein the first scene screen is a scene screen that provides fused terrain; based on the region parameters of the target region, a corresponding region to be fused is determined at a specified position in the second scene screen. By receiving a region selection request for the first scene screen, the target region and the region to be fused can be determined from the first scene screen and the second scene screen, so that the two ranges providing the fused region and the fused terrain are corresponding, thereby improving the adaptability of the fusion.
[0055] Step 104: Determine the fused data of the target terrain and the base terrain according to the fusion strategy.
[0056] Specifically, a fusion strategy refers to a set strategy for merging two terrain features. For example, a fusion strategy may include one or more of the following: height fusion strategy, terrain erosion adjustment strategy, rotation angle fusion strategy, radius fusion strategy, and noise fusion strategy. Among these, a height fusion strategy may be one of the following: maximum height strategy, minimum height strategy, and average height strategy. A terrain erosion adjustment strategy may be a terrain erosion intensity setting strategy, such as setting a range and dividing the set range into several smaller ranges, with different smaller ranges corresponding to different terrain erosion adjustment strategies. A rotation angle fusion strategy may be a rotation angle setting strategy, such as rotating 90 degrees, rotating 180 degrees, etc. A radius fusion strategy may be a radius size selection strategy, selecting different radii and expanding / shrinking the target terrain according to the selected radius and the size of the area to be merged. A noise fusion strategy may be a noise level selection strategy.
[0057] Fusion data refers to the parameter values required to merge the target terrain and the fusion terrain. The determination of fusion data corresponds to the fusion strategy. For example, if the fusion strategy is a height fusion strategy, then the fusion data is the fusion height; if the fusion strategy is a terrain erosion adjustment strategy, then the fusion data is the terrain erosion adjustment intensity; if the fusion strategy is a rotation angle fusion strategy, then the fusion data is the fusion rotation angle; if the fusion strategy is a radius fusion strategy, then the fusion data is the fusion radius; if the fusion strategy is a noise fusion strategy, then the fusion data is the fusion noise.
[0058] The method for determining the fusion height of the target terrain and the base terrain according to the fusion strategy can be to calculate the terrain height difference between the target terrain and the base terrain according to the height fusion strategy, and then determine the fusion height.
[0059] According to the high fusion strategy, the method for calculating the terrain height difference between the target terrain and the base terrain can be: using the maximum height fusion strategy; using the minimum height fusion strategy; or using the most average height fusion strategy.
[0060] One way to calculate the height difference between the target terrain and the base terrain is to calculate the first terrain height of the target terrain and the second terrain height of the base terrain, and then calculate the height difference based on the first and second terrain heights.
[0061] According to the maximum height fusion strategy, the method to calculate the difference in terrain height between the target terrain and the base terrain can be to obtain the maximum height of the terrain corresponding to the target terrain as the first terrain height, and obtain the average height of the terrain corresponding to the base terrain as the second terrain height.
[0062] According to the minimum height fusion strategy, the method to calculate the difference in terrain height between the target terrain and the base terrain can be to obtain the minimum height of the terrain corresponding to the target terrain as the first terrain height, and obtain the average height of the terrain corresponding to the base terrain as the second terrain height.
[0063] According to the most average height fusion strategy, the method to calculate the difference in terrain height between the target terrain and the base terrain can be to obtain the average height of the terrain corresponding to the target terrain as the first terrain height, and obtain the average height of the terrain corresponding to the base terrain as the second terrain height.
[0064] Optionally, the above method for obtaining the maximum, minimum, and average height can be to scatter points along the edge of the terrain, count the height of each point, select the highest height as the maximum height, select the lowest height as the minimum height, and average the heights of all points to obtain the average height.
[0065] In one optional embodiment of this application, the fused data includes fused height, and the fused strategy includes a height fused strategy; the above steps for determining the fused data of the target terrain and the base terrain according to the fused strategy include the following steps:
[0066] Following a high degree of fusion strategy, the first terrain elevation of the target terrain and the second terrain elevation of the basic terrain are obtained;
[0067] Calculate the height difference between the first terrain height and the second terrain height to obtain the merged height.
[0068] According to the high fusion strategy, the implementation method of obtaining the first terrain height of the target terrain and the second terrain height of the base terrain is used. According to the maximum / minimum / average height fusion strategy, the first terrain height of the target terrain and the second terrain height of the base terrain are calculated.
[0069] According to the maximum height fusion strategy, the first terrain height of the target terrain and the second terrain height of the base terrain can be calculated by calculating the maximum height of the target terrain as the first terrain height and calculating the average height of the base terrain as the second terrain height.
[0070] According to the minimum height fusion strategy, the implementation method for calculating the first terrain height of the target terrain and the second terrain height of the base terrain can be to calculate the minimum height of the target terrain as the first terrain height and calculate the average height of the base terrain as the second terrain height.
[0071] According to the average height fusion strategy, the first terrain height of the target terrain and the second terrain height of the base terrain can be calculated by calculating the average height of the target terrain as the first terrain height and calculating the average height of the base terrain as the second terrain height.
[0072] Optionally, the above method for obtaining the maximum, minimum, and average height can be to generate random points at the edge of the terrain, count the height of each random point, select the highest height as the maximum height, select the lowest height as the minimum height, and average the heights of all points to obtain the average height.
[0073] Optionally, there are many ways to generate random points, and the specific method should be determined according to the actual situation. This application does not limit the specific methods.
[0074] In one possible implementation of this application, the Mask corresponding to the target terrain can be shrunk, and the original Mask can be equal to 1 minus the shrunk Mask to generate an updated Mask. At least one random point can be generated at the updated Mask. Similarly, the method for generating random points from the basic terrain can also be applied.
[0075] In another possible implementation of this application, at least one random point can be generated in the target terrain where Mask equals 1. Similarly, the method of generating random points from the base terrain also applies.
[0076] The method to calculate the height difference between the first terrain height and the second terrain height to obtain the blended height can be either subtracting the second terrain height from the first terrain height, or subtracting the first terrain height from the second terrain height.
[0077] The solution of this application embodiment, when the fused data includes fused height and the fused strategy includes a height fused strategy, obtains the first terrain height of the target terrain and the second terrain height of the basic terrain according to the height fused strategy; calculates the height difference between the first terrain height and the second terrain height to obtain the fused height. Through the height fused strategy, the generated fused height meets the set strategy requirements, thereby improving the efficiency of subsequent fused fusion based on the fused height.
[0078] In one optional embodiment of this application, obtaining the first terrain height of the target terrain and the second terrain height of the base terrain according to the height fusion strategy includes the following steps:
[0079] Generate at least one random point at the edge of the target terrain and at the edge of the base terrain, respectively;
[0080] According to the fusion strategy, the terrain heights corresponding to at least one random point of the target terrain and the base terrain are counted separately to obtain the first terrain height of the target terrain and the second terrain height of the base terrain.
[0081] Specifically, random points refer to points generated according to various random methods, such as simple random, stratified random, and block random.
[0082] The implementation method for generating at least one random point at the edge of the target terrain and at the edge of the base terrain can be to generate at least one random point at the edge of the target terrain and at least one random point at the edge of the base terrain.
[0083] According to the high fusion strategy, the implementation method of separately calculating the terrain height corresponding to at least one random point of the target terrain and the basic terrain to obtain the first terrain height of the target terrain and the second terrain height of the basic terrain can be based on the maximum / minimum / average height fusion strategy, which separately calculates the terrain height corresponding to at least one random point of the target terrain and the basic terrain to obtain the first terrain height of the target terrain and the second terrain height of the basic terrain.
[0084] Specifically, according to the maximum height fusion strategy, the terrain heights corresponding to at least one random point of the target terrain and the base terrain are calculated separately to obtain the first terrain height of the target terrain and the second terrain height of the base terrain. Alternatively, the highest terrain height among the heights of at least one random point of the target terrain can be used as the first terrain height, and the average height among the heights of at least one random point of the base terrain can be used as the second terrain height.
[0085] The scheme of this application embodiment generates at least one random point at the edge of the target terrain and the edge of the base terrain, respectively. According to the height fusion strategy, the terrain heights corresponding to at least one random point of the target terrain and the base terrain are statistically analyzed to obtain the first terrain height of the target terrain and the second terrain height of the base terrain. By generating random points at the edges of the target terrain and the base terrain, the calculated first terrain height and the second terrain height contain the randomness of the edge terrain in the target terrain and the base terrain, which prepares the fusion parameters for subsequent terrain fusion, thereby improving the efficiency of generating fused terrain in the area to be fused.
[0086] Step 106: Based on the fusion data, merge the target terrain of the target area into the area to be merged to generate the fused terrain of the area to be merged. The fused terrain is used to indicate the fusion status of the target terrain and the base terrain.
[0087] Specifically, terrain fusion is the terrain generated by merging the target terrain into the area to be merged, wherein the target terrain is connected to the edge of the area to be merged.
[0088] The method of fusing the target terrain of the target area into the area to be fused based on the fused data can be as follows: First, generate the fused terrain in the area to be fused based on the fused data and the terrain data of the target terrain. Second, update the updated terrain data of the target terrain in the target area based on the fused data, and adjust the data of the area to be fused based on the updated terrain data to generate the fused terrain in the area to be fused. In this case, the dimensions of the data in the fused data and the terrain data of the target terrain are consistent. For example, if the fused data is a fused height, then the terrain data of the target terrain is the terrain height; if the fused data is a rotation angle, then the terrain data of the target terrain is the terrain rotation angle.
[0089] Optionally, after generating the fusion terrain of the area to be fused, the fusion status can be obtained based on the fusion terrain.
[0090] In one optional embodiment of this application, the above steps, based on the fusion data, fuse the target terrain of the target area into the area to be fused to generate the fused terrain of the area to be fused, including the following steps:
[0091] Based on the fused data and the target terrain data, the terrain data of the base terrain is adjusted to generate the fused terrain of the area to be fused.
[0092] There are many ways to adjust the base terrain data based on the fused data and the target terrain data to generate the fused terrain of the area to be fused. The specific method depends on the actual situation and is not limited in this application.
[0093] In one possible implementation of this application, the terrain data of the target terrain can be adjusted according to the fused data to obtain the updated target terrain; the basic terrain of the area to be fused can be adjusted based on the updated target terrain to obtain the fused terrain.
[0094] In another possible implementation of this application, the terrain data of the base terrain can be adjusted according to the fused data to obtain the updated base terrain, the first data benchmark corresponding to the updated base terrain can be identified, and the benchmark of the target terrain can be adjusted based on the first data benchmark, the target terrain and the second data benchmark corresponding to the target terrain data to obtain the fused terrain of the area to be fused.
[0095] The solution of this application embodiment adjusts the terrain data of the base terrain based on the fused data and the terrain data of the target terrain to generate the fused terrain of the area to be fused. By adjusting the terrain data of the base terrain based on the fused data and the terrain data of the target terrain, the overall data of the generated fused terrain meets the requirements of the fusion strategy. The terrain data of the fused terrain is consistent with the target terrain, thus realizing the controllability of the generation of the fused terrain.
[0096] In one optional embodiment of this application, the above steps, based on the fused data and the target terrain data, adjust the terrain data of the base terrain to generate the fused terrain of the area to be fused, including the following steps:
[0097] Based on the fused data, update the terrain data of the target terrain to obtain updated terrain data;
[0098] Adjust the base terrain data to match the updated terrain data, and generate the merged terrain for the area to be merged.
[0099] The updated terrain data of the target terrain can be obtained by vertically shifting the target terrain data by the distance of the fused data.
[0100] The method to generate the fused terrain of the area to be merged by adjusting the terrain data of the base terrain to be consistent with the updated terrain data can be based on the offset angle between the updated terrain data, the base terrain and the target terrain.
[0101] The solution in this application involves updating the target terrain data based on the fused data to obtain updated terrain data; then adjusting the base terrain data to match the updated terrain data to generate the fused terrain of the area to be fused. By adjusting the target terrain data using the fused data, and then adjusting the base terrain data based on the adjusted target terrain data, the process of directly adjusting the base terrain data is simplified, thereby improving the efficiency of generating fused terrain in the area to be fused.
[0102] In one optional embodiment of this application, the fusion strategy includes a terrain erosion adjustment strategy; after generating the fused terrain of the area to be fused in the above steps, the following steps are also included:
[0103] Obtain the terrain erosion adjustment strategy corresponding to the merged terrain from the fusion strategy;
[0104] Based on the terrain erosion adjustment strategy, the erosion at the edge of the fused terrain is adjusted to obtain the eroded terrain of the fused terrain. The eroded terrain is used to indicate the current fusion status of the target terrain and the base terrain.
[0105] Specifically, topographic erosion adjustment strategies refer to strategies for adjusting the erosion and ambiguity of topography. Topographic erosion adjustment strategies can be the sole indicator of adjustment or the scope of adjustment, such as the erosion range or the degree of ambiguity.
[0106] The implementation of obtaining the terrain erosion adjustment strategy corresponding to the fused terrain from the fusion strategy can be done by searching for the terrain erosion adjustment strategy corresponding to the fused terrain in the fusion strategy based on the terrain identifier of the fused terrain; or by obtaining the standard erosion terrain adjustment strategy from the storage file that sets the erosion terrain adjustment strategy.
[0107] The method of adjusting the erosion at the edge of the fused terrain based on the terrain erosion adjustment strategy to obtain the eroded terrain of the fused terrain can be based on the erosion range and fuzzing intensity, randomly adjusting the erosion and fuzzing at the edge of the fused terrain to obtain the eroded terrain of the fused terrain.
[0108] Users can obtain the current fusion status of the target terrain and the base terrain based on the eroded terrain of the fused terrain.
[0109] The solution in this application involves obtaining a terrain erosion adjustment strategy corresponding to the fused terrain from the fusion strategy; based on the terrain erosion adjustment strategy, adjusting the erosion at the edge of the fused terrain to obtain an updated fused terrain. By adjusting the erosion at the edge of the fused terrain using the obtained terrain erosion adjustment strategy, an updated fused terrain is obtained, making the updated fused terrain more consistent with the terrain corresponding to the set strategy, thus ensuring that the generated updated fused terrain conforms to the user-defined fusion strategy.
[0110] In one optional embodiment of this application, after generating the fused terrain of the region to be fused, the following steps are further included:
[0111] Obtain the terrain texture of the target terrain;
[0112] The terrain texture of the target terrain is copied onto the blended terrain to obtain the terrain texture of the blended terrain, where the terrain texture is used to indicate the current blending status of the target terrain and the base terrain.
[0113] Specifically, terrain texture refers to the texture covering the terrain. Terrain texture is part of the landform. For example, terrain texture can be cliffs, grasslands, lakes, soil, snow-capped mountains, deserts, etc.
[0114] The implementation of obtaining the terrain texture of the target terrain can be done in two ways: either by obtaining the terrain texture of the target terrain from a repository that stores terrain textures based on the terrain identifier of the target terrain, or by extracting textures from the target region to obtain the terrain texture of the target terrain.
[0115] To copy the terrain texture of the target terrain onto the blended terrain and obtain the terrain texture of the blended terrain, one method is to obtain the offset angle of the target terrain in the blended terrain, and then copy the terrain texture of the target terrain onto the blended terrain according to the offset angle to obtain the terrain texture of the blended terrain.
[0116] Optionally, remove the base terrain texture on the merged terrain before copying the terrain texture of the target terrain onto the merged terrain.
[0117] Users can obtain the current fusion status of the target terrain and the base terrain based on the terrain texture of the fused terrain.
[0118] The method described in this application involves obtaining the terrain texture of the target terrain; copying the terrain texture of the target terrain onto the fused terrain to obtain the terrain texture of the fused terrain. After generating the fused terrain, copying the terrain texture of the target terrain onto the fused terrain allows for a more intuitive view of the fusion between the target terrain and the base terrain, and is more conducive to obtaining the fusion between the target terrain and the base terrain adjusted according to the fusion strategy.
[0119] In one optional embodiment of this application, after generating the fused terrain of the region to be fused, the following steps are further included:
[0120] Obtain at least one object in the target area, wherein at least one object has a positional correspondence with the target terrain;
[0121] Based on the fusion data and location correspondence, at least one object is moved to the fusion terrain of the area to be fused to obtain the fusion landform of the fusion terrain, wherein the fusion landform is used to indicate the current fusion status of the target terrain and the base terrain.
[0122] Specifically, an object refers to an object in the target area that can be moved independently. For example, an object can be a building, landmark, or other object placed in the target area.
[0123] The implementation of obtaining at least one object in the target region can be either based on the region identifier of the target region, obtaining at least one object in the target region from the repository storing objects; or it can be extracted from the target region.
[0124] The method of moving at least one object to the fusion terrain of the area to be fused based on the fusion data and the position correspondence to obtain the fused landform of the fusion terrain can be to adjust the position of at least one object according to the fusion data and the position correspondence to the fusion terrain, thus obtaining the fused landform of the fusion terrain.
[0125] Users can obtain the current fusion status of the target terrain and the base terrain based on the fused topography of the fused terrain.
[0126] By applying the scheme of this application embodiment, at least one object in the target area is obtained. Based on the fusion data and the location correspondence, the at least one object is moved to the fusion terrain of the area to be fused, thereby obtaining the fused landform of the fusion terrain. By moving at least one object in the target area to the fusion terrain of the area to be fused through the fusion data and the location correspondence, the fusion of the target terrain and the base terrain can be viewed more intuitively, which is more conducive to obtaining the fusion of the target terrain and the base terrain adjusted according to the fusion strategy.
[0127] Step 108: If the current fusion situation does not meet the constraints, adjust the fusion strategy and regenerate the fused terrain until the constraints are met. Output the regional fusion parameters, where the regional fusion parameters are the fusion parameters of the target area and the area to be fused, and the regional fusion parameters include the fusion strategy and / or the fused terrain.
[0128] Specifically, constraints refer to conditions that constrain the fusion process. For example, constraints might include a fusion effect threshold, a target fusion effect level, a percentage of edges exhibiting faults reaching a fault threshold, a percentage of areas with central dips reaching a dip threshold, or failure to receive an update instruction within a preset time period. The fusion effect threshold could be in the form of 80%, 0.8, etc. Regional fusion parameters refer to parameters used to generate fused terrain for a specified region. These parameters may include a fusion strategy and / or fused terrain.
[0129] Before adjusting the fusion strategy and regenerating the fused terrain if the current fusion situation does not meet the constraints, it is also necessary to determine whether the current fusion situation meets the constraints.
[0130] One way to determine whether the current fusion status meets the constraints is to analyze the fusion status of the fusion terrain, obtain a fusion score, compare the fusion score / level with the constraints, and determine whether the current fusion status meets the fusion requirements based on the comparison results. The fusion score can be a fusion value, a fusion level, etc.
[0131] Another way to determine whether the current fusion status meets the constraints is to analyze the edge terrain of the fused terrain, calculate the proportion of the length of the fault in the total length of the edge of the fused terrain, compare the proportion with the fault threshold, obtain the comparison result, and determine whether the current fusion status meets the fusion requirements based on the comparison result.
[0132] Another way to determine whether the current fusion situation meets the constraints is to analyze the intermediate terrain of the fusion terrain, calculate the proportion of the area where the drop occurs in the total area of the fusion terrain, compare the proportion with the proportion threshold, obtain the comparison result, and determine whether the current fusion situation meets the fusion conditions based on the comparison result.
[0133] Another way to determine whether the current fusion status meets the constraints is to display the fused terrain on the front end and determine whether an update command has been received within a preset time period.
[0134] Optionally, upon receiving an update instruction, it is determined that the current fusion status does not meet the constraints.
[0135] If the current fusion situation does not meet the constraints, the fusion strategy can be adjusted and the fused terrain can be regenerated. This can be achieved by adjusting the fusion strategy and regenerating the fused terrain if the fusion effect value corresponding to the current fusion situation does not reach the fusion effect threshold.
[0136] The implementation of outputting region fusion parameters can be achieved by integrating the fusion terrain and fusion strategy of the region to be fused, recording them as region fusion parameters, and outputting them as region fusion parameters; or by outputting either the fusion terrain or the fusion strategy as the region fusion parameters.
[0137] After determining whether the current fusion situation meets the constraints, the process also includes outputting the region fusion parameters if the current fusion situation meets the constraints.
[0138] Optionally, the regional fusion parameters include fusion strategies and / or fusion terrain. The fusion method varies depending on the content of the regional fusion parameters. The specific content of the regional fusion parameters can be determined according to the actual situation, and this application does not limit it here.
[0139] When the region fusion parameters include a fusion strategy, the fusion strategy is stored. When fusion is needed, the terrain can be fused in the region to be fused in the original region based on the fusion strategy and the target terrain of the target region to obtain the fused terrain.
[0140] When the region fusion parameters include fusion terrain, the fusion terrain is stored. When fusion is needed, the terrain of the region to be fused in the original region can be directly replaced with the fusion terrain.
[0141] When the region fusion parameters include fusion strategy and fusion terrain, the fusion strategy and fusion terrain are stored. Before fusion is required, the fusion strategy can be used to verify the consistency of the fusion terrain. If the verification result is passed, the fusion terrain is replaced in the original region to achieve region fusion, so as to ensure that the fusion terrain regenerated by the fusion strategy is consistent with the fusion terrain included in the region fusion parameters.
[0142] In one optional embodiment of this application, the region fusion parameters further include at least one object and movement information of each object.
[0143] Specifically, movement information refers to the baseline information of an object moving to a corresponding location. For example, movement information may include the terrain markers of the movement, the angle of movement, the distance of movement, etc.
[0144] The solution of the present application embodiment includes at least one object and the movement information of each object in the regional fusion parameters. This allows the fusion of at least one object in the fusion terrain that meets the constraints generated by at least one object to be fused when the fusion terrain in the region to be fused is formally generated based on the regional fusion parameters. This makes the fusion effect more in line with expectations and thus makes the efficiency of generating fusion terrain in the region to be fused higher.
[0145] In one optional embodiment of this application, after outputting the region fusion parameters of the fused terrain until the constraints are met, the following steps are further included:
[0146] Obtain the region fusion parameters of the fusion terrain corresponding to at least one region to be fused, and the position information of each region to be fused in the second scene, wherein the second scene includes at least one region to be fused.
[0147] Based on location information and fusion parameters for each region, the fused terrain of each region to be fused is generated in the second scene.
[0148] The implementation method for obtaining the region fusion parameters of the fusion terrain corresponding to at least one region to be fused can be to obtain at least one region to be fused in the second scene image, and obtain the fusion terrain of at least one region to be fused based on the region identifier of at least one region to be fused.
[0149] One way to obtain the location information of each region to be merged in the second scene is to compare the basic terrain of each region to be merged with the terrain in the second scene, and determine the location information of each region to be merged in the second scene based on the comparison results.
[0150] The process involves acquiring region fusion parameters for at least one region to be merged, along with the location information of each region in a second scene. The second scene includes at least one region to be merged. Based on the location information and the region fusion parameters, the process generates the merged terrain for each region in the second scene. By utilizing the region fusion parameters for the merged terrain corresponding to at least one region and the location information of each region in the second scene, the process enables batch generation of the merged terrain for each region at the corresponding location information, achieving the efficiency of generating at least one merged terrain within the second scene.
[0151] In one optional embodiment of this application, the above steps generate the fused terrain of each region to be fused in the second scene image based on location information and fusion parameters of each region, including the following steps:
[0152] For the target region to be merged, based on the region fusion parameters of the target region to be merged, the fusion terrain of the target region to be merged is generated at the location corresponding to the location information of the target region to be merged. The target region to be merged is any one of at least one region to be merged in the second scene image.
[0153] Remove point cloud data from the target area to be merged terrain to obtain the first updated merged terrain of the target area to be merged.
[0154] Obtain the target object and its movement information in the target area to be merged. Based on the movement information, move the target object to the corresponding merging terrain of the area to be merged. Obtain the second updated merging terrain of each area to be merged and use the second updated merging terrain as the final merging terrain.
[0155] Specifically, point cloud data refers to data that affects the placement of objects in a region. For example, point cloud data can be data on vegetation, gravel, etc.
[0156] The implementation method of generating the fused terrain of the target area to be fused at the location corresponding to the location information of the target area to be fused based on the area fusion parameters of the target area to be fused can be to determine the range at the location corresponding to the location information of the target area to be fused based on the area fusion parameters of the target area to be fused, and generate the fused terrain of the target area to be fused within the range.
[0157] The implementation method of removing point cloud data from the fusion terrain of the target area to be fused to obtain the first updated fusion terrain of the target area to be fused is to remove data other than terrain from the fusion terrain of the target area to be fused.
[0158] One way to obtain the target object and its movement information in the target fusion region is to retrieve the target object and its movement information from the object library of stored objects based on the region identifier of the target fusion region.
[0159] For example, the movement information of the target object includes the base name, displacement parameters, and rotation parameters. For instance, based on the base name, the target object and its corresponding displacement and rotation parameters are obtained from the object library that stores objects.
[0160] Optionally, the objects and object information stored in the object library can be stored in a lightweight data exchange format in the form of a data table.
[0161] Applying the scheme of this application embodiment, for a target area to be merged, based on the region fusion parameters of the target area to be merged, a fused terrain of the target area to be merged is generated at the location corresponding to the location information of the target area to be merged. The target area to be merged is any one of at least one area to be merged in the second scene. Point cloud data in the fused terrain of the target area to be merged is removed to obtain the first updated fused terrain of the target area to be merged. The target object and its movement information in the target area to be merged are obtained, and the target object is moved to the fused terrain of the corresponding area to be merged according to the movement information of the target object to obtain the second updated fused terrain of each area to be merged. The second updated fused terrain is used as the final fused terrain. By removing point cloud data from the generated fused terrain, the objects corresponding to each fused area can be better placed on the fused terrain, thereby achieving efficient generation of fused terrain in the area to be merged.
[0162] One or more embodiments of this application can perform pre-fusion calculations of stronghold terrain and textures within the game engine. After the calculations are completed, objects and lights within a single stronghold are automatically transferred to the current stronghold scene. This allows for a quick view of the completed stronghold effect within the engine. If the completed stronghold effect is unsatisfactory, the fusion strategy can be quickly adjusted to achieve a satisfactory result. There is no need to wait until all functions are executed before seeing the stronghold effect, and then batch-place the completed strongholds onto the open world terrain scene, thereby improving work efficiency and accelerating the iteration process of stronghold production.
[0163] The following is in conjunction with the appendix Figure 2a Taking the application of the region fusion method provided in this application in a game animation scene as an example, the region fusion method will be further explained. Figure 2a This application provides a flowchart illustrating a region blending method for game animation scenes according to an embodiment of the present application, which specifically includes the following steps:
[0164] Create a new pre-fusion scene and name it with the defined base name to standardize the naming, layering, and directory of terrain and objects within the pre-fusion scene. This will achieve the purpose of standardized naming and directory storage, and bring about better resource management and improved fusion process efficiency.
[0165] Receive the user's selection of a specified location in the world terrain to determine the placement of the outpost in the world terrain.
[0166] Place single-scene terrain and open-world terrain in a pre-fused scene, and adjust specified locations within the open-world terrain for better integration of outpost terrain.
[0167] See Figure 2b and Figure 2c , Figure 2b This illustration shows a schematic diagram of single-scene terrain in a region fusion method provided in an embodiment of this application; Figure 2c This illustration shows a schematic diagram of the large-world terrain in a region fusion method provided in an embodiment of this application.
[0168] Step 202: Receive a region selection request for the first scene screen, and determine the target region in the first scene screen based on the region selection request.
[0169] The first scene is a scene that integrates the terrain.
[0170] The system receives the area range defined by the user using anchor points on the front end, and determines the area in the single-scene terrain as the target area, where area is the identifier of the selected area.
[0171] Step 204: Based on the region parameters of the target region, determine the corresponding region to be merged at a specified location in the second scene.
[0172] The second scene screen provides the scene screen of the fusion area, and the designated location is a pre-set location for terrain fusion.
[0173] Based on the area range, the area range is determined at a specified location in the world terrain as the area to be merged.
[0174] Export the single-scene terrain and open-world terrain carrying area selection markers to a specified format, wherein the specified format is a format that can be recognized by the algorithm performing steps 206 to 218 below.
[0175] Step 206: Obtain the target terrain of the target area and the basic terrain of the area to be merged.
[0176] Obtain the outpost terrain of the area in a single scene and the basic terrain of the area in the open world from the exported file.
[0177] Set the Mask value for the outpost terrain and the base terrain to 1, so that terrain adjustments can be made for areas with a Mask value of 1.
[0178] Step 208: Generate at least one random point at the edge of the target terrain and the edge of the base terrain, respectively.
[0179] Randomly scatter points along the edges of the Mask in a single-scene terrain to generate 100 random points;
[0180] The Mask in the shrinking world terrain is used to randomly scatter 150 points within the target range of the original Mask minus the shrinking Mask. The shrinking degree is automatically adjusted according to the preset shrinking range, and the target range is the range corresponding to the annular area obtained by subtracting the shrinking Mask from the larger Mask.
[0181] Step 210: According to the high fusion strategy, the terrain height corresponding to at least one random point of the target terrain and the base terrain is calculated respectively to obtain the first terrain height of the target terrain and the second terrain height of the base terrain.
[0182] Following the maximum height fusion strategy, the average height of the terrain corresponding to 100 random points in a single scene is calculated as the first terrain height; the maximum height of the terrain corresponding to 150 random points in the open world is calculated as the second terrain height.
[0183] Step 212: Calculate the height difference between the first terrain height and the second terrain height to obtain the merged height.
[0184] The fusion height is obtained by subtracting the first terrain height from the second terrain height.
[0185] Step 214: Update the terrain height of the target terrain based on the fusion height to obtain the updated terrain height.
[0186] The vertical movement of the terrain height of a single scene is calculated by the distance of the fusion height, and the updated terrain height of the stronghold terrain in the single scene is recorded.
[0187] Step 216: Adjust the height of the base terrain to match the height of the updated terrain to generate the merged terrain of the area to be merged.
[0188] Based on the updated terrain height, adjust the terrain of the corresponding areas with Mask greater than 0 in the open world terrain to obtain the merged terrain corresponding to the open world terrain. The areas with Mask greater than 0 are the area regions in the open world.
[0189] See Figure 2d , Figure 2d This illustration shows a schematic diagram of terrain fusion in a region fusion method provided in an embodiment of this application.
[0190] Step 218: If the current fusion situation does not meet the constraints, adjust the fusion strategy, regenerate the fused terrain, and output the fusion parameters of the region until the constraints are met.
[0191] Among them, the regional fusion parameters are the fusion parameters of the target area and the area to be fused, and the regional fusion parameters include the fusion strategy and / or the fusion terrain.
[0192] If the merged terrain of the open world does not meet the constraints, adjust the fusion strategy and execute steps 202 to 216 above to regenerate the merged terrain corresponding to the open world terrain until the merged terrain meets the constraints. Output the fusion strategy and / or the merged terrain, where the fusion strategy and / or the merged terrain are the fusion parameters of the area region corresponding to the stronghold terrain in the single scene terrain and the area region in the open world terrain.
[0193] Step 220: Obtain the region fusion parameters of the fusion terrain corresponding to at least one region to be fused, and the position information of each region to be fused in the second scene.
[0194] The second scene includes at least one area to be merged.
[0195] Given that multiple stronghold terrains in a single scene are generated in the corresponding open world terrain and the corresponding regional fusion parameters are output, the regional fusion parameters of the fusion terrains corresponding to 10 different area regions in the open world, as well as the location information of the 10 area regions in the open world, are obtained.
[0196] Step 222: For the target area to be merged, based on the area fusion parameters of the target area to be merged, generate the fused terrain of the target area to be merged at the location corresponding to the location information of the target area to be merged.
[0197] The target region to be merged is any one of at least one region to be merged in the second scene image.
[0198] For any area in the open world, based on the area fusion parameters of that area, generate fused terrain at the location corresponding to that area in the open world terrain.
[0199] At this point, the merged terrain of 10 area regions has been obtained.
[0200] See Figure 2e , Figure 2e This illustration shows a schematic diagram of the batch replacement of base points in a region fusion method provided in an embodiment of this application.
[0201] Step 224: Remove point cloud data from the target area to be merged to obtain the first updated merged terrain of the target area to be merged.
[0202] Step 226: Obtain the target object and its movement information in the target area to be merged, and move the target object to the corresponding merging terrain in the area to be merged according to the movement information of the target object, obtain the second updated merging terrain of each area to be merged, and use the second updated merging terrain as the final merging terrain.
[0203] See Figure 2f , Figure 2f This illustration shows a schematic diagram of the final fused terrain in a region fusion method provided in an embodiment of this application.
[0204] The scheme of this application determines the fusion data of the target terrain and the basic terrain through a fusion strategy, and merges the target terrain and the basic terrain according to the fusion data to generate the fused terrain of the area to be merged, thereby realizing automated terrain fusion and improving the efficiency of generating fused terrain in the area to be merged. The fused terrain is used to indicate the fusion status of the target terrain and the basic terrain. The fusion status is judged based on the fused terrain. If the fusion status meets the constraints, the area fusion parameters are output. This allows the fusion status to be determined in advance after the fused terrain is obtained, avoiding the waste of computing power to re-execute terrain fusion and all other functions if the fusion status does not meet the constraints after the fused terrain and all other functions have been executed.
[0205] See Figure 3 , Figure 3A flowchart illustrating the generation of fusion points in a region fusion method according to an embodiment of this application is shown below:
[0206] This refers to the area regions in the open world terrain and the area regions (outposts) in a single scene terrain. The area regions in the open world terrain are the basic terrain, while the area regions in the single scene terrain are the outpost terrain.
[0207] Step 302: Traverse each row of data in the base information table to obtain the base terrain.
[0208] The base information table stores the base terrain of each base in each single scene.
[0209] Step 304: Determine whether the outpost needs to be integrated into the world terrain.
[0210] If yes, proceed to step 306; otherwise, proceed to step 312.
[0211] Step 306: Merge the stronghold terrain in the area of the large world terrain to obtain the displacement data of the merged terrain and the stronghold terrain.
[0212] Step 308: Remove point cloud data such as vegetation and gravel from the merged terrain.
[0213] Step 310: Read the stronghold terrain displacement data. Based on the stronghold terrain displacement data, transfer the objects corresponding to the stronghold to the merged terrain of the large world terrain to generate a merged stronghold.
[0214] Step 312: Skip.
[0215] After skipping, process the area region in the next single-scene terrain.
[0216] The scheme of this application determines the fusion data of the target terrain and the basic terrain through a fusion strategy, and merges the target terrain and the basic terrain according to the fusion data to generate the fused terrain of the area to be merged, thereby realizing automated terrain fusion and improving the efficiency of generating fused terrain in the area to be merged. The fused terrain is used to indicate the fusion status of the target terrain and the basic terrain. The fusion status is judged based on the fused terrain. If the fusion status meets the constraints, the area fusion parameters are output. This allows the fusion status to be determined in advance after the fused terrain is obtained, avoiding the waste of computing power to re-execute terrain fusion and all other functions if the fusion status does not meet the constraints after the fused terrain and all other functions have been executed.
[0217] Corresponding to the above method embodiments, this application also provides embodiments of a region fusion device. Figure 4A schematic diagram of a region fusion device according to an embodiment of this application is shown. Figure 4 As shown, the device includes:
[0218] The acquisition module 402 is configured to acquire the target terrain of the target area and the basic terrain of the area to be merged;
[0219] Module 404 is configured to determine the fused data of the target terrain and the base terrain according to the fusion strategy;
[0220] The fusion module 406 is configured to fuse the target terrain of the target area to the area to be fused based on the fusion data, and generate the fused terrain of the area to be fused, wherein the fused terrain is used to indicate the fusion status of the target terrain and the base terrain;
[0221] The output module 408 is configured to adjust the fusion strategy and regenerate the fused terrain when the current fusion situation does not meet the constraints, until the constraints are met and the regional fusion parameters are output. The regional fusion parameters are the fusion parameters of the target area and the area to be fused, and the regional fusion parameters include the fusion strategy and / or the fused terrain.
[0222] Optionally, the fused data includes fused height, and the fused strategy includes a height fused strategy; the determination module 404 is further configured to obtain a first terrain height of the target terrain and a second terrain height of the base terrain according to the height fused strategy; calculate the height difference between the first terrain height and the second terrain height to obtain the fused height.
[0223] Optionally, the determining module 404 is further configured to generate at least one random point at the edge of the target terrain and the edge of the base terrain, respectively; and according to the height fusion strategy, to calculate the terrain height corresponding to at least one random point of the target terrain and the base terrain, respectively, to obtain the first terrain height of the target terrain and the second terrain height of the base terrain.
[0224] Optionally, the fusion module 406 is further configured to adjust the terrain data of the base terrain based on the fusion data and the terrain data of the target terrain to generate the fused terrain of the area to be fused.
[0225] Optionally, the fusion module 406 is further configured to update the terrain data of the target terrain based on the fusion data to obtain updated terrain data; adjust the terrain data of the base terrain to be consistent with the updated terrain data, and generate the fused terrain of the area to be fused.
[0226] Optionally, the region fusion device further includes a region selection module, configured to receive a region selection request for a first scene screen, and determine a target region in the first scene screen based on the region selection request, wherein the first scene screen is a scene screen that provides fused terrain; and determine a corresponding region to be fused at a specified location in a second scene screen based on the region parameters of the target region, wherein the second scene screen is a scene screen that provides the fused region, and the specified location is a pre-set location for terrain fusion.
[0227] Optionally, the fusion strategy includes a terrain erosion adjustment strategy; the regional fusion device further includes an erosion adjustment module, configured to obtain the terrain erosion adjustment strategy corresponding to the fused terrain from the fusion strategy; based on the terrain erosion adjustment strategy, adjust the erosion at the edge of the fused terrain to obtain the eroded terrain of the fused terrain, wherein the eroded terrain is used to indicate the current fusion status of the target terrain and the base terrain.
[0228] Optionally, the region fusion apparatus further includes a texture copying module configured to acquire the terrain texture of the target terrain; copy the terrain texture of the target terrain onto the fused terrain to obtain the terrain texture of the fused terrain, wherein the terrain texture is used to indicate the current fusion status of the target terrain and the base terrain.
[0229] Optionally, the region fusion device further includes an object movement module configured to acquire at least one object in the target region, wherein the at least one object has a positional correspondence with the target terrain; and move the at least one object to the fusion terrain of the region to be fused according to the fusion data and the positional correspondence, thereby obtaining the fusion topography of the fusion terrain, wherein the fusion topography is used to indicate the current fusion status of the target terrain and the base terrain.
[0230] Optionally, the region fusion parameters also include at least one object and movement information of each object.
[0231] Optionally, the region fusion device further includes a generation module, configured to acquire region fusion parameters of the fusion terrain corresponding to at least one region to be fused, and position information of each region to be fused in a second scene, wherein the second scene includes at least one region to be fused; and generate the fusion terrain of each region to be fused in the second scene based on the position information and the region fusion parameters.
[0232] Optionally, the generation module is further configured to generate a fused terrain for the target fused region at the location corresponding to the location information of the target fused region, based on the region fusion parameters of the target fused region, wherein the target fused region is any one of at least one fused region in the second scene image; remove point cloud data from the fused terrain of the target fused region to obtain a first updated fused terrain of the target fused region; acquire the target object and the target object's movement information in the target fused region, and move the target object to the fused terrain of the corresponding fused region according to the target object's movement information to obtain a second updated fused terrain of each fused region, and use the second updated fused terrain as the final fused terrain.
[0233] The scheme of this application determines the fusion data of the target terrain and the basic terrain through a fusion strategy, and merges the target terrain and the basic terrain according to the fusion data to generate the fused terrain of the area to be merged, thereby realizing automated terrain fusion and improving the efficiency of generating fused terrain in the area to be merged. The fused terrain is used to indicate the fusion status of the target terrain and the basic terrain. The fusion status is judged based on the fused terrain. If the fusion status meets the constraints, the area fusion parameters are output. This allows the fusion status to be determined in advance after the fused terrain is obtained, avoiding the waste of computing power to re-execute terrain fusion and all other functions if the fusion status does not meet the constraints after the fused terrain and all other functions have been executed.
[0234] The above is a schematic scheme of a region fusion device according to this embodiment. It should be noted that the technical solution of this region fusion device and the technical solution of the above-described region fusion method belong to the same concept. For details not described in detail in the technical solution of the region fusion device, please refer to the description of the technical solution of the above-described region fusion method.
[0235] Figure 5 This diagram illustrates a structural block diagram of a computing device 500 according to an embodiment of this application. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.
[0236] The computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 540 may include one or more of any type of wired or wireless network interface (e.g., Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0237] In one embodiment of this application, the aforementioned components of the computing device 500 and Figure 5 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 5 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.
[0238] Computing device 500 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). Computing device 500 can also be a mobile or stationary server.
[0239] The processor 520 implements the steps of the region fusion method when executing the computer instructions.
[0240] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the aforementioned region fusion method belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the aforementioned region fusion method.
[0241] An embodiment of this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the region fusion method as described above.
[0242] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the region fusion method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the region fusion method described above.
[0243] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0244] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0245] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0246] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0247] The preferred embodiments disclosed above are merely illustrative of this application. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this application. These embodiments are selected and specifically described in this application to better explain the principles and practical applications of this application, thereby enabling those skilled in the art to better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.
Claims
1. A regional fusion method, characterized in that, include: Obtain the target terrain of the target area and the basic terrain of the area to be merged; The fused data of the target terrain and the base terrain are determined according to the fusion strategy; Based on the fusion data, the target terrain of the target area is fused to the area to be fused to generate the fused terrain of the area to be fused, wherein the fused terrain is used to indicate the fusion status of the target terrain and the base terrain; If the current fusion situation does not meet the constraints, the fusion strategy is adjusted, the fusion terrain is regenerated, and the fusion parameters are output until the constraints are met. The fusion parameters are the fusion parameters of the target region and the region to be fused, and the fusion parameters include the fusion strategy and / or the fusion terrain.
2. The method according to claim 1, characterized in that, The fused data includes fused height, and the fused strategy includes a height fused strategy; determining the fused data of the target terrain and the base terrain according to the fused strategy includes: According to the high fusion strategy, the first terrain height of the target terrain and the second terrain height of the base terrain are obtained; Calculate the height difference between the first terrain height and the second terrain height to obtain the fusion height.
3. The method according to claim 2, characterized in that, The step of obtaining the first terrain height of the target terrain and the second terrain height of the base terrain according to the height fusion strategy includes: At least one random point is generated at the edge of the target terrain and at the edge of the base terrain, respectively; According to the high fusion strategy, the terrain heights corresponding to at least one random point of the target terrain and the base terrain are statistically analyzed to obtain the first terrain height of the target terrain and the second terrain height of the base terrain.
4. The method according to claim 1, characterized in that, The step of fusing the target terrain of the target area to the area to be fused based on the fused data, to generate the fused terrain of the area to be fused, includes: Based on the fused data and the terrain data of the target terrain, the terrain data of the base terrain is adjusted to generate the fused terrain of the area to be fused.
5. The method according to claim 4, characterized in that, The step of adjusting the terrain data of the base terrain based on the fused data and the terrain data of the target terrain to generate the fused terrain of the area to be fused includes: Based on the fused data, the terrain data of the target terrain is updated to obtain updated terrain data; Adjust the terrain data of the base terrain to match the updated terrain data to generate the merged terrain of the area to be merged.
6. The method according to claim 1, characterized in that, Before acquiring the target terrain of the target area and the basic terrain of the area to be merged, the following steps are also included: Receive a region selection request for a first scene screen, and determine the target region in the first scene screen based on the region selection request, wherein the first scene screen is a scene screen that provides blended terrain; Based on the regional parameters of the target area, the corresponding region to be fused is determined at a designated location in the second scene screen, wherein the second scene screen is the scene screen that provides the fusion region, and the designated location is a pre-set location for terrain fusion.
7. The method according to claim 1, characterized in that, The fusion strategy includes a terrain erosion adjustment strategy; After generating the fused terrain of the region to be fused, the method further includes: Obtain the terrain erosion adjustment strategy corresponding to the fused terrain from the fusion strategy; Based on the terrain erosion adjustment strategy, the erosion at the edge of the fused terrain is adjusted to obtain the eroded terrain of the fused terrain, wherein the eroded terrain is used to indicate the current fusion status of the target terrain and the base terrain.
8. The method according to any one of claims 1-7, characterized in that, After generating the fused terrain of the region to be fused, the method further includes: Obtain the terrain texture of the target terrain; The terrain texture of the target terrain is copied onto the blended terrain to obtain the terrain texture of the blended terrain, wherein the terrain texture is used to indicate the current blending status of the target terrain and the base terrain.
9. The method according to claim 1, characterized in that, After generating the fused terrain of the region to be fused, the method further includes: Obtain at least one object in the target area, wherein the at least one object has a positional correspondence with the target terrain; Based on the fusion data and the location correspondence, at least one object is moved to the fusion terrain of the area to be fused to obtain the fusion landform of the fusion terrain, wherein the fusion landform is used to indicate the current fusion status of the target terrain and the base terrain.
10. The method according to claim 9, characterized in that, The region fusion parameters also include the at least one object and the movement information of each object.
11. The method according to claim 1, characterized in that, After outputting the region fusion parameters until the constraints are met, the following is also included: Obtain the region fusion parameters of the fusion terrain corresponding to at least one region to be fused, and the position information of each region to be fused in the second scene screen, wherein the second scene screen includes the at least one region to be fused; Based on the location information and the fusion parameters of each region, the fused terrain of each region to be fused is generated in the second scene.
12. The method according to claim 11, characterized in that, The step of generating the fused terrain of each region to be fused in the second scene image based on the location information and the fusion parameters of each region includes: For the target area to be merged, based on the area fusion parameters of the target area to be merged, a fusion terrain of the target area to be merged is generated at the location corresponding to the location information of the target area to be merged, wherein the target area to be merged is any one of at least one area to be merged in the second scene image; Remove the point cloud data from the fusion terrain of the target area to be fused to obtain the first updated fusion terrain of the target area to be fused; Obtain the target object and its movement information in the target area to be merged, and move the target object to the corresponding merging terrain in the target area according to the movement information of the target object, thereby obtaining the second updated merging terrain of each target area, and using the second updated merging terrain as the final merging terrain.
13. A regional fusion device, characterized in that, include: The acquisition module is configured to acquire the target terrain of the target area and the basic terrain of the area to be merged. The determination module is configured to determine the fused data of the target terrain and the base terrain according to the fusion strategy; The fusion module is configured to fuse the target terrain of the target area to the area to be fused based on the fusion data, thereby generating the fused terrain of the area to be fused, wherein the fused terrain is used to indicate the fusion status of the target terrain and the base terrain; The output module is configured to adjust the fusion strategy and regenerate the fused terrain when the current fusion situation does not meet the constraints, until the constraints are met and the region fusion parameters are output. The region fusion parameters are the fusion parameters of the target region and the region to be fused, and the region fusion parameters include the fusion strategy and / or the fused terrain.
14. A computing device, characterized in that, include: Memory, processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the method according to any one of claims 1-12.
15. A computer-readable storage medium storing computer instructions, characterized in that, When executed by a processor, the computer instructions implement the steps of the method according to any one of claims 1-12.
Citation Information
Patent Citations
Terrain and ground feature construction system and method based on satellite remote sensing and unmanned aerial vehicle aerial photography
CN121074275A