CN113744401A - Terrain splicing method and device, electronic equipment and storage medium - Google Patents

Terrain splicing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113744401A
CN113744401A CN202111057769.3A CN202111057769A CN113744401A CN 113744401 A CN113744401 A CN 113744401A CN 202111057769 A CN202111057769 A CN 202111057769A CN 113744401 A CN113744401 A CN 113744401A
Authority
CN
China
Prior art keywords
terrain
sub
target
spliced
splicing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111057769.3A
Other languages
Chinese (zh)
Inventor
杨基荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202111057769.3A priority Critical patent/CN113744401A/en
Publication of CN113744401A publication Critical patent/CN113744401A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/63Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by the player, e.g. authoring using a level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20004Adaptive image processing
    • G06T2207/20012Locally adaptive
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20128Atlas-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Remote Sensing (AREA)
  • Computer Graphics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a terrain splicing method, a terrain splicing device, electronic equipment and a storage medium, which relate to the technical field of computers and comprise the following steps: determining an overlapping area between the target sub-terrain and the sub-terrain to be spliced; cutting the sub-terrain to be spliced based on the overlapped area to obtain a target spliced sub-terrain; splicing and transforming the target splicing sub-landforms based on the height difference of the boundary edges of the target splicing sub-landforms and the target splicing sub-landforms; and carrying out expansion processing on the spliced and transformed target spliced sub-terrain to obtain a spliced terrain. Can be to the overlap region between the concatenation topography with this, tailor earlier, based on the difference in height between the terrain region after tailorring and carry out the concatenation transform to the terrain region after the transform carries out expansion processing, makes the transition region more natural through above-mentioned method, and there is not obvious seam, and visual experience is better, and the simple operation.

Description

Terrain splicing method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a terrain splicing method and device, electronic equipment and a storage medium.
Background
In the process of editing the terrain of a game scene, because the scale of the terrain is usually large, multiple people can be allowed to edit on a single terrain at the same time, but the simultaneous editing of multiple people easily causes resource updating conflict in the updating process, and management confusion is easily caused.
However, in the existing terrain splicing method, the square structures are only combined together, and the splicing area is excessively rigid and unnatural, so that the visual experience is poor.
Disclosure of Invention
In view of the above, the present invention provides a terrain stitching method, so as to alleviate the technical problem that the map transition after the completion of the stitching is unnatural in the existing terrain stitching method.
In a first aspect, an embodiment of the present invention provides a terrain splicing method, including: determining an overlapping area between the target sub-terrain and the sub-terrain to be spliced; cutting the sub-terrain to be spliced based on the overlapped area to obtain a target spliced sub-terrain; splicing and transforming the target splicing sub-landforms based on the height difference of the boundary edges of the target splicing sub-landforms and the target splicing sub-landforms; and carrying out expansion processing on the spliced and transformed target spliced sub-terrain to obtain a spliced terrain.
In some optional implementations, determining an overlap region between the target sub-terrain and the sub-terrain to be spliced comprises:
projecting the edge line of the target sub-terrain onto the sub-terrain to be spliced to obtain a projected edge line;
and determining the area of one side, which is enclosed by the projection edge line and the sub-terrain to be spliced and is close to the target sub-terrain, as an overlapping area.
In some optional implementations, the stitching transformation of the target stitching sub-terrain based on the height difference of the boundary edge of the target stitching sub-terrain comprises:
determining the height difference of the boundary edge of the target sub-terrain and the target splicing sub-terrain;
determining a height transformation value of a sampling point on the target splicing sub-terrain based on the distance between the sampling point on the target splicing sub-terrain and the edge boundary line, wherein the closer the distance between the sampling point on the target splicing sub-terrain and the edge boundary line is, the closer the height transformation value is to the height difference;
and carrying out splicing transformation on the sampling points on the target splicing sub-terrain based on the height transformation values.
In some optional implementations, performing a stitching transformation on the sampling points on the target stitching sub-terrain based on the elevation transformation value includes:
and performing interpolation mixing on the target sub-terrain and the target splicing sub-terrain based on the height transformation value by using the mixed mask to obtain the sampling points after splicing transformation on the target splicing sub-terrain.
In some alternative implementations, the sampling points include location information and mapping information; and determining the changed position information and the changed mapping information of the splicing sampling points on the target splicing sub-terrain through difference value mixing.
In some alternative implementations, determining a height transform value for a sample point on the target stitching sub-terrain based on a distance between the sample point and the edge boundary line on the target stitching sub-terrain comprises:
determining a preset transformation amplitude value;
and determining the height transformation value of the sampling point on the target splicing sub-terrain based on the preset transformation amplitude value and the distance between the sampling point on the target splicing sub-terrain and the edge boundary line.
In some optional implementations, the method further comprises:
determining a new transform amplitude value in response to a set operation for the transform amplitude value;
and adjusting the height transformation value of the sampling point on the target splicing sub-terrain based on the new transformation amplitude value.
In some optional implementations, determining a new transform amplitude value in response to the set operation for the transform amplitude value comprises:
responding to a dragging operation aiming at a sampling point on the target splicing sub-terrain, and determining the displacement of the dragging operation; a new transform amplitude value is determined based on the magnitude of the displacement.
In some optional implementations, performing expansion processing on the spliced transformed target spliced sub-terrain to obtain a spliced terrain, including:
performing at least one expansion processing on a first target area in the spliced and transformed target splicing sub-terrain to obtain an expanded first target area;
the spliced terrain comprises a target sub-terrain and a stretched target splicing sub-terrain, and the stretched target splicing sub-terrain comprises a first target area.
In some optional implementations, performing at least one expansion process on a first target area in the target splice sub-terrain after the splice transformation includes:
determining expansion parameters, wherein the expansion parameters comprise expansion times and expansion distance;
and carrying out at least one expansion treatment on the first target area in the spliced and transformed target spliced sub-terrain based on the expansion parameters.
In some alternative implementations, the number of times of rubbing is determined based on a distance between a sampling point of the target sub-terrain and a sampling point on the spliced transformed target spliced sub-terrain.
In some alternative implementations, the number of topographies is determined based on the intensity of the LOD.
In a second aspect, a terrain splicing apparatus is also provided. The method comprises the following steps: the determining module is used for determining an overlapping area between the target sub-terrain and the sub-terrain to be spliced; the cutting module is used for cutting the sub-terrain to be spliced based on the overlapping area to obtain a target spliced sub-terrain; the transformation module is used for splicing and transforming the target splicing sub-landforms based on the height difference of the boundary edges of the target splicing sub-landforms and the target splicing sub-landforms; and the expanding module is used for expanding the spliced target spliced sub-terrain to obtain the spliced terrain.
In some optional implementations, the determining module is specifically configured to:
projecting the edge line of the target sub-terrain onto the sub-terrain to be spliced to obtain a projected edge line;
and determining the area of one side, which is enclosed by the projection edge line and the sub-terrain to be spliced and is close to the target sub-terrain, as an overlapping area.
In some alternative implementations, the transformation module is specifically configured to:
determining the height difference of the boundary edge of the target sub-terrain and the target splicing sub-terrain;
determining a height transformation value of a sampling point on the target splicing sub-terrain based on the distance between the sampling point on the target splicing sub-terrain and the edge boundary line, wherein the closer the distance between the sampling point on the target splicing sub-terrain and the edge boundary line is, the closer the height transformation value is to the height difference;
and carrying out splicing transformation on the sampling points on the target splicing sub-terrain based on the height transformation values.
In some optional implementations, the transformation module is further to:
and performing interpolation mixing on the target sub-terrain and the target splicing sub-terrain based on the height transformation value by using the mixed mask to obtain the sampling points after splicing transformation on the target splicing sub-terrain.
In some alternative implementations, the sampling points include location information and mapping information; and determining the changed position information and the changed mapping information of the splicing sampling points on the target splicing sub-terrain through difference value mixing.
In some optional implementations, the transformation module is further to:
determining a preset transformation amplitude value;
and determining the height transformation value of the sampling point on the target splicing sub-terrain based on the preset transformation amplitude value and the distance between the sampling point on the target splicing sub-terrain and the edge boundary line.
In some optional implementations, the transformation module is further to:
determining a new transform amplitude value in response to a set operation for the transform amplitude value;
and adjusting the height transformation value of the sampling point on the target splicing sub-terrain based on the new transformation amplitude value.
In some optional implementations, the transformation module is further to:
responding to a dragging operation aiming at a sampling point on the target splicing sub-terrain, and determining the displacement of the dragging operation; a new transform amplitude value is determined based on the magnitude of the displacement.
In some alternative implementations, the expansion module is specifically configured to:
performing at least one expansion processing on a first target area in the spliced and transformed target splicing sub-terrain to obtain an expanded first target area;
the spliced terrain comprises a target sub-terrain and a stretched target splicing sub-terrain, and the stretched target splicing sub-terrain comprises a first target area.
In some optional implementations, the expansion module is further to:
determining expansion parameters, wherein the expansion parameters comprise expansion times and expansion distance;
and carrying out at least one expansion treatment on the first target area in the spliced and transformed target spliced sub-terrain based on the expansion parameters.
In some alternative implementations, the number of times of rubbing is determined based on a distance between a sampling point of the target sub-terrain and a sampling point on the spliced transformed target spliced sub-terrain.
In some alternative implementations, the number of topographies is determined based on the intensity of the LOD.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, where the memory is used to store a program that supports the processor to execute the method in the first aspect, and the processor is configured to execute the program stored in the memory.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the method in the first aspect.
The embodiment of the invention provides a terrain splicing method and device, electronic equipment and a storage medium. Determining an overlapping area between a target sub-terrain and a sub-terrain to be spliced; cutting the sub-terrain to be spliced based on the overlapped area to obtain a target spliced sub-terrain; splicing and transforming the target splicing sub-landforms based on the height difference of the boundary edges of the target splicing sub-landforms and the target splicing sub-landforms; and carrying out expansion processing on the spliced and transformed target spliced sub-terrain to obtain a spliced terrain. Can be to the overlap region between the concatenation topography with this, tailor earlier, based on the difference in height between the terrain region after tailorring and carry out the concatenation transform to the terrain region after the transform carries out expansion processing, makes the transition region more natural through above-mentioned method, and there is not obvious seam, and visual experience is better, and the simple operation.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a terrain stitching method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an editing interface for terrain editing according to an embodiment of the present invention;
fig. 3 is a schematic interface diagram for pulling and selecting content generating nodes of different levels according to an embodiment of the present invention;
FIG. 4 is an example of a terrain stitching provided by an embodiment of the present invention;
FIG. 5 is another example of a terrain stitching provided by an embodiment of the present invention;
FIG. 6 is another example of a terrain stitching provided by an embodiment of the present invention;
FIG. 7 is another example of a terrain stitching provided by an embodiment of the present invention;
FIG. 8 is another example of a terrain stitching provided by an embodiment of the present invention;
FIG. 9 is a schematic view of a terrain stitching apparatus provided in accordance with an embodiment of the present invention;
fig. 10 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In accordance with an embodiment of the present invention, there is provided an embodiment of a terrain stitching method, it is noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Considering that three-dimensional design software has many mature and convenient processing schemes, Houdini (a kind of three-dimensional design software) in the current mainstream three-dimensional software is the only three-dimensional software with abundant scene editing tool chains, such as topographic and geomorphic calculus, spreading and clustering placement of vegetation models, automatic tool processes, and the like. Due to the unique resource format of the mosaic engine architecture (Messiah Server, which may be referred to as Messiah for short), a customized input/output interface needs to be written when interacting with other software, so that the mosaic engine architecture cannot directly interact with Houdini. Therefore, when processing the terrain of the existing scene in Messiah, an art worker is usually required to edit the terrain manually. However, the existing scene terrain processing mode often brings a large amount of repeated work to the art personnel, which causes that the efficiency of terrain processing is not high and the user experience degree is not high. Based on the above, the embodiment of the invention provides a terrain splicing method, a terrain splicing device, an electronic terminal and a storage medium, which improve the processing efficiency and the use convenience of art workers during scene processing, and further effectively improve the user experience.
Fig. 1 is a schematic flow chart of a terrain stitching method according to an embodiment of the present invention. And providing a graphical user interface through the terminal, wherein the graphical user interface comprises a terrain editing interface which comprises a terrain to be edited. For example, the method can be applied to a terminal device capable of running three-dimensional design software, and the graphical user interface can be an interactive interface provided by the three-dimensional design software. The three-dimensional design software can be Houdini, as shown in fig. 1, and the method mainly comprises the following steps:
s110, determining an overlapping area between the target sub-terrain and the sub-terrain to be spliced.
The target sub-terrain and the sub-terrain to be spliced can refer to terrain which completes mapping layering and terrain height editing.
In general, since a plurality of art editing users edit a terrain, it is necessary to splice the terrains when editing is completed.
The method and the device for splicing the terrain can be used for splicing operation triggered after a user submits a splicing request, the splicing request can comprise the edited terrain, and the splicing request can be used for indicating that the finished terrain is spliced into the whole terrain.
In the embodiment of the application, the target sub-terrain and the sub-terrain to be spliced can be terrains edited by different users, and can also be terrains edited by the same user. For example, because the scale of the terrain is usually large, the terrain to be edited can be divided into a plurality of sub-terrains to be edited, the plurality of sub-terrains to be edited can be distributed to one or a plurality of users for editing, after the editing is completed conveniently, the plurality of terrains completed by editing can be spliced, one of any two adjacent terrains in the plurality of terrains completed by editing is a target sub-terrain, and the other is a sub-terrain to be spliced; or, for any two adjacent terrains in the edited plurality of terrains, the first submitted one is the target sub-terrains, and the later submitted one is the sub-terrains to be spliced.
For example, the landforms to be spliced include a first landform handled by a first art editing user, a second landform handled by a second art editing user, and a third landform handled by a third art editing user, where the second landform and the third landform are both required to be spliced with the first landform, and at this time, the first landform is a target sub-landform, and the second landform and the third landform are to-be-spliced sub-landforms.
Therefore, in the resource updating process, the second art editing user and the third art editing user only need to update the voxel data resources in the second terrain and the third terrain respectively according to the first terrain for the second terrain and the third terrain, and do not need to update the voxel data resources in the first terrain, so that the resource updating is ensured not to conflict.
Various implementations may be included for the determination of the overlap region. In general, only edge local areas of the target sub-terrain and the terrain to be spliced are crossed and overlapped, although the two terrains in the transition area are both subjected to the same layered mixed mapping before processing, whether the edge transition is natural when the two terrains are put together cannot be guaranteed during different art editing, meanwhile, the height difference of the two terrains is large in the example, but the mixed transition between the two terrains cannot be so strong due to prior planning in the example project.
The edge area of one of the terrains can be modified to match the edge height and the hierarchical data of the other terrains, and as an example, the edge line of the target sub-terrains can be projected onto the sub-terrains to be spliced to obtain a projected edge line; and determining the area of one side, which is enclosed by the projection edge line and the sub-terrain to be spliced and is close to the target sub-terrain, as an overlapping area. In other words, the overlap region may be a region on the sub-feature to be spliced, and the overlap region is a projection of the target sub-feature on the sub-feature to be spliced.
And S120, cutting the sub-terrain to be spliced based on the overlapping area to obtain the target spliced sub-terrain.
In determining the overlap region, the overlap region may be clipped out of the sub-feature to be spliced in order to align the edges between the target sub-feature and the sub-feature to be spliced.
The performance required for data processing can be saved by performing the clipping process on the overlapped area.
After the overlapped area is determined, an edge boundary line between the target sub-terrain and the terrain to be spliced needs to be determined at first, the edge boundary line is located on the terrain to be spliced and can be cut according to the edge boundary line, so that the overlapped area is cut from the terrain to be spliced, the target spliced sub-terrain is obtained, and resources and performances required when the subsequent target sub-terrain and the target spliced sub-terrain are spliced can be saved.
And S130, splicing and transforming the target splicing sub-landforms based on the height difference of the boundary edges of the target splicing sub-landforms and the target splicing sub-landforms.
The stitching transformation is primarily intended to make a smooth transition between the target sub-terrain and the target stitching sub-terrain. The specific splicing transformation mode can comprise a plurality of modes.
For example, the height difference of the boundary edges of the target sub-terrain and the target stitching sub-terrain may be determined; determining a height transformation value of a sampling point on the target splicing sub-terrain based on the distance between the sampling point on the target splicing sub-terrain and the edge boundary line, wherein the closer the distance between the sampling point on the target splicing sub-terrain and the edge boundary line is, the closer the height transformation value is to the height difference; and carrying out splicing transformation on the sampling points on the target splicing sub-terrain based on the height transformation values.
The target sub-terrain and the target splicing sub-terrain are subjected to interpolation mixing based on the height transformation value by utilizing the mixing mask, so that the sampling points on the target splicing sub-terrain after splicing transformation are obtained.
The sampling points may include location information and mapping information; the position information after the change of the splicing sampling points on the target splicing sub-terrain and the mapping information after the change can be determined through difference value mixing. That is, the height values in the sampling points on the target stitching sub-terrain and the color values of the map can be updated based on the height transform values.
In some embodiments, a preset transform amplitude value may also be determined; and determining the height transformation value of the sampling point on the target splicing sub-terrain based on the preset transformation amplitude value and the distance between the sampling point on the target splicing sub-terrain and the edge boundary line.
The transform amplitude value may be determined according to actual needs, or may be configured in advance. For example, in response to a setting operation for a transform amplitude value, a new transform amplitude value is determined; and adjusting the height transformation value of the sampling point on the target splicing sub-terrain based on the new transformation amplitude value. For example, the transform amplitude value may be set by a drag operation. Based on the method, the dragging operation aiming at the sampling point on the target splicing sub-terrain can be responded, and the displacement of the dragging operation is determined; a new transform amplitude value is determined based on the magnitude of the displacement.
The transform amplitude value is used to indicate position information between adjacent sampling points and a variation amplitude of the map information. The larger the transformation amplitude value is, the larger the variation amplitude is, the more the transition is violent in appearance, correspondingly, the smaller the transformation amplitude value is, the smaller the variation amplitude is, and the transition is gentle in appearance. Suitable values may be selected based on experience. The transform amplitude value can also affect the area where the splicing transform needs to be performed. Wherein, the area needing to be spliced and changed can be only on the target splicing sub-terrain. The larger the transformation amplitude value is, the smaller the area needing splicing transformation is, the smaller the transformation amplitude value is, and the larger the area needing splicing transformation is, so that the splicing requirement can be met.
In some embodiments, in setting the transform amplitude value, only the transform amplitude of the position information on which the transform amplitude of the map information is determined may be set. The transform amplitude value may be a transform scale for the height difference, and the transform scale may be applied to the transform of the map information.
And S140, performing expansion processing on the spliced and transformed target spliced sub-terrain to obtain a spliced terrain.
In the embodiment of the invention, the heights of the target sub-terrain and the area corresponding to the sub-terrain to be spliced in the spliced and transformed target spliced sub-terrain gradually transition for a certain distance, but an obvious seam still can exist between the two areas. For example, if the terrain is likely to reappear as the line of sight (LOD) is zoomed out, the seam may appear due to level of Detail (LOD) processing. Based on the method, at least one expansion processing can be carried out on the first target area in the spliced and transformed target spliced sub-terrain to obtain the expanded first target area; the spliced terrain comprises a target sub-terrain and a stretched target splicing sub-terrain, and the stretched target splicing sub-terrain comprises a first target area.
The method comprises the following steps of determining expansion parameters, wherein the expansion parameters comprise expansion times and expansion distances; and carrying out at least one expansion treatment on the first target area in the spliced and transformed target spliced sub-terrain based on the expansion parameters.
The number of times of expansion can be determined based on the distance between the sampling point of the target sub-terrain and the sampling point of the spliced and transformed target spliced sub-terrain. The number of topographies is determined based on the intensity of the LOD. Wherein, the stronger the LOD intensity is, the more the expansion times are, so as to be able to produce better display effect.
By the embodiment of the invention, the overlapping area between the target sub-terrain and the sub-terrain to be spliced can be determined; cutting the sub-terrain to be spliced based on the overlapped area to obtain a target spliced sub-terrain; splicing and transforming the target splicing sub-landforms based on the height difference of the boundary edges of the target splicing sub-landforms and the target splicing sub-landforms; and carrying out expansion processing on the spliced and transformed target spliced sub-terrain to obtain a spliced terrain. Can be to the overlap region between the concatenation topography with this, tailor earlier, based on the difference in height between the terrain region after tailorring and carry out the concatenation transform to the terrain region after the transform carries out expansion processing, makes the transition region more natural through above-mentioned method, and there is not obvious seam, and visual experience is better, and the simple operation.
Considering as an art person, it may be necessary to manually adjust the effect in the view, in order to improve convenience and efficient interactive experience, and to simplify the operation and reduce unnecessary calculation amount as much as possible. Fig. 2 shows a schematic diagram of an editing interface for a terrain editing process applied to a terminal device running Houdini, with a terrain editing area on the left for presenting a current scene terrain, such as a large scene terrain which may be a game scene. The right side in fig. 2 is a node selection area for matching the node where the current terrain to be processed is located. As can be seen from the figure, the nodes include child nodes, that is, the nodes of the embodiment of the present invention can quickly browse information such as existing scenes, hierarchies, and Entity (Entity) of the scenes in a hierarchical tree manner, and import, edit, update, and export selected contents. The fine arts personnel can select the corresponding node according to the requirement of actual processing.
For ease of understanding, a schematic diagram of an interface for generating interactive nodes by pulling different hierarchical contents is illustrated, and referring to fig. 3, the interface can also encapsulate nodes by pulling different hierarchical contents for quickly generating nodes at a specified network location. Because the relevant parameters of each resource are more, the operation can be simplified as much as possible to enable the art to directly and quickly use each interactive node without knowing the parameters by dragging and selecting the generated nodes and presetting the deployment parameters, and the path does not need to be manually configured on the node.
The method can greatly improve the IO speed through the C + + HDK through multithreading management, greatly simplify the GUI interface, quickly browse the information of the existing scene, grading, scene Entity and the like through the hierarchical tree, and import, edit, update and export the selected content.
However, in the world editing process of messaiah (milea, a terrain editing engine), multiple persons edit on a single terrain at the same time, which easily causes resource update conflict and management confusion, each different zone (land parcel) has a different outline shape according to the art requirement during editing, but the terrain of messaiah can only keep a square structure, so that multiple terrains can be interlaced, but in the prior art, the terrain edge transition is mixed and matched according to adjacent terrains, only the alignment in height is realized, the transition of mapping distribution is not natural, and the following solutions are provided for the above problems.
As shown in fig. 4, fig. 4 shows two pieces of terrain (a first terrain 401 and a second terrain 402, wherein the first terrain 401 is a target sub-terrain, and the second terrain 402 is a sub-terrain to be spliced), which have been edited in messah, and art editors of the two terrains have edited the mapping layer and the terrain height according to the plan of the zone, and have hollowed out the terrain outside the zone according to the shape of the zone.
In this example, only the edge of two terrains is partially overlapped with the other terrains in a crossing way, and although the two terrains are both mapped by the same layered mixture in the transition area before processing, the two terrains cannot be guaranteed whether the edge transition is natural when the two terrains are put together in different art editions, and the height difference of the two terrains is larger in this example, but the mixed transition between the two terrains is not so strong by prior planning in an example project.
Based on the solution provided by the embodiment of the present invention, the edge area of one of the zones may be modified to match the edge height and hierarchical data of another zone.
First, as shown in fig. 5, it is necessary to determine an overlapping area 501 and perform a cropping process on the overlapping area to save performance, resulting in a terrain as shown in fig. 6.
A distance boundary line 502 is calculated for clipping based on the overlap region 501, and the distance from the sample point to the boundary line is used as an interpolation value for the post-transition blending.
The terrain shown in fig. 8 can be obtained by interpolating and mixing the heights of the two terrains and the layering values based on the mixed mask shown in fig. 7 and then deriving the terrains into messiah.
In fig. 8, it can be seen that the height between two zones has a gradual transition of a certain distance, but still has an obvious seam, and we need to make the zone at the junction of the zones perform expansion for edge protection, and the distance of the expansion can be calculated according to the distance between two adjacent sampling points of the terrain.
The functions can be integrated into a single houdini functional node, and after mixed planning is completed, the arts only need to update respective scenes, and the houdini can automatically update edge mixing, so that rapid area planning and iteration are achieved.
The embodiment of the invention also provides a terrain splicing device, which is used for executing the terrain splicing method provided by the embodiment of the invention, and the following is a specific introduction of the terrain splicing device provided by the embodiment of the invention.
Fig. 9 is a schematic structural diagram of a terrain splicing apparatus according to an embodiment of the present invention. As shown in fig. 9, the apparatus may include:
a determining module 901, configured to determine an overlapping area between a target sub-terrain and a sub-terrain to be spliced;
a cutting module 902, configured to cut the sub-terrain to be spliced based on the overlapping area to obtain a target spliced sub-terrain;
a transformation module 903, configured to perform splicing transformation on the target splicing sub-terrain based on a height difference between the target splicing sub-terrain and a boundary edge of the target splicing sub-terrain;
and the expanding module 904 is used for expanding the spliced target spliced sub-terrain to obtain the spliced terrain.
In some embodiments, the determining module 901 is specifically configured to:
projecting the edge line of the target sub-terrain onto the sub-terrain to be spliced to obtain a projected edge line;
and determining the area of one side, which is enclosed by the projection edge line and the sub-terrain to be spliced and is close to the target sub-terrain, as an overlapping area.
In some embodiments, the transformation module 903 is specifically configured to:
determining the height difference of the boundary edge of the target sub-terrain and the target splicing sub-terrain;
determining a height transformation value of a sampling point on the target splicing sub-terrain based on the distance between the sampling point on the target splicing sub-terrain and the edge boundary line, wherein the closer the distance between the sampling point on the target splicing sub-terrain and the edge boundary line is, the closer the height transformation value is to the height difference;
and carrying out splicing transformation on the sampling points on the target splicing sub-terrain based on the height transformation values.
In some embodiments, the transformation module 903 is further configured to:
and performing interpolation mixing on the target sub-terrain and the target splicing sub-terrain based on the height transformation value by using the mixed mask to obtain the sampling points after splicing transformation on the target splicing sub-terrain.
In some embodiments, the sampling points include location information and mapping information; and determining the changed position information and the changed mapping information of the splicing sampling points on the target splicing sub-terrain through difference value mixing.
In some embodiments, the transformation module 903 is further configured to:
determining a preset transformation amplitude value;
and determining the height transformation value of the sampling point on the target splicing sub-terrain based on the preset transformation amplitude value and the distance between the sampling point on the target splicing sub-terrain and the edge boundary line.
In some embodiments, the transformation module 903 is further configured to:
determining a new transform amplitude value in response to a set operation for the transform amplitude value;
and adjusting the height transformation value of the sampling point on the target splicing sub-terrain based on the new transformation amplitude value.
In some embodiments, the transformation module 903 is further configured to:
responding to a dragging operation aiming at a sampling point on the target splicing sub-terrain, and determining the displacement of the dragging operation; a new transform amplitude value is determined based on the magnitude of the displacement.
In some embodiments, the topology module 904 is specifically configured to:
performing at least one expansion processing on a first target area in the spliced and transformed target splicing sub-terrain to obtain an expanded first target area;
the spliced terrain comprises a target sub-terrain and a stretched target splicing sub-terrain, and the stretched target splicing sub-terrain comprises a first target area.
In some embodiments, the topology module 904 is further operable to:
determining expansion parameters, wherein the expansion parameters comprise expansion times and expansion distance;
and carrying out at least one expansion treatment on the first target area in the spliced and transformed target spliced sub-terrain based on the expansion parameters.
In some embodiments, the number of times of rubbing is determined based on the distance between the sampling points of the target sub-terrain and the sampling points on the target stitching sub-terrain after stitching transformation.
In some embodiments, the number of topographies is determined based on the intensity of the LOD.
The implementation principle and the generated technical effect of the scene terrain editing device provided by the embodiment of the invention are the same as those of the method embodiment, and for brief description, corresponding contents in the method embodiment can be referred to where the embodiment of the scene terrain editing device is not mentioned.
The electronic terminal of the embodiment may be, for example, a smart phone, a PC computer, a notebook computer, and the like. Fig. 10 shows a schematic structural diagram of an electronic terminal including a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the above embodiments.
As shown in fig. 10, an electronic device 1000 provided in an embodiment of the present application, for example, the electronic device 1000 may be a preprocessing server, including: the device comprises a processor 1001, a memory 1002 and a bus, wherein the memory 1002 stores machine readable instructions executable by the processor 1001, when the electronic device runs, the processor 1001 and the memory 1002 are communicated through the bus, and the processor 1001 executes the machine readable instructions to execute the steps of the terrain stitching method.
The processor 1001 may be implemented in at least one hardware form of a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), the processor 1001 may be one or a combination of several of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), or other forms of processing units having data processing capability and/or instruction execution capability, and may control other components in the electronic device 1000 to perform desired functions.
The memory 1002 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. On which one or more computer program instructions may be stored that may be executed by processor 1001 to implement client functionality (implemented by the processor) and/or other desired functionality in embodiments of the present invention described below. Various applications and various data, such as various data used and/or generated by the applications, may also be stored in the computer-readable storage medium.
Specifically, the memory 1002 and the processor 1001 can be general-purpose memory and processor, and are not limited to specific examples, and the processor 1001 can execute the terrain stitching method when executing a computer program stored in the memory 1002.
In addition, the electronic device 1000 may further include an input device and an output device. The input device is mainly used for realizing human-computer interaction, and the input device can be a device used by a user for inputting instructions and can comprise one or more of a keyboard, a mouse, a microphone, a touch screen and the like. The output device may output various information (e.g., images or sounds) to an external (e.g., user), and may include one or more of a display, a speaker, and the like. The output device may be adapted to display a graphical user interface of the actuator.
Corresponding to the terrain stitching method, the embodiment of the application also provides a computer readable storage medium, and machine executable instructions are stored in the computer readable storage medium, and when the computer executable instructions are called and executed by the processor, the computer executable instructions cause the processor to execute the steps of the terrain stitching method.
The terrain splicing device provided by the embodiment of the application can be specific hardware on equipment or software or firmware installed on the equipment. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of one logic function, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing an electronic device to execute all or part of the steps of the movement control method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the technical solutions of the present application, and the scope of the present application is not limited thereto, although the present application is described in detail with reference to the foregoing examples, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the scope of the embodiments of the present application. Are intended to be covered by the scope of the present application.

Claims (15)

1. A terrain stitching method, comprising:
determining an overlapping area between the target sub-terrain and the sub-terrain to be spliced;
cutting the sub-terrain to be spliced based on the overlapping area to obtain a target spliced sub-terrain;
splicing and transforming the target splicing sub-landforms based on the height difference of the boundary edges of the target splicing sub-landforms and the target splicing sub-landforms;
and carrying out expansion processing on the spliced and transformed target spliced sub-terrain to obtain a spliced terrain.
2. The method of claim 1, wherein determining an overlap region between the target sub-terrain and the sub-terrain to be spliced comprises:
projecting the edge line of the target sub-terrain onto the sub-terrain to be spliced to obtain a projected edge line;
and determining the area of one side, close to the target sub-terrain, enclosed by the projection edge line and the sub-terrain to be spliced as an overlapping area.
3. The method of claim 2, wherein stitching transformation of the target stitching sub-terrain based on a height difference of a boundary edge of the target stitching sub-terrain comprises:
determining the height difference of the boundary edge of the target sub-terrain and the target splicing sub-terrain;
determining a height transformation value of a sampling point on the target splicing sub-terrain based on a distance between the sampling point on the target splicing sub-terrain and an edge boundary line, wherein the closer the distance between the sampling point on the target splicing sub-terrain and the edge boundary line is, the closer the height transformation value is to a height difference;
and carrying out splicing transformation on the sampling points on the target splicing sub-terrain based on the height transformation values.
4. The method of claim 3, wherein performing a stitching transformation on sample points on the target stitching sub-terrain based on the elevation transformation value comprises:
and performing interpolation mixing on the target sub-terrain and the target splicing sub-terrain based on the height transformation value by using a mixing mask to obtain a sampling point after splicing transformation on the target splicing sub-terrain.
5. The method of claim 3, wherein the sample points include location information and map information; and determining the changed position information and the changed mapping information of the splicing sampling points on the target splicing sub-terrain through difference value mixing.
6. The method of claim 3, wherein determining a height transform value for a sample point on the target stitching sub-terrain based on a distance between the sample point and an edge boundary line on the target stitching sub-terrain comprises:
determining a preset transformation amplitude value;
and determining the height transformation value of the sampling point on the target splicing sub-terrain based on the preset transformation amplitude value and the distance between the sampling point on the target splicing sub-terrain and the edge boundary line.
7. The method of claim 6, further comprising:
determining a new transform amplitude value in response to a set operation for the transform amplitude value;
and adjusting the height transformation value of the sampling point on the target splicing sub-terrain based on the new transformation amplitude value.
8. The method of claim 7, wherein determining a new transform amplitude value in response to the set operation for the transform amplitude value comprises:
responding to a dragging operation aiming at a sampling point on the target splicing sub-terrain, and determining the displacement of the dragging operation; a new transform amplitude value is determined based on the magnitude of the displacement.
9. The method of claim 3, wherein expanding the target stitching sub-terrain after stitching transformation to obtain a stitched terrain comprises:
performing at least one expansion processing on a first target area in the spliced and transformed target spliced sub-terrain to obtain the expanded first target area;
the spliced terrain comprises the target sub-terrain and the expanded target spliced sub-terrain, and the expanded target spliced sub-terrain comprises the expanded first target area.
10. The method of claim 6, wherein performing at least one dilation process on a first target area in the target splice sub-terrain after the splice transformation comprises:
determining expansion parameters, wherein the expansion parameters comprise expansion times and expansion distance;
and carrying out at least one time of expansion processing on the first target area in the target splicing sub-terrain after splicing transformation based on the expansion parameters.
11. The method of claim 10, wherein the number of topographies is determined based on a distance between a sample point of the target sub-feature and a sample point on the target stitching sub-feature after stitching transformation.
12. The method of claim 10, wherein the number of topographies is determined based on a level of detail LOD strength.
13. A terrain stitching device, comprising:
the determining module is used for determining an overlapping area between the target sub-terrain and the sub-terrain to be spliced;
the cutting module is used for cutting the sub-terrain to be spliced based on the overlapping area to obtain a target spliced sub-terrain;
the transformation module is used for splicing and transforming the target splicing sub-landforms based on the height difference of the boundary edges of the target splicing sub-landforms and the target splicing sub-landforms;
and the expanding module is used for expanding the spliced and transformed target spliced sub-terrain to obtain a spliced terrain.
14. An electronic terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the method according to any of the preceding claims 1 to 12 are performed when the computer program is executed by the processor.
15. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any of claims 1 to 12.
CN202111057769.3A 2021-09-09 2021-09-09 Terrain splicing method and device, electronic equipment and storage medium Pending CN113744401A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111057769.3A CN113744401A (en) 2021-09-09 2021-09-09 Terrain splicing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111057769.3A CN113744401A (en) 2021-09-09 2021-09-09 Terrain splicing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113744401A true CN113744401A (en) 2021-12-03

Family

ID=78737709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111057769.3A Pending CN113744401A (en) 2021-09-09 2021-09-09 Terrain splicing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113744401A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114332396A (en) * 2021-12-30 2022-04-12 北京发现角科技有限公司 Method and device for realizing excessive effect of adjacent terrains at different levels
WO2023160487A1 (en) * 2022-02-28 2023-08-31 北京字跳网络技术有限公司 Topographic-region splicing method and apparatus, and computer device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3246871A1 (en) * 2016-05-20 2017-11-22 Shenyang Neusoft Medical Systems Co., Ltd. Image splicing
WO2019184719A1 (en) * 2018-03-29 2019-10-03 青岛海信移动通信技术股份有限公司 Photographing method and apparatus
CN111415298A (en) * 2020-03-20 2020-07-14 北京百度网讯科技有限公司 Image splicing method and device, electronic equipment and computer readable storage medium
CN111461985A (en) * 2020-03-31 2020-07-28 维沃移动通信有限公司 Picture processing method and electronic equipment
CN112907451A (en) * 2021-03-26 2021-06-04 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3246871A1 (en) * 2016-05-20 2017-11-22 Shenyang Neusoft Medical Systems Co., Ltd. Image splicing
WO2019184719A1 (en) * 2018-03-29 2019-10-03 青岛海信移动通信技术股份有限公司 Photographing method and apparatus
CN111415298A (en) * 2020-03-20 2020-07-14 北京百度网讯科技有限公司 Image splicing method and device, electronic equipment and computer readable storage medium
CN111461985A (en) * 2020-03-31 2020-07-28 维沃移动通信有限公司 Picture processing method and electronic equipment
CN112907451A (en) * 2021-03-26 2021-06-04 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114332396A (en) * 2021-12-30 2022-04-12 北京发现角科技有限公司 Method and device for realizing excessive effect of adjacent terrains at different levels
WO2023160487A1 (en) * 2022-02-28 2023-08-31 北京字跳网络技术有限公司 Topographic-region splicing method and apparatus, and computer device and storage medium

Similar Documents

Publication Publication Date Title
Lipp et al. Interactive visual editing of grammars for procedural architecture
US9275479B2 (en) Method, system and computer program product for creating collages that visually resemble a particular shape or group of shapes
US7613539B2 (en) System and method for mesh and body hybrid modeling using 3D scan data
US6636211B2 (en) CAD/CAM feature tree with manipulatable 3D miniatures
JP6196032B2 (en) Generation of surfaces from multiple 3D curves
CN104217066B (en) 3D modeling object is designed using 2D view
CN113744401A (en) Terrain splicing method and device, electronic equipment and storage medium
JP2002501640A (en) Adaptive mesh refinement method and apparatus
KR20130123336A (en) Designing a 3d modeled object
JP2018110852A (en) Selecting points on electroanatomical map
WO2009096891A1 (en) Real-time user guided optimization of general 3d data
CN111524231B (en) Virtual terrain processing method and device, electronic equipment and storage medium
JP3650355B2 (en) Computer system, method and computer program for accelerating rendering of geometric models
CN115049811A (en) Editing method, system and storage medium of digital twin virtual three-dimensional scene
JPH0877387A (en) Video presenting device
US11625900B2 (en) Broker for instancing
CN113781642A (en) Three-dimensional model multi-level LOD generation method based on face reduction algorithm
CN111773710A (en) Texture image processing method and device, electronic equipment and storage medium
JP2003516589A (en) Method, program and system for graphically editing a computer generated sheet metal part model
US20020154149A1 (en) System, method and computer program product for associative region generation and modification
CN115601486A (en) Virtual river generation method and device
JP2001034653A (en) Feature-type macro language for defining customized analysis function and customized graphic function
JP2008033667A (en) Combined sectional view producing method, apparatus, and program
Wiley et al. Representation of interwoven surfaces in 2 1/2 D drawing
Fan et al. Joining Interactive Graphics and Procedural Modeling for Precise Free-Form Designs

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination