A method, device, computer device, and storage medium for splicing topographic regions

By determining the position to be spliced ​​in multiple terrain areas to be spliced ​​and performing splicing processing in preset order, the problem of low splicing efficiency in the prior art is solved, and efficient terrain area splicing without manual intervention is achieved.

CN114565546BActive Publication Date: 2025-06-27BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210190716.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2025-06-27
Estimated Expiration
2042-02-28

AI Technical Summary

Technical Problem

The prior art is less efficient when splicing multiple terrain areas and requires manual intervention to select splicing areas.

Method used

By determining multiple positions to be spliced ​​corresponding to the multiple terrain areas to be spliced, and performing splicing processing in the preset splicing order, the terrain patch data is updated, and the spliced ​​terrain area is generated.

Benefits of technology

The orderly splicing of multiple areas in the scene can be achieved without manual intervention, and the splicing efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114565546B_ABST
    Figure CN114565546B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, apparatus, computer device and storage medium for stitching topographic regions. The method includes: in response to a target stitching requirement, determining a plurality of positions to be stitched corresponding to a plurality of topographic regions to be stitched; selecting a current position to be stitched from the plurality of positions to be stitched according to a preset stitching order, performing stitching processing on a first topographic region to be stitched and a second topographic region to be stitched associated with the current position to be stitched, and updating the topographic patch data corresponding to the current position to be stitched based on the obtained stitching processing result; in response to obtaining the topographic patch data corresponding to the plurality of positions to be stitched respectively, generating a stitched topographic region after stitching the plurality of topographic regions to be stitched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for splicing terrain regions. Background Art

[0002] In application scenarios such as games, there is a need to construct a scene. For example, in the construction of a game scene. Since the scene is generally large, it is usually determined to divide the scene into multiple regions based on the preset size of the scene. After designing the terrain and the like for each region, the multiple regions are spliced to obtain the final scene for rendering and display.

[0003] In some possible cases, in order to splice multiple regions to construct a scene, usually two regions to be spliced are selected each time according to the positions of the multiple regions in the scene, and new two regions to be spliced are continuously determined according to the splicing result, and then all regions in the scene are spliced; however, this method has the problem of low splicing efficiency. Summary of the Invention

[0004] Embodiments of the present disclosure at least provide a method, an apparatus, a computer device, and a storage medium for splicing terrain regions.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for splicing terrain regions, including: in response to a target splicing requirement, determining a plurality of positions to be spliced corresponding to a plurality of terrain regions to be spliced; according to a preset splicing order, selecting a current position to be spliced from the plurality of positions to be spliced, performing splicing processing on a first terrain region to be spliced and a second terrain region to be spliced associated with the current position to be spliced, and updating terrain patch data corresponding to the current position to be spliced based on the obtained splicing result; in response to obtaining terrain patch data corresponding to each of the plurality of positions to be spliced, generating a spliced terrain region after splicing the plurality of terrain regions to be spliced.

[0006] In an optional implementation manner, the following method is used to determine the target splicing requirement: determining a spliced terrain template and a plurality of terrain regions to be spliced; the spliced terrain template includes a plurality of placement positions for placing the terrain regions to be spliced, and the positions to be spliced are included between adjacent placement positions; determining the placement manners of the plurality of terrain regions to be spliced under the plurality of placement positions.

[0007] In an alternative implementation, the following method is used to determine multiple terrain regions to be spliced: in response to the existence of an empty first placement position among the multiple placement positions, obtain the first terrain region to be placed at the first placement position as the terrain region to be spliced; or, in response to the existence of a second terrain region with updated terrain data among the multiple placement positions, use the second terrain region after updating the terrain data as the terrain region to be spliced; or, in response to determining corresponding terrain attribute information for each of the multiple placement positions, determine the terrain regions to be spliced placed at each of the multiple placement positions based on the terrain attribute information.

[0008] In an alternative implementation, before determining the terrain regions to be spliced placed at each of the multiple placement positions based on the corresponding terrain attribute information determined for each of the multiple placement positions, the method further includes: determining a preset variety of the terrain attribute information and at least one third terrain region corresponding to each type of the terrain attribute information; the step of determining the terrain regions to be spliced placed at each of the multiple placement positions based on the corresponding terrain attribute information determined for each of the multiple placement positions includes: for each placement position among the multiple placement positions, determine a target third terrain region from at least one third terrain region corresponding to the terrain attribute information determined for this placement position, and use the target third terrain region as the terrain region to be spliced placed at this placement position.

[0009] In an alternative implementation, determining the placement manner of the multiple terrain regions to be spliced under the multiple placement positions includes: determining the first target placement positions respectively corresponding to the multiple terrain regions to be spliced under the multiple placement positions; for each terrain region to be spliced among the multiple terrain regions to be spliced, determine the placement manner of this terrain region to be spliced under the corresponding first target placement position based on the geographical element attribute information within this terrain region to be spliced.

[0010] In an alternative implementation, the method further includes: for each splicing position among the multiple splicing positions, determine two second target placement positions adjacent to this splicing position, and use the terrain regions placed at the two second target placement positions respectively as the first terrain region to be spliced and the second terrain region to be spliced associated with the current splicing position.

[0011] In an alternative embodiment, splicing processing is performed on a first to-be-spliced terrain area and a second to-be-spliced terrain area associated with the current to-be-spliced position to obtain a splicing processing result, including: determining a first splicing boundary in the first to-be-spliced terrain area and a second splicing boundary in the second to-be-spliced terrain area based on the current splicing position; and performing splicing processing on the first to-be-spliced terrain area and the second to-be-spliced terrain area based on the first splicing boundary and the second splicing boundary to obtain the splicing processing result.

[0012] In a second aspect, an embodiment of the present disclosure further provides a splicing device for terrain areas, including: a determining module, configured to determine a plurality of to-be-spliced positions corresponding to a plurality of to-be-spliced terrain areas in response to a target splicing requirement; a splicing module, configured to select a current to-be-spliced position from the plurality of to-be-spliced positions according to a preset splicing order, perform splicing processing on a first to-be-spliced terrain area and a second to-be-spliced terrain area associated with the current to-be-spliced position, and update terrain patch data corresponding to the current to-be-spliced position based on the obtained splicing processing result; and a generating module, configured to generate a spliced terrain area after splicing the plurality of to-be-spliced terrain areas in response to obtaining terrain patch data corresponding to the plurality of to-be-spliced positions respectively.

[0013] In an alternative embodiment, the determining module may further determine the target splicing requirement by using the following method: determining a spliced terrain template and a plurality of to-be-spliced terrain areas; the spliced terrain template includes a plurality of placement positions for placing the to-be-spliced terrain areas, and the to-be-spliced positions are included between adjacent placement positions; and determining placement manners of the plurality of to-be-spliced terrain areas under the plurality of placement positions.

[0014] In an alternative embodiment, the determining module may further determine the plurality of to-be-spliced terrain areas in the following manner: in response to there being an empty first placement position among the plurality of placement positions, obtaining a first terrain area to be placed at the first placement position as the to-be-spliced terrain area; or, in response to there being a second terrain area with updated terrain data among the plurality of placement positions, using the second terrain area after updating the terrain data as the to-be-spliced terrain area; or, in response to determining corresponding terrain attribute information for the plurality of placement positions respectively, determining the to-be-spliced terrain areas respectively placed in the plurality of placement positions based on the terrain attribute information.

[0015] In an alternative embodiment, before determining the topographic regions to be pieced together that are respectively placed in the plurality of placement positions based on the topographic attribute information in response to determining the corresponding topographic attribute information for the plurality of placement positions, the determining module may further be configured to: determine a plurality of preset topographic attribute information and at least one third topographic region corresponding to each of the topographic attribute information; when the determining module determines the topographic regions to be pieced together that are respectively placed in the plurality of placement positions based on the topographic attribute information in response to determining the corresponding topographic attribute information for the plurality of placement positions, it is configured to: for each placement position in the plurality of placement positions, based on the topographic attribute information determined for this placement position, determine a target third topographic region from at least one third topographic region corresponding to the topographic attribute information, and use the target third topographic region as the topographic region to be pieced together placed in this placement position.

[0016] In an alternative embodiment, when the determining module determines the placement manners of the plurality of topographic regions to be pieced together under the plurality of placement positions, it is configured to: determine the first target placement positions respectively corresponding to the plurality of topographic regions to be pieced together under the plurality of placement positions; for each topographic region to be pieced together among the plurality of topographic regions to be pieced together, based on the geographical element attribute information within this topographic region to be pieced together, determine the placement manner of this topographic region to be pieced together under the corresponding first target placement position.

[0017] In an alternative embodiment, the piecing device further includes a processing module, configured to: for each of the plurality of positions to be pieced together, determine two second target placement positions adjacent to this position to be pieced together, and use the topographic regions respectively placed at the two second target placement positions as the first topographic region to be pieced together and the second topographic region to be pieced together associated with the current position to be pieced together.

[0018] In an alternative embodiment, when the piecing module performs piecing processing on the first topographic region to be pieced together and the second topographic region to be pieced together associated with the current position to be pieced together to obtain a piecing processing result, it is configured to: based on the current piecing position, determine a first piecing boundary in the first topographic region to be pieced together and determine a second piecing boundary in the second topographic region to be pieced together; based on the first piecing boundary and the second piecing boundary, perform piecing processing on the first topographic region to be pieced together and the second topographic region to be pieced together to obtain the piecing processing result.

[0019] In a third aspect, an optional implementation of the present disclosure further provides a computer device, including a processor and a memory. The memory stores machine-readable instructions executable by the processor. The processor is configured to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the steps in the first aspect or any possible implementation manner in the first aspect are executed.

[0020] In a fourth aspect, an optional implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run, the steps in the first aspect or any possible implementation manner in the first aspect are executed.

[0021] For the effect description of the above terrain area splicing device, computer device, and computer-readable storage medium, refer to the description of the above terrain area splicing method, which will not be elaborated here.

[0022] A terrain area splicing method, device, computer device, and storage medium provided by an embodiment of the present disclosure can determine a plurality of positions to be spliced for a plurality of terrain areas to be spliced, then determine the current position to be spliced according to a preset splicing order, perform splicing processing on a first terrain area to be spliced and a second terrain area to be spliced associated with the current position to be spliced, and determine the next position to be spliced after the splicing is completed, so as to achieve the orderly splicing of multiple areas in the scene without manual intervention. Therefore, the splicing efficiency is relatively high in this way.

[0023] To make the above objects, features, and advantages of the present disclosure more obvious and understandable, the following specific embodiments are given in conjunction with the accompanying drawings and are described in detail as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the embodiments will be briefly introduced below. The drawings here are incorporated into the specification and constitute a part of this specification. These drawings show embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only show some embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0025] Figure 1 The flowchart of a terrain area splicing method provided by an embodiment of the present disclosure is shown;

[0026] Figure 2 The schematic diagram of a spliced terrain template provided by an embodiment of the present disclosure is shown;

[0027] Figure 3 Shows a schematic diagram of different placement methods determined for a terrain area to be spliced provided by an embodiment of the present disclosure;

[0028] Figure 4 Shows a schematic diagram of a splicing device for a terrain area provided by an embodiment of the present disclosure;

[0029] Figure 5 Shows a schematic diagram of a computer device provided by an embodiment of the present disclosure. Detailed implementation manners

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are only some of the embodiments of the present disclosure, rather than all of the embodiments. Usually, the components of the embodiments of the present disclosure described and illustrated herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the claimed present disclosure, but merely represents selected embodiments of the present disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative efforts fall within the scope of protection of the present disclosure.

[0031] It has been found through research that when constructing a scene, since the size of the scene is generally large, the scene is divided into multiple regions, and the terrains of the multiple regions are spliced later to obtain the scene. In some possible cases, through manual screening, two adjacent regions are selected for splicing according to the positions of the multiple regions in the scene respectively, and two adjacent regions are selected again for splicing after splicing. This splicing method relies on experience and requires manual selection of two regions each time splicing is performed, so the efficiency is low during splicing.

[0032] In addition, for the regions in the scene, when splicing the regions, the upstream task includes terrain design for the regions, and the downstream task includes splicing processing of the terrain. In some possible cases, since the terrain is editable in the upstream task, when splicing multiple regions in the scene, it is also necessary to manually confirm whether there are regions with data updates in the spliced regions and perform re-splicing with adjacent regions, which also results in low efficiency during region splicing.

[0033] Based on the above research, the present disclosure provides a method for splicing terrain regions. After determining a plurality of positions to be spliced for a plurality of terrain regions to be spliced, the current position to be spliced can be determined according to a preset splicing order, and the first terrain region to be spliced and the second terrain region to be spliced associated with the current position to be spliced are subjected to splicing processing. After the splicing is completed, the next position to be spliced is determined, so as to achieve the orderly splicing of multiple regions in the scene without manual intervention. Therefore, the splicing efficiency is relatively high in this way.

[0034] In addition, for regions where data may be updated in the upstream task, the splicing method provided by the present disclosure will directly identify the regions where data is updated as terrain regions to be spliced, and continue to splice them with adjacent regions according to the preset splicing order, without the need for manual confirmation. Therefore, the splicing efficiency can also be improved.

[0035] Regarding the defects existing in the above solutions, they are all the results obtained by the inventors through practice and careful research. Therefore, the process of discovering the above problems and the solutions proposed by the present disclosure below for the above problems should all be the contributions made by the inventors to the present disclosure during the process of the present disclosure.

[0036] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0037] To facilitate the understanding of this embodiment, first, a method for splicing terrain regions disclosed in the embodiments of the present disclosure will be introduced in detail. The execution subject of the method for splicing terrain regions provided in the embodiments of the present disclosure is generally a computer device with certain computing capabilities. Such a computer device includes, for example: a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementation manners, the method for splicing terrain regions may be implemented by a processor calling computer-readable instructions stored in a memory.

[0038] The splicing method of the terrain area provided by the embodiments of the present disclosure can be applied to scenarios such as the game field and the production of animation and film and television. For example, in the game field, it is applied to the production of game scenes, or in the production scene of animation and film and television, it is applied to the production of animation scenes. In a specific implementation, a game scene or an animation scene, etc., is used as the spliced terrain area described in the embodiments of the present disclosure. Since the spliced terrain area is generally large, for example, the design size is 10 kilometers × 10 kilometers, in order to obtain the spliced terrain area, the spliced terrain area will be divided into multiple areas with smaller sizes, for example, areas with a size of 10 meters × 10 meters are obtained. Here, the size of the division is not limited, and the division method is not limited. In the case of obtaining multiple areas of the designed terrain, by splicing adjacent areas among them, a spliced terrain area obtained by splicing multiple areas can be obtained.

[0039] The splicing method of the terrain area provided by the embodiments of the present disclosure will be described below.

[0040] See Figure 1 As shown, it is a flowchart of a splicing method of a terrain area provided by an embodiment of the present disclosure. The method includes steps S101 to S103, where:

[0041] S101: In response to a target splicing requirement, determine a plurality of positions to be spliced corresponding to a plurality of terrain areas to be spliced;

[0042] S102: According to a preset splicing order, select a current position to be spliced from the plurality of positions to be spliced, perform splicing processing on a first terrain area to be spliced and a second terrain area to be spliced associated with the current position to be spliced, and update the terrain patch data corresponding to the current position to be spliced based on the obtained splicing processing result;

[0043] S103: In response to obtaining the terrain patch data corresponding to the plurality of positions to be spliced respectively, generate a spliced terrain area obtained by splicing the plurality of terrain areas to be spliced.

[0044] The above S101 to S103 will be described in detail below.

[0045] Regarding the above S101, the target splicing requirement will be described first. In the embodiments of the present disclosure, in order to realize the automatic splicing of multiple areas in a scene, the terrain areas to be spliced in the multiple areas divided in the scene and the positions of the multiple terrain areas to be spliced in the scene are selected first, and then the determined positions are used to splice the multiple terrain areas to realize the splicing construction of the scene.

[0046] In a specific implementation, the following method can be used to determine the target splicing requirement: determine a splicing terrain template and multiple terrain areas to be spliced; the splicing terrain template includes multiple placement positions for placing the terrain areas to be spliced, and the splicing positions are included between adjacent placement positions; determine the placement methods of the multiple terrain areas to be spliced under the multiple placement positions.

[0047] First, an explanation is given for determining the splicing terrain template. Among them, the splicing terrain template specifically includes multiple placement positions that can determine the positions of multiple terrain areas to be spliced in the scene. The adjacent relationship between the placement positions also expresses the adjacent relationship between multiple terrain areas. Therefore, the splicing positions for splicing the terrain areas to be spliced can be determined between adjacent placement positions. Refer to Figure 2 As shown, it is a schematic diagram of a splicing terrain template provided by an embodiment of the present disclosure; among them, the number and arrangement form of multiple placement positions in the splicing terrain template are not limited. In the example in this schematic diagram, it specifically includes 9 placement positions, each placement position is represented by a dotted line box, and is arranged in a 3×3 arrangement; for a more intuitive description in the following examples, the 9 placement positions are numbered from 1 to 9.

[0048] Specifically, when determining the splicing terrain template of the scene, in one possible case, the splicing terrain template can be a template proprietary to a certain scene. Then, when determining the terrain splicing template of the scene, the number and arrangement form of multiple placement positions therein can be determined according to the actual division of the terrain area in the scene. In another possible case, a splicing terrain template with more placement positions can also be pre-constructed. After determining the scene, the multiple terrain areas to be spliced after being segmented can be corresponding placed in the appropriate placement positions in the splicing terrain template. In this way, it is also possible to avoid repeatedly constructing different splicing terrain templates for different scenes.

[0049] Secondly, an explanation is given for determining the terrain areas to be spliced. The terrain areas to be spliced that can be placed in the placement positions actually include some or all of the terrain areas divided by the scene. Since the terrain areas to be spliced actually exist in the form of data before rendering, the placement here and in the following descriptions actually refers to associating the data of the terrain areas with the corresponding placement positions.

[0050] In a specific implementation, the multiple terrain areas to be spliced can be determined by but not limited to the following three methods a-c:

[0051] a. Use the first terrain area to be placed at the first empty placement position in the splicing terrain template as the terrain area to be spliced.

[0052] In a possible situation, for the case where any two adjacent terrain regions in the scene have not been joined yet, a corresponding terrain joining model has been determined for the scene, but the terrain regions have not been placed in multiple placement positions in the terrain joining model. In this case, it is possible to determine one by one whether there is a first terrain region to be placed corresponding to each placement position, and use the obtainable first terrain regions to be placed as the terrain regions to be joined.

[0053] b. There is a second terrain region where terrain data is updated in the upstream task. Use the second terrain region after updating the terrain data as the terrain region to be joined.

[0054] Specifically, for terrain regions, terrain design can be carried out in the upstream task and joining processing with other adjacent regions can be carried out in the downstream task. Therefore, when joining terrain regions in the downstream task, it may occur that in the upstream task, data is updated for the terrain regions to be placed or joined in the downstream, or the terrain regions that have already been joined. For the terrain regions to be placed, the second terrain region after updating the terrain data can be directly used as the terrain data to be joined in the same way as determining the terrain region to be joined in the above method a. For the latter two cases, the terrain regions to be joined can be updated according to the method of determining the terrain region to be joined in method b, or the placement position where the terrain region that has already been joined is located can be updated to the second terrain region after updating the terrain data and used as the terrain region to be joined.

[0055] c. Determine the terrain data to be joined corresponding to each of the multiple placement positions according to the terrain attribute information determined for each of the multiple placement positions.

[0056] In a possible situation, the size of the scene is large, and there may be some partial regions with similar or identical terrain features among the multiple segmented regions. For example, within a large range in the scene, there are 10 regions, and all 10 regions represent a lake. Since the terrain features representing the lake in each region are identical, the third terrain region corresponding to this terrain feature can be determined according to the terrain features corresponding to these 10 regions and used as the terrain region to be joined placed in the corresponding placement position.

[0057] Therefore, in this case, it is possible to pre-determine the terrains corresponding to more regions and determine the corresponding terrain attribute information according to these terrains. For example, there may be many regions in the scene involving sandy land, glaciers, lakes, etc. Different terrains have different corresponding terrain attribute information, which can be specifically expressed as sandy land type, glacier type, lake type, etc. Or each type of terrain can be further refined. For example, under the sandy land type, it can be further refined into desert sandy land or beach sandy land.

[0058] After determining a variety of preset terrain attribute information, at least one corresponding third terrain area can also be designed according to the determined variety of terrain attribute information. For some or all areas in the scene, the terrain corresponding to different areas can be determined first, and then the terrain attribute information corresponding to the terrain can be associated with the area according to the terrain corresponding to each area. Therefore, when determining the to-be-pieced terrain areas respectively placed in multiple placement positions for the pieced terrain template, the target third terrain area can be determined from at least one third terrain area corresponding to the terrain attribute information pre-generated and corresponding to the area associated with the placement position, as the to-be-pieced terrain area.

[0059] In a possible case, if multiple third terrain areas are determined corresponding to the terrain attribute information, when there are more areas corresponding to the terrain data information in the scene, for example, different third terrain areas can be randomly determined for multiple areas, so that the scene obtained after piecing can reduce repetitiveness in these areas, reflect more landform features, and also improve the authenticity of the scene. In this way, by first determining the corresponding terrain attribute information for multiple areas in the scene in the way of manual selection, and then automatically calling the corresponding third terrain area according to the terrain attribute information, it is also more convenient and easy to operate, and can further improve the efficiency of piecing the areas.

[0060] Here, the above three possible ways of determining the to-be-pieced terrain area can be selected according to the actual situation, and the specific selection method is not limited here.

[0061] In the case of determining multiple to-be-pieced terrain areas, the corresponding multiple to-be-pieced positions can be determined according to the position of each to-be-pieced area in the pieced terrain template. Exemplarily, for the pieced terrain template shown in Figure 2 , at the placement positions 1, 3, 6, and 9 at the four corners, there are two corresponding to-be-pieced positions. At the placement positions 2, 4, 6, and 8 on the four sides, there are three corresponding to-be-pieced positions. At the placement position 5 in the center, there are 4 corresponding to-be-pieced positions. Among them, in the legend, the to-be-pieced positions between the placement positions are represented by short solid lines; two adjacent to-be-pieced terrain areas can correspond to the same to-be-pieced position.

[0062] Then, the placement methods of multiple terrain regions to be spliced under the multiple placement positions are described. In a specific implementation, for example, the following method can be used to determine the placement positions of multiple terrain regions to be spliced: determine the first target placement positions corresponding to the multiple terrain regions to be spliced under the multiple placement positions respectively; for each terrain region to be spliced among the multiple terrain regions to be spliced, based on the geographical element attribute information within the terrain region to be spliced, determine the placement method of the terrain region to be spliced under the corresponding first target placement position.

[0063] Specifically, taking any one of the multiple terrain regions to be spliced as an example, according to the position of the terrain region to be spliced in the scene, the first target placement position of the terrain region to be spliced in the spliced terrain template can be correspondingly determined according to the position occupied by the scene in the spliced terrain template. For the terrain region to be spliced, there is also a placement method in the spliced terrain template, which specifically includes the relative orientation of the terrain region to be spliced with respect to the spliced terrain template.

[0064] For example, in the scene, there may be regions that describe the terrain by direction. For example, for a river flowing from north to south, in multiple consecutive regions containing the river, the water flow direction is from north to south. When designing the regions, the water flow from north to south will also be followed to design terrain features that conform to geographical rules. Therefore, after determining the first placement position corresponding to the terrain region to be spliced, it is also necessary to determine the placement method of the region so that the spliced scene will not violate geographical rules. For example, in the regions associated with the river flowing from north to south, there is a region with an incorrect placement method, resulting in a fault in the river, and thus the spliced scene does not conform to logic. Here, for example, information that can reflect the river flow direction or the undulation characteristics of mountains and can affect the placement method of the terrain region to be spliced is referred to as the geographical element attribute information of the terrain region to be spliced in the embodiments of the present disclosure.

[0065] Exemplarily, refer to Figure 3 shown in the figure, which is a schematic diagram of different placement methods determined for a terrain region to be spliced provided by an embodiment of the present disclosure. For the convenience of description, the positions to be spliced are not shown. Among them, the terrain region to be spliced is the region under the placement position labeled 5, and the other placement positions under the spliced terrain template have placed the corresponding regions in the correct placement method. In Figure 3 (a), the placement method of the terrain region to be spliced is determined according to the geographical element attribute information, and correspondingly, it can represent that the river flows from north to south. And in Figure 3In Figure (b), if the placement of the terrain areas to be spliced is not determined according to the geographical element attribute information, when the river is shown flowing from north to south in the scene, there will be a sudden situation where the river flows from west to east in the middle. Since this violates the geographical rules, the authenticity of the scene will be lacking.

[0066] For the above S102, when the target splicing requirements and multiple positions to be spliced are determined, the splicing process of the first terrain area to be spliced and the second terrain area to be spliced associated with the positions to be spliced can be carried out.

[0067] In specific implementation, since multiple positions to be spliced are usually arranged horizontally or vertically, when selecting the current position to be spliced, for example, it can be carried out in the preset splicing order of first vertical and then horizontal, or first horizontal and then vertical. Specifically, it can also be determined according to the actual computing power of the computer to splice the first terrain area to be spliced and the second terrain area to be spliced associated with multiple groups of positions to be spliced in one splicing process, which can be determined according to the actual situation and will not be elaborated here.

[0068] Among them, when specifically determining the first terrain area to be spliced and the second terrain area to be spliced associated with the position to be spliced, the following method can be adopted: for each position to be spliced among the multiple positions to be spliced, determine the two second target placement positions adjacent to the position to be spliced, and use the terrain areas placed at the two second target placement positions as the first terrain area to be spliced and the second terrain area to be spliced associated with the current position to be spliced respectively.

[0069] Exemplarily, taking Figure 2 as an example, for the position to be spliced marked therein, two adjacent placement positions can be determined, including placement position 1 and placement position 2, and they are determined as the first terrain area to be spliced and the second terrain area to be spliced associated with the position to be spliced. Here, when associating the position to be spliced with the first terrain area to be spliced and the second terrain area to be spliced, for example, the reference paths respectively corresponding to the first terrain area to be spliced and the second terrain area to be spliced in the memory can be associated with the position to be spliced; when carrying out the splicing process on the first terrain area to be spliced and the second terrain area to be spliced associated with the position to be spliced, the computer device can obtain the area model information respectively corresponding to the first terrain area to be spliced and the second terrain area to be spliced in the memory through the associated reference paths, and then carry out the splicing process.

[0070] In a specific implementation, when splicing the first to-be-spliced terrain area and the second to-be-spliced terrain area, the following method can be specifically adopted: Based on the current splicing position, determine a first splicing boundary in the first to-be-spliced terrain area, and determine a second splicing boundary in the second to-be-spliced terrain area; Based on the first splicing boundary and the second splicing boundary, perform splicing processing on the first to-be-spliced terrain area and the second to-be-spliced terrain area to obtain the splicing processing result.

[0071] Specifically, according to the above-mentioned placement method of determining the to-be-spliced terrain area in the corresponding first target placement position, when splicing multiple to-be-spliced terrain areas, it is necessary to determine the splicing boundaries corresponding to the splicing at the to-be-spliced position. Since this embodiment of the present disclosure specifically involves splicing two adjacent to-be-spliced areas, each to-be-spliced terrain area in the two to-be-spliced areas needs to determine the boundary when splicing with the other to-be-spliced terrain area. In the case of determining the first splicing boundary to be spliced in the first to-be-spliced terrain area and the second splicing boundary to be spliced in the second to-be-spliced terrain area, the first splicing boundary and the second splicing boundary can be used to perform splicing processing on the first to-be-spliced terrain area and the second to-be-spliced terrain area to obtain the splicing processing result. Among them, the method of performing splicing processing on the first to-be-spliced terrain area and the second to-be-spliced terrain area can be selected according to the actual situation and is not limited here.

[0072] Here, since a to-be-spliced terrain area may have multiple to-be-spliced positions, after splicing with an adjacent terrain area once, it may be necessary to splice other to-be-spliced positions. Therefore, the obtained splicing processing result can be cached in the form of patch data, for example, and then rendered after all to-be-spliced positions of this terrain area have been spliced.

[0073] For the above S103, for the determined multiple to-be-spliced terrain areas, if the terrain patch data corresponding to the multiple to-be-spliced positions are determined, the terrain patch data can be used to generate a spliced terrain area after splicing the multiple to-be-spliced terrain areas. Further, after rendering and displaying the spliced terrain area, the corresponding scene can be displayed, and such a scene can be applied to the production of game scenes or animation scenes.

[0074] A method, apparatus, computer device, and storage medium for splicing terrain regions provided by the present disclosure can determine multiple splicing positions for multiple terrain regions to be spliced, and then determine the current splicing position according to a preset splicing order, and perform splicing processing on the first terrain region to be spliced and the second terrain region to be spliced associated with the current splicing position, and determine the next splicing position after the splicing is completed, so as to achieve the orderly splicing of multiple regions in the scene without manual intervention. Therefore, the splicing efficiency is relatively high in this way.

[0075] Those skilled in the art can understand that in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order and does not constitute any limitation to the implementation process. The specific execution order of each step should be determined according to its function and possible internal logic.

[0076] Based on the same inventive concept, the present disclosure also provides a terrain region splicing apparatus corresponding to the terrain region splicing method in the embodiments of the present disclosure. Since the principle of solving problems by the apparatus in the embodiments of the present disclosure is similar to the above terrain region splicing method in the embodiments of the present disclosure, the implementation of the apparatus can refer to the implementation of the method, and the repeated parts will not be elaborated.

[0077] Refer to Figure 4 As shown, it is a schematic diagram of a terrain region splicing apparatus provided by an embodiment of the present disclosure. The apparatus includes: a determination module 41, a splicing module 42, and a generation module 43; wherein,

[0078] The determination module 41 is configured to determine multiple splicing positions corresponding to multiple terrain regions to be spliced in response to a target splicing requirement;

[0079] The splicing module 42 is configured to select the current splicing position from the multiple splicing positions according to a preset splicing order, perform splicing processing on the first terrain region to be spliced and the second terrain region to be spliced associated with the current splicing position, and update the terrain patch data corresponding to the current splicing position based on the obtained splicing processing result;

[0080] The generation module 43 is configured to generate a spliced terrain region after splicing the multiple terrain regions to be spliced in response to obtaining the terrain patch data corresponding to the multiple splicing positions respectively.

[0081] In an optional implementation manner, the determination module 41 can also determine the target splicing requirement by using the following method: determining a spliced terrain template and multiple terrain regions to be spliced; the spliced terrain template includes multiple placement positions for placing the terrain regions to be spliced, and the splicing positions are included between adjacent placement positions; determining the placement methods of the multiple terrain regions to be spliced under the multiple placement positions.

[0082] In an alternative embodiment, the determining module 41 may also determine multiple terrain regions to be spliced in the following manner: in response to the existence of an empty first placement position among the multiple placement positions, obtain the first terrain region to be placed at the first placement position as the terrain region to be spliced; or, in response to the existence of a second terrain region for which the terrain data is updated among the multiple placement positions, use the second terrain region after the terrain data is updated as the terrain region to be spliced; or, in response to determining corresponding terrain attribute information for each of the multiple placement positions, determine the terrain regions to be spliced respectively placed at the multiple placement positions based on the terrain attribute information.

[0083] In an alternative embodiment, before the determining module 41 determines the terrain regions to be spliced respectively placed at the multiple placement positions based on the corresponding terrain attribute information for each of the multiple placement positions, the determining module 41 may also be configured to: determine a preset variety of the terrain attribute information and at least one third terrain region corresponding to each of the terrain attribute information; when the determining module 41 determines the terrain regions to be spliced respectively placed at the multiple placement positions based on the corresponding terrain attribute information for each of the multiple placement positions, it is configured to: for each placement position among the multiple placement positions, determine a target third terrain region from at least one third terrain region corresponding to the terrain attribute information determined for this placement position based on the terrain attribute information, and use the target third terrain region as the terrain region to be spliced placed at this placement position.

[0084] In an alternative embodiment, when the determining module 41 determines the placement manners of the multiple terrain regions to be spliced under the multiple placement positions, it is configured to: determine the first target placement positions respectively corresponding to the multiple terrain regions to be spliced under the multiple placement positions; for each terrain region to be spliced among the multiple terrain regions to be spliced, determine the placement manner of this terrain region to be spliced under the corresponding first target placement position based on the geographical element attribute information within this terrain region to be spliced.

[0085] In an alternative embodiment, the splicing device further includes a processing module 44, configured to: for each splicing position among the multiple splicing positions, determine two second target placement positions adjacent to this splicing position, and use the terrain regions placed at the two second target placement positions respectively as the first terrain region to be spliced and the second terrain region to be spliced associated with the current splicing position.

[0086] In an alternative embodiment, when the splicing module 42 performs splicing processing on the first to-be-spliced terrain area and the second to-be-spliced terrain area associated with the current to-be-spliced position to obtain a splicing processing result, it is used for: determining a first splicing boundary in the first to-be-spliced terrain area and a second splicing boundary in the second to-be-spliced terrain area based on the current splicing position; and performing splicing processing on the first to-be-spliced terrain area and the second to-be-spliced terrain area based on the first splicing boundary and the second splicing boundary to obtain the splicing processing result.

[0087] Descriptions of the processing flows of the various modules in the device and the interaction flows between the various modules can refer to the relevant descriptions in the above method embodiments and will not be elaborated here.

[0088] The embodiments of the present disclosure also provide a computer device, as Figure 5 shown, which is a schematic structural diagram of the computer device provided by the embodiments of the present disclosure, including:

[0089] a processor 10 and a memory 20; the memory 20 stores machine-readable instructions executable by the processor 10, and the processor 10 is used to execute the machine-readable instructions stored in the memory 20. When the machine-readable instructions are executed by the processor 10, the processor 10 executes the following steps:

[0090] In response to a target splicing requirement, determining a plurality of to-be-spliced positions corresponding to a plurality of to-be-spliced terrain areas; selecting a current to-be-spliced position from the plurality of to-be-spliced positions according to a preset splicing order, performing splicing processing on the first to-be-spliced terrain area and the second to-be-spliced terrain area associated with the current to-be-spliced position, and updating the terrain patch data corresponding to the current to-be-spliced position based on the obtained splicing processing result; and generating a spliced terrain area after splicing the plurality of to-be-spliced terrain areas in response to obtaining the terrain patch data corresponding to the plurality of to-be-spliced positions respectively.

[0091] The above-mentioned memory 20 includes an internal memory 210 and an external memory 220; here, the internal memory 210 is also called the main memory, which is used to temporarily store the operation data in the processor 10 and the data exchanged with the external memory 220 such as a hard disk. The processor 10 exchanges data with the external memory 220 through the internal memory 210.

[0092] The specific execution process of the above instructions can refer to the steps of the method for splicing terrain areas described in the embodiments of the present disclosure and will not be elaborated here.

[0093] Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the method for stitching terrain regions described in the above method embodiments. Among them, the storage medium may be a volatile or non-volatile computer-readable storage medium.

[0094] Embodiments of the present disclosure also provide a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the method for stitching terrain regions described in the above method embodiments. For details, reference can be made to the above method embodiments and will not be elaborated here.

[0095] Among them, the above computer program product can be specifically implemented in a manner of hardware, software, or a combination thereof. In an alternative embodiment, the computer program product is specifically embodied as a computer storage medium. In another alternative embodiment, the computer program product is specifically embodied as a software product, such as a Software Development Kit (SDK), etc.

[0096] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here. In the several embodiments provided by the present disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. Also, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces. The indirect coupling or communication connection of the devices or units can be in an electrical, mechanical, or other form.

[0097] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0098] In addition, in each embodiment of the present disclosure, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0099] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present disclosure. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.

[0100] Finally, it should be noted that the above-mentioned embodiments are only specific implementation manners of the present disclosure, used to illustrate the technical solutions of the present disclosure, rather than limiting them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by the present disclosure can still modify the technical solutions recorded in the foregoing embodiments or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure and should all be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A method for splicing topographic regions, characterized in that, The splicing method includes: In response to a target splicing requirement, determining a plurality of positions to be spliced corresponding to a plurality of terrain areas to be spliced based on a splicing terrain template, where the target splicing requirement is determined according to the following steps: determining the splicing terrain template and the plurality of terrain areas to be spliced; the splicing terrain template includes a plurality of placement positions for placing the terrain areas to be spliced, and the positions to be spliced are included between adjacent placement positions; determining the placement methods of the plurality of terrain areas to be spliced under the plurality of placement positions; According to a preset splicing order, selecting a current position to be spliced from the plurality of positions to be spliced, performing splicing processing on a first terrain area to be spliced and a second terrain area to be spliced associated with the current position to be spliced, and updating the terrain patch data corresponding to the current position to be spliced based on the obtained splicing processing result; In response to obtaining the terrain patch data corresponding to the plurality of positions to be spliced respectively, generating a spliced terrain area after splicing the plurality of terrain areas to be spliced.

2. The method according to claim 1, wherein The following method is used to determine a plurality of terrain areas to be spliced: In response to the existence of a vacant first placement position among the plurality of placement positions, obtaining a first terrain area to be placed at the first placement position as the terrain area to be spliced; Or, In response to the existence of a second terrain area with updated terrain data among the plurality of placement positions, taking the second terrain area after updating the terrain data as the terrain area to be spliced; Or, In response to determining corresponding terrain attribute information for the plurality of placement positions respectively, determining the terrain areas to be spliced placed in the plurality of placement positions based on the terrain attribute information.

3. The method according to claim 2, wherein Before determining the terrain areas to be spliced placed in the plurality of placement positions based on the corresponding terrain attribute information for the plurality of placement positions respectively, the method further includes: Determining a preset variety of the terrain attribute information and at least one third terrain area corresponding to each type of the terrain attribute information; The step of determining the terrain areas to be spliced placed in the plurality of placement positions based on the corresponding terrain attribute information for the plurality of placement positions respectively includes: For each placement position among the plurality of placement positions, based on the terrain attribute information determined for this placement position, determining a target third terrain area from at least one third terrain area corresponding to the terrain attribute information, and taking the target third terrain area as the terrain area to be spliced placed in this placement position.

4. The method according to claim 1, characterized in that The step of determining the placement methods of the plurality of terrain areas to be spliced under the plurality of placement positions includes: Determining first target placement positions corresponding to the plurality of terrain areas to be spliced under the plurality of placement positions; For each terrain area to be spliced among the plurality of terrain areas to be spliced, based on the geographical element attribute information within this terrain area to be spliced, determining the placement method of this terrain area to be spliced under the corresponding first target placement position.

5. The method according to claim 1, wherein The method further includes: For each of the multiple positions to be spliced, determine two second target placement positions adjacent to each other at the position to be spliced, and use the terrain regions respectively placed at the two second target placement positions as the first terrain region to be spliced and the second terrain region to be spliced associated with the current position to be spliced.

6. The method according to claim 1, wherein Perform splicing processing on the first terrain region to be spliced and the second terrain region to be spliced associated with the current position to be spliced, and obtain a splicing processing result, including: Based on the current splicing position, determine a first splicing boundary in the first terrain region to be spliced and a second splicing boundary in the second terrain region to be spliced; Based on the first splicing boundary and the second splicing boundary, perform splicing processing on the first terrain region to be spliced and the second terrain region to be spliced to obtain the splicing processing result.

7. A splicing device for a terrain area, characterized in that, Including: A determination module, configured to, in response to a target splicing requirement, determine multiple positions to be spliced corresponding to multiple terrain regions to be spliced based on a spliced terrain template, where the target splicing requirement is determined according to the following steps: determine the spliced terrain template and the multiple terrain regions to be spliced; the spliced terrain template includes multiple placement positions for placing the terrain regions to be spliced, and the positions to be spliced are included between adjacent placement positions; determine the placement methods of the multiple terrain regions to be spliced under the multiple placement positions; A splicing module, configured to select a current position to be spliced from the multiple positions to be spliced in a preset splicing order, perform splicing processing on the first terrain region to be spliced and the second terrain region to be spliced associated with the current position to be spliced, and update the terrain patch data corresponding to the current position to be spliced based on the obtained splicing processing result; A generation module, configured to, in response to obtaining the terrain patch data corresponding to each of the multiple positions to be spliced, generate a spliced terrain region after splicing the multiple terrain regions to be spliced.

8. A computer device, characterized in that, Including: A processor and a memory, the memory stores machine-readable instructions executable by the processor, and the processor is configured to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor executes the steps of the method for splicing a terrain region according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is run by a computer device, the computer device executes the steps of the method for splicing a terrain region according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image processing method and device, computer equipment and storage medium

    CN112907451A

  • Image splicing method, device and system and storage medium

    CN113935900A