CN117788772A - Terrain model merging method and device, storage medium and electronic equipment - Google Patents

Terrain model merging method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117788772A
CN117788772A CN202311798769.8A CN202311798769A CN117788772A CN 117788772 A CN117788772 A CN 117788772A CN 202311798769 A CN202311798769 A CN 202311798769A CN 117788772 A CN117788772 A CN 117788772A
Authority
CN
China
Prior art keywords
terrain
terrain model
gray scale
model
map
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
CN202311798769.8A
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 CN202311798769.8A priority Critical patent/CN117788772A/en
Publication of CN117788772A publication Critical patent/CN117788772A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The disclosure relates to the field of computers, in particular to a terrain model merging method and device, a computer readable storage medium and electronic equipment, wherein the method comprises the following steps: acquiring a first gray level map of a basic terrain model, and acquiring a second gray level map of a combined terrain model; fusing the first gray scale image and the second gray scale image to obtain a fused gray scale image; and carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a target terrain model after the basic terrain model and the combined terrain model are combined. Through the technical scheme of the embodiment of the disclosure, the problem of low efficiency of making the terrain model in the related technology can be solved.

Description

Terrain model merging method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computers, and more particularly, to a terrain model merging method, a terrain model merging apparatus, a computer-readable storage medium, and an electronic device.
Background
With the development of terminal devices and gaming industry, a large number of games with different themes are emerging to meet the needs of players. In some games, a rich design of the game scene is possible, in which various terrains such as hills, mountains, rivers, lakes, canyons, hills, etc. may be included.
In the related art, a game scene may be created by software such as Unity (three-dimensional modeling software). In making a game scene, it is often necessary to modify and adjust the topography in the game scene. In the development process, a plurality of terrain models are respectively manufactured. However, the terrain models manufactured separately cannot be combined into an integral terrain, the artistic effect needs to be manufactured again, the manufacturing cost is high, the efficiency is low, and the artistic quality is difficult to ensure.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure aims to provide a terrain model merging method and device, a computer readable storage medium and electronic equipment, which can solve the problem of low efficiency of making a terrain model in the related technology.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a terrain model merging method, including: acquiring a first gray level map of a basic terrain model, and acquiring a second gray level map of a combined terrain model; fusing the first gray scale image and the second gray scale image to obtain a fused gray scale image; and carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a target terrain model after the basic terrain model and the combined terrain model are combined.
According to a second aspect of the present disclosure, there is provided a terrain model merging device, characterized in that the device comprises: the gray level map acquisition module is used for acquiring a first gray level map of the basic terrain model and acquiring a second gray level map of the combined terrain model; the gray level image fusion module is used for fusing the first gray level image and the second gray level image to obtain a fused gray level image; the terrain mapping module is used for carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a target terrain model after the basic terrain model and the combined terrain model are combined.
According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a terrain model merging method as in the first aspect of the above-described embodiments.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising:
one or more processors; and
and a memory for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the terrain model merging method as in the first aspect of the embodiments described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
in the terrain model merging method provided by the embodiment of the disclosure, a first gray level map of a basic terrain model can be obtained, a second gray level map of a merged terrain model is obtained, the first gray level map and the second gray level map are fused to obtain a fused gray level map, and the merged terrain model is subjected to terrain mapping to the basic terrain model based on the fused gray level map to obtain a target terrain model after the basic terrain model and the merged terrain model are merged. According to the scheme, after the basic terrain model and the combined terrain model needing to be combined are obtained, the respective gray maps can be combined, and terrain mapping is carried out based on the combined gray maps, so that the target terrain model after combination is obtained, the cost of manpower and material resources required for manufacturing the terrain model is reduced, the efficiency of constructing and manufacturing the terrain model is improved, and the artistic quality of the terrain model is guaranteed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 schematically illustrates a schematic diagram of an exemplary system architecture of a terrain model merging method in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a terrain model merging method in an exemplary embodiment of the present disclosure;
FIG. 3a schematically illustrates a schematic view of a first gray scale map of a basic terrain model in an exemplary embodiment of the present disclosure;
FIG. 3b schematically illustrates a schematic view of a first gray scale map incorporating a terrain model in an exemplary embodiment of the present disclosure;
fig. 4 schematically illustrates a schematic diagram of fusing a first gray scale map and a second gray scale map to obtain a fused gray scale map in an exemplary embodiment of the present disclosure;
FIG. 5a schematically illustrates a schematic diagram of a target terrain model obtained by combining a basic terrain model and a combined terrain model by performing terrain mapping on the combined terrain model to the basic terrain model based on a fused gray scale map in an exemplary embodiment of the disclosure;
FIG. 5b schematically illustrates another exemplary embodiment of the present disclosure in which a merged terrain model is mapped to a base terrain model based on a merged gray scale map to obtain a schematic diagram of a target terrain model after merging of the base terrain model and the merged terrain model;
FIG. 6 schematically illustrates a flow chart of determining a target terrain model based on a first terrain model and a second terrain model in an exemplary embodiment of the present disclosure;
FIG. 7 schematically illustrates a flow chart of determining a target terrain model based on a first terrain model and a second terrain model in an exemplary embodiment of the present disclosure;
FIG. 8 schematically illustrates a flow chart of applying a plurality of target terrain textures to an initial terrain model to obtain a target terrain model in an exemplary embodiment of the present disclosure;
FIG. 9 schematically illustrates a flowchart for deleting duplicate terrain materials from a plurality of target terrain materials in an exemplary embodiment of the present disclosure;
FIG. 10 schematically illustrates a flow chart of processing a plurality of target terrain textures in an exemplary embodiment of the present disclosure;
FIG. 11 schematically illustrates a composition diagram of a terrain model merging device in an exemplary embodiment of the present disclosure;
fig. 12 schematically illustrates a structural schematic diagram of a computer system suitable for use in implementing the electronic device of the exemplary embodiments of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the disclosed aspects may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, or in one or more software-hardened modules, or in different networks and/or processor devices and/or microcontroller devices.
FIG. 1 illustrates a schematic diagram of an exemplary system architecture to which the terrain model merging method of embodiments of the present disclosure may be applied.
As shown in fig. 1, system architecture 1000 may include one or more of terminal devices 1001, 1002, 1003, a network 1004, and a server 1005. The network 1004 serves as a medium for providing a communication link between the terminal apparatuses 1001, 1002, 1003 and the server 1005. The network 1004 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 1005 may be a server cluster formed by a plurality of servers.
A user can interact with a server 1005 via a network 1004 using terminal apparatuses 1001, 1002, 1003 to receive or transmit messages or the like. The terminal devices 1001, 1002, 1003 may be various electronic devices having a display screen including, but not limited to, smartphones, tablet computers, portable computers, desktop computers, and the like. In addition, the server 1005 may be a server providing various services.
In an embodiment, an execution subject of the terrain model merging method of the present disclosure may be a server 1005, and the server 1005 may acquire a first gray scale map of a basic terrain model and a second gray scale map of a merged terrain model sent by the terminal devices 1001, 1002, 1003, fuse the first gray scale map and the second gray scale map to obtain a fused gray scale map, and map the merged terrain model to the basic terrain model based on the fused gray scale map to obtain a target terrain model after merging the basic terrain model and the merged terrain model.
In addition, the terrain model merging method disclosed by the disclosure can be further executed through terminal equipment 1001, 1002, 1003 and the like, so that the process of obtaining a first gray scale image of a basic terrain model, obtaining a second gray scale image of a merged terrain model, merging the first gray scale image with the second gray scale image to obtain a merged gray scale image, and performing terrain mapping on the merged terrain model to the basic terrain model based on the merged gray scale image to obtain a target terrain model after merging the basic terrain model and the merged terrain model is realized.
In addition, the terrain model combining method implementation process of the present disclosure may also be implemented jointly by the terminal apparatuses 1001, 1002, 1003 and the server 1005. For example, the terminal device 1001, 1002, 1003 may acquire a first gray scale map of the basic terrain model, acquire a second gray scale map of the merged terrain model, fuse the first gray scale map with the second gray scale map to obtain a fused gray scale map, and map the merged terrain model to the basic terrain model based on the fused gray scale map to obtain a target terrain model after merging the basic terrain model and the merged terrain model.
With the development of terminal devices and gaming industry, a large number of games with different themes are emerging to meet the needs of players. In some games, a rich design of the game scene is possible, in which various terrains such as hills, mountains, rivers, lakes, canyons, hills, etc. may be included.
In the related art, a game scene may be created by software such as Unity. In making a game scene, it is often necessary to modify and adjust the topography in the game scene. In the development process, a plurality of terrain models are respectively manufactured. However, the terrain models manufactured separately cannot be combined into an integral terrain, the artistic effect needs to be manufactured again, the manufacturing cost is high, the efficiency is low, and the artistic quality is difficult to ensure.
In the terrain model merging method provided by the embodiment of the disclosure, a first gray level map of a basic terrain model can be obtained, a second gray level map of a merged terrain model is obtained, the first gray level map and the second gray level map are fused to obtain a fused gray level map, and the merged terrain model is subjected to terrain mapping to the basic terrain model based on the fused gray level map to obtain a target terrain model after the basic terrain model and the merged terrain model are merged.
Referring to fig. 2, a flowchart illustrating a terrain model merging method in the present exemplary embodiment may include the steps of:
step S210: acquiring a first gray level map of a basic terrain model, and acquiring a second gray level map of a combined terrain model;
step S220: fusing the first gray scale image and the second gray scale image to obtain a fused gray scale image;
step S230: and carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a target terrain model after the basic terrain model and the combined terrain model are combined.
In the terrain model merging method provided by the embodiment of the disclosure, a first gray level map of a basic terrain model can be obtained, a second gray level map of a merged terrain model is obtained, the first gray level map and the second gray level map are fused to obtain a fused gray level map, and the merged terrain model is subjected to terrain mapping to the basic terrain model based on the fused gray level map to obtain a target terrain model after the basic terrain model and the merged terrain model are merged. According to the scheme, after the basic terrain model and the combined terrain model needing to be combined are obtained, the respective gray maps can be combined, and terrain mapping is carried out based on the combined gray maps, so that the target terrain model after combination is obtained, the cost of manpower and material resources required for manufacturing the terrain model is reduced, the efficiency of constructing and manufacturing the terrain model is improved, and the artistic quality of the terrain model is guaranteed.
Next, steps S210 to S230 of the terrain model merging method in the present exemplary embodiment will be described in more detail with reference to fig. 2 and the embodiment.
Step S210, a first gray level map of a basic terrain model is obtained, and a second gray level map of a combined terrain model is obtained;
in one example embodiment of the present disclosure, a first gray scale map of a base terrain model may be acquired, and a second gray scale map of a merged terrain model may be acquired. Specifically, the basic terrain model and the merged terrain may be terrain elements in the game scene, where the basic terrain model may be an atmospheric terrain model and the merged terrain model may be a special terrain model, and in order to merge the merged terrain model onto the basic terrain model, a first gray map of the basic terrain model may be obtained, and a second gray map of the merged terrain model may be obtained. And based on the first gray level map of the basic terrain model, acquiring a second gray level map of the combined terrain model to combine the basic terrain model and the combined terrain model. The combined terrain model refers to a terrain model to be combined, namely, a basic terrain model and the combined terrain model are required to be combined.
In the solution of the present disclosure, the hierarchical relationship between the basic terrain model and the merged terrain model is not limited, and the basic terrain model and the merged terrain model are only used for distinguishing the two terrain models.
For example, the basic terrain model may be a hillside model, the merged terrain model may be a hillside model, and the two hillside models may be merged.
In one example embodiment of the present disclosure, the underlying terrain model and the merged terrain model may be generated by a variety of three-dimensional software. For example, the basic terrain model and the merged terrain may be generated by Blender (three-dimensional modeling software), maya (three-dimensional modeling software), 3ds Max (3D Studio Max), or the like.
The present disclosure is not limited to a specific manner of generating the basic terrain model and combining the terrains.
In one example embodiment of the present disclosure, a first gray scale map of a base terrain model may be acquired, and a second gray scale map of a merged terrain model may be acquired. Specifically, after the basic terrain model and the merged terrain model are created, and after rendering in the virtual game scene is completed, a first gray scale map of the basic terrain model and a second gray scale map of the merged terrain model may be derived. The first gray level map of the basic terrain model is used for indicating the height information of each position in the basic terrain model, the first gray level map of the basic terrain model can be used for indicating the height information, the terrain features, the gradient or the slope direction and the like of the basic terrain model, the second gray level map of the combined terrain model is used for indicating the height information of each position in the combined terrain model, and the second gray level map of the combined terrain model can be used for indicating the height information, the terrain features, the gradient or the slope direction and the like of the combined terrain model.
For example, in a gray scale map, the larger the gray scale of a point, the higher the height of the point; the smaller the gray level of a certain point, the higher and lower the height of that point.
For example, as shown in fig. 3a, a schematic diagram of a first gray scale map of the underlying terrain model; as shown in fig. 3b, a schematic diagram of a second gray scale map of the merged terrain model is shown. Wherein, the larger the gray level of a certain point is, the higher the height of the point is; the smaller the gray level of a certain point, the higher and lower the height of that point.
In one example embodiment of the present disclosure, the underlying terrain model is regular terrain, i.e., the length and width of the underlying terrain model is rectangular.
It should be noted that, the specific manner of acquiring the first gray scale map of the basic terrain model and acquiring the second gray scale map of the merged terrain model is not particularly limited in the present disclosure.
Step S220, fusing the first gray scale image and the second gray scale image to obtain a fused gray scale image;
in an example embodiment of the present disclosure, after the first gray scale map of the basic terrain model and the second gray scale map of the merged terrain model are obtained through the above steps, the first gray scale map and the second gray scale map may be fused to obtain a fused gray scale map. Specifically, when fusion is performed, a preset mode can be selected for fusion.
For example, the first gray scale map and the second gray scale map may be fused by superposition, averaging, multiplication, fusion, and the like, to obtain a fused gray scale map.
In an example embodiment of the present disclosure, when the first gray scale map and the second gray scale map are fused to obtain a fused gray scale map, a maximum value of gray scales at the same position in the first gray scale map and the second gray scale map may be taken, and the fused gray scale map may be determined based on the maximum value of gray scales at each position.
In an example embodiment of the present disclosure, when the first gray scale map and the second gray scale map are fused to obtain a fused gray scale map, a minimum value of gray scales at the same position in the first gray scale map and the second gray scale map may be taken, and the fused gray scale map may be determined based on the minimum value of gray scales at each position.
In an example embodiment of the present disclosure, when the first gray scale map and the second gray scale map are fused to obtain a fused gray scale map, a specific position may be selected in the first gray scale map or the second gray scale map for fusion.
For example, a part of gray scale map may be selected from the second gray scale map and fused with the first gray scale map to obtain a fused gray scale map.
In an example embodiment of the present disclosure, when the first gray scale map and the second gray scale map are fused to obtain a fused gray scale map, partial features of the first gray scale map and the second gray scale map may be obtained in the first gray scale map and the second gray scale map, respectively, and fused based on the partial features of the first gray scale map and the partial features of the second gray scale map.
For example, when the first gray scale image and the second gray scale image are fused, the details of the first gray scale image can be emphasized, and the whole shape or texture feature of the second gray scale image is added, so that a better artistic effect is achieved.
For example, as shown in fig. 4, after the first gray scale 401 of the basic terrain model and the second gray scale 402 of the merged terrain model are obtained through the above steps, the first gray scale 401 and the second gray scale 402 are fused to obtain a fused gray scale 403.
In an example embodiment of the present disclosure, a gray-scale preset maximum value may be set, and both the maximum value of gray scales in the first gray-scale map and the maximum value of gray scales in the second gray-scale map are smaller than the preset maximum value of gray scales.
Note that, the specific manner of fusing the first gray scale image and the second gray scale image to obtain the fused gray scale image is not particularly limited in the present disclosure.
And step S230, performing terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a target terrain model after combining the basic terrain model and the combined terrain model.
In an example embodiment of the present disclosure, after the fused gray map is obtained through the above steps, the merged terrain model may be mapped to the base terrain model based on the fused gray map, to obtain a target terrain model after the base terrain model and the merged terrain model are merged. Specifically, the basic terrain model can be used as a frame or a foundation for terrain mapping, the basic terrain model can be used as a foundation layer of terrain mapping, information such as the height, the terrain features, the gradient or the slope direction of each position of the combined target terrain model is determined through fusion gray level diagrams, and the target terrain model is generated based on the information such as the height, the terrain features, the gradient or the slope direction of each position of the target terrain model.
For example, as shown in fig. 5a, a schematic diagram of a combined terrain model to a basic terrain model based on a fused gray scale map is shown, so as to obtain a target terrain model (side view) 503 after combining the basic terrain model (side view) 501 and the combined terrain model (side view) 502, wherein an arrow in the figure is a mapping direction of the terrain map, and a shadow part is the combined target terrain model (side view) 503; as shown in fig. 5b, another schematic diagram of performing terrain mapping on the merged terrain model to the basic terrain model based on the merged gray scale map to obtain a merged target terrain model (side view) 506 of the basic terrain model (side view) 504 and the merged terrain model (side view) 505, where an arrow in the figure is a mapping direction of the terrain mapping, and a shadow portion is the merged target terrain model (side view) 506.
In an example embodiment of the present disclosure, the region corresponding to the basic terrain model is larger than the region of the merged terrain model, and when the merged terrain model is mapped to the basic terrain model based on the merged gray map, there is a mapping region smaller than the region corresponding to the basic terrain model.
The specific manner of obtaining the target terrain model after combining the basic terrain model and the combined terrain model by performing terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map is not particularly limited.
In an example embodiment of the present disclosure, after the first gray scale map of the basic terrain model and the second gray scale map of the merged terrain model are obtained through the above steps, gray scales in the first gray scale map and/or the second gray scale map may be adjusted. Specifically, the adjustment of the gray scale in the first gray scale map and/or the second gray scale map refers to the adjustment of the height information of each position in the basic terrain model and/or the merged terrain model, that is, the adjustment of the gray scale at any position in the first gray scale map and/or the second gray scale map can be performed to control the height information of the final merged target terrain model, that is, the control of the height, the terrain feature, the gradient or the slope direction of the final merged target terrain model.
In an example embodiment of the present disclosure, a merge area that merges the merge terrain model into the base terrain model may be obtained, a third gray scale map is determined in the first gray scale map based on the merge area, and the third gray scale map is fused with the second gray scale map to obtain a fused gray scale map. Referring to fig. 6, determining a target terrain model based on the first terrain model and the second terrain model may include the following steps S610 to S630:
Step S610, acquiring a merging area for merging the merging terrain model into the basic terrain model;
in one example embodiment of the present disclosure, after the basic terrain model and the merged terrain model are obtained through the above steps, a merge area that merges the merged terrain model into the basic terrain model may be obtained. Specifically, the merging region in which the merged terrain model is merged into the base terrain model refers to a mapping region when the merged terrain model is mapped to the base terrain model based on the merged gray scale map, that is, a position where the base terrain model and the merged terrain model overlap when the base terrain model and the merged terrain model are merged.
Note that, the shape and position of the merging region are not particularly limited in the present disclosure.
Step S620, determining a third gray scale map in the first gray scale map based on the merge region; wherein the third gray scale map corresponds to the merging region;
in one example embodiment of the present disclosure, after determining the merge region, a third gray scale map may be determined in the first gray scale map based on the merge region. Wherein the third gray scale map corresponds to the merge region. Specifically, the third gray scale map is a gray scale map of a superposition portion of the first gray scale map and the second gray scale map in the first gray scale map, and the superposition portion corresponds to the merging region.
Step S630, fusing the third gray scale image and the second gray scale image to obtain a fused gray scale image.
In an example embodiment of the present disclosure, after the third gray scale map is obtained through the above steps, the third gray scale map and the second gray scale map may be fused to obtain a fused gray scale map. Specifically, the step of fusing the third gray scale image and the second gray scale image to obtain a fused gray scale image means that the gray scale image of the overlapping portion of the first gray scale image and the second gray scale image in the first gray scale image is fused with the second gray scale image, the size and the shape of the fused gray scale image obtained after the fusion are the same as those of the second gray scale image, and in the fused gray scale image, only the region corresponding to the third gray scale image is fused.
Specifically, when fusion is performed, a preset mode can be selected for fusion.
For example, the third gray scale map and the second gray scale map may be fused by superposition, averaging, multiplication, fusion, and the like to obtain a fused gray scale map.
In an example embodiment of the present disclosure, when the third gray scale map and the second gray scale map are fused to obtain a fused gray scale map, a maximum value of gray scales at the same position in the third gray scale map and the second gray scale map may be taken, and the fused gray scale map may be determined based on the maximum value of gray scales at each position.
In an example embodiment of the present disclosure, when the third gray scale map and the second gray scale map are fused to obtain a fused gray scale map, a minimum value of gray scales at the same position in the third gray scale map and the second gray scale map may be taken, and the fused gray scale map may be determined based on the minimum value of gray scales at each position.
In an example embodiment of the present disclosure, when the third gray scale map and the second gray scale map are fused to obtain a fused gray scale map, a specific position may be selected in the third gray scale map or the second gray scale map for fusion.
For example, a part of gray scale images may be selected from the second gray scale image and fused with the third gray scale image to obtain a fused gray scale image.
In an example embodiment of the present disclosure, when the third gray scale image and the second gray scale image are fused to obtain a fused gray scale image, partial features of the third gray scale image and the second gray scale image may be obtained in the third gray scale image and the second gray scale image, respectively, and fused based on the partial features of the third gray scale image and the partial features of the second gray scale image.
For example, when the third gray scale image and the second gray scale image are fused, the details of the third gray scale image can be emphasized, and the whole shape or texture feature of the second gray scale image is added, so that a better artistic effect is achieved.
Note that, the specific manner of fusing the third gray scale image and the second gray scale image to obtain the fused gray scale image is not particularly limited in the present disclosure.
Through steps S610 to S630, a merging area for merging the merged terrain model into the basic terrain model may be obtained, a third gray scale map is determined in the first gray scale map based on the merging area, and the third gray scale map and the second gray scale map are merged to obtain a merged gray scale map.
In an example embodiment of the present disclosure, a fourth gray scale map is determined in a first gray scale map according to a merging area, a merging terrain model is mapped to a base terrain model based on the merging gray scale map, a first terrain model obtained by merging the base terrain model and the merging terrain model at the merging area is obtained, a second terrain model at the base area is obtained according to the fourth gray scale map, and a target terrain model is determined based on the first terrain model and the second terrain model. Referring to fig. 7, determining a target terrain model based on the first terrain model and the second terrain model may include the following steps S710 to S730:
step S710, determining a fourth gray scale map in the first gray scale map according to the merging area;
in one example embodiment of the present disclosure, after the merging region is determined through the above-described steps, a fourth gray scale map may be determined in the first gray scale map according to the merging region. Wherein the fourth gray scale map corresponds to a base region outside the merge region. Specifically, in the first gray scale map, other areas except the merging area may be determined, and the gray scale map corresponding to the areas may be used as the fourth gray scale map.
Note that, the specific manner of determining the fourth gray scale map in the first gray scale map according to the merging area is not particularly limited in the present disclosure.
Step S720, performing terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a first terrain model obtained by combining the basic terrain model and the combined terrain model at the combined area;
in an example embodiment of the present disclosure, after the fused gray map is obtained through the above steps, the merged terrain model may be mapped to the base terrain model based on the fused gray map, to obtain a first terrain model in which the base terrain model and the merged terrain model are merged at the merging area. Specifically, the basic terrain model at the merging area can be used as a frame or foundation for terrain mapping, the basic terrain model at the merging area can be used as a foundation layer of terrain mapping, the information such as the height, the terrain features, the gradient or the slope direction of each position of the merged first terrain model at the merging area is determined through the merging gray map, and the first terrain model is generated based on the information such as the height, the terrain features, the gradient or the slope direction of each position at the merging area.
Step S730, obtaining a second terrain model at the base area according to the fourth gray scale map, and determining a target terrain model based on the first terrain model and the second terrain model.
In one example embodiment of the present disclosure, after the fourth gray scale map is obtained through the above steps, the second terrain model at the base area may be obtained based on the fourth gray scale map. Specifically, the fourth gray scale map may be used to indicate information such as a height, a topography feature, a gradient, or a slope direction of the second terrain model at each position of the base area, and the second terrain model may be generated based on the information such as the height, the topography feature, the gradient, or the slope direction of the second terrain model at each position of the base area.
In one example embodiment of the present disclosure, the target terrain model may be determined based on the first terrain model and the second terrain model. Specifically, the first terrain model and the second terrain model may be combined to obtain the target terrain model.
The specific manner of determining the target terrain model based on the first terrain model and the second terrain model is not particularly limited in this disclosure.
Through the steps S710 to S730, a fourth gray scale map may be determined in the first gray scale map according to the merging area, the merging terrain model may be mapped to the base terrain model based on the merging gray scale map, a first terrain model obtained by merging the base terrain model and the merging terrain model at the merging area may be obtained, a second terrain model obtained according to the fourth gray scale map, and the target terrain model may be determined based on the first terrain model and the second terrain model.
In an example embodiment of the present disclosure, a merged terrain model may be mapped to a base terrain model to obtain an initial terrain model based on a merged gray scale map, a plurality of terrain materials corresponding to the base terrain model and a plurality of terrain materials corresponding to the merged terrain model may be merged to obtain a plurality of target terrain materials, and the plurality of target terrain materials may be applied to the initial terrain model to obtain a target terrain model. Referring to fig. 8, applying a plurality of target terrain materials to an initial terrain model to obtain a target terrain model may include the following steps S810 to S830:
step S810, performing terrain mapping on the combined terrain model to a basic terrain model based on the fusion gray map to obtain an initial terrain model;
in one example embodiment of the present disclosure, after the fused gray map is obtained through the above steps, the initial terrain model may be obtained by performing terrain mapping on the combined terrain model based on the fused gray map. Specifically, the combined terrain model and the basic terrain model can be combined based on the fusion gray map to obtain an initial terrain model, wherein the initial terrain model has information such as height, terrain features, gradient or slope direction and does not have terrain materials.
Step S820, combining a plurality of terrain materials corresponding to the basic terrain model and a plurality of terrain materials corresponding to the combined terrain model to obtain a plurality of target terrain materials;
in an example embodiment of the present disclosure, when the merged terrain model is mapped to the base terrain model based on the merged gray map to obtain the initial terrain model through the above steps, a plurality of terrain materials corresponding to the base terrain model and a plurality of terrain materials corresponding to the merged terrain model may be merged to obtain a plurality of target terrain materials. Specifically, the basic terrain model corresponds to a plurality of terrain materials, the merging terrain model corresponds to a plurality of terrain materials, and the plurality of terrain materials corresponding to the basic terrain model and the plurality of terrain materials corresponding to the merging terrain model can be merged into a plurality of target terrain materials to be adopted by the target terrain model.
Wherein in the rendering of the terrain model, the terrain material may be used to describe the terrain surface appearance and texture. The terrain model may have a plurality of terrain materials, the material type of each terrain material being different, and the region of action of each terrain material may also be different.
Specifically, merging the plurality of terrain materials corresponding to the basic terrain model and the plurality of terrain materials corresponding to the merged terrain model into the plurality of target terrain materials to be adopted by the target terrain model may include directly merging the plurality of terrain materials corresponding to the basic terrain model and the plurality of terrain materials corresponding to the merged terrain model, or may include respectively performing operations such as merging, mixing, overlapping and the like on the plurality of terrain materials corresponding to the basic terrain model and the plurality of terrain materials corresponding to the merged terrain model so as to generate new terrain materials, wherein the new terrain materials are the target terrain materials.
The specific manner of combining the plurality of terrain materials corresponding to the basic terrain model and the plurality of terrain materials corresponding to the combined terrain model to obtain the plurality of target terrain materials is not particularly limited in the present disclosure.
In step S830, a plurality of target terrain materials are applied to the initial terrain model, so as to obtain a target terrain model.
In one example embodiment of the present disclosure, after obtaining the plurality of target terrain textures through the above steps, the plurality of target terrain textures may be applied to the initial terrain model to obtain the target terrain model. Specifically, in terrain rendering, a target terrain model is obtained by applying a plurality of target terrain materials to an initial terrain model, each target terrain material may be used to represent textures, attributes and patterns of different features, and each target terrain material may be applied to a different region of the initial terrain model.
The specific manner of obtaining the target terrain model by applying the plurality of target terrain materials to the initial terrain model is not particularly limited in the present disclosure.
Through the steps S810 to S830, the combined terrain model may be mapped to the basic terrain model to obtain the initial terrain model based on the fusion gray map, the plurality of terrain materials corresponding to the basic terrain model and the plurality of terrain materials corresponding to the combined terrain model may be combined to obtain the plurality of target terrain materials, and the plurality of target terrain materials may be applied to the initial terrain model to obtain the target terrain model.
In one example embodiment of the present disclosure, when the number of the plurality of target terrain textures is greater than a preset threshold, duplicate terrain textures are searched for in the plurality of target terrain textures, and duplicate terrain textures are deleted in the plurality of target terrain textures. Referring to fig. 9, deleting the repeated terrain texture among the plurality of target terrain textures may include the following steps S910 to S920:
step S910, searching for repeated terrain materials in the plurality of target terrain materials when the number of the plurality of target terrain materials is greater than a preset threshold;
in step S920, duplicate terrain materials are deleted from the plurality of target terrain materials.
In an example embodiment of the present disclosure, after the target terrain texture is obtained through the above steps, the repeated terrain texture may be searched for among the plurality of target terrain textures when the number of the plurality of target terrain textures is greater than a preset threshold. Specifically, in the three-dimensional modeling software, aiming at the same model, at most, a preset number of materials can be provided, when the number of the plurality of target topographic materials is larger than a preset threshold value, the number of the materials representing the current target topographic materials is larger than the preset threshold value, at this time, repeated topographic materials can be searched in the target topographic materials, and the repeated topographic materials are deleted, so that only one identical target topographic material exists, the number of the target topographic materials is reduced, and the number of the plurality of target topographic materials is ensured to be smaller than or equal to the preset threshold value.
In an example embodiment of the present disclosure, in the three-dimensional modeling software, the target terrain texture corresponds to a terrain texture ID (identifier), and the repeated terrain texture ID may be deleted, so that the target terrain texture corresponding to the terrain texture ID is deleted.
Through the steps S910 to S920, when the number of the plurality of target topographic materials is greater than the preset threshold, the repeated topographic materials may be searched for in the plurality of target topographic materials, and the repeated topographic materials may be deleted from the plurality of target topographic materials.
In one example embodiment of the present disclosure, a coverage relationship between a plurality of target terrain materials is adjusted. Specifically, a coverage relationship exists among the plurality of target topographic materials, and the coverage relationship among the target topographic materials can be adjusted in response to a coverage relationship adjustment operation.
For example, the target terrain materials include terrain material 1, terrain material 2, terrain material 3, terrain material 4, and before being adjusted, the coverage relationship of the target terrain materials is: the topography material 2, topography material 3, topography material 1, topography material 4, after adjusting, this coverage relation of a plurality of target topography materials is: topography material 3, topography material 2, topography material 1, topography material 4.
In an example embodiment of the present disclosure, in the three-dimensional modeling software, the target terrain texture corresponds to the terrain texture ID, and the terrain texture ID may be adjusted, so as to adjust the coverage relationship between the target terrain textures corresponding to the plurality of terrain texture IDs.
The specific manner of adjusting the coverage relationship between the plurality of target topographic materials is not particularly limited in the present disclosure.
In one example embodiment of the present disclosure, a texture conflict is found among a plurality of target terrain textures, and the conflicting terrain textures are merged. Specifically, when combining a plurality of terrain materials corresponding to a basic terrain model and a plurality of terrain materials corresponding to a combined terrain model, a situation of material collision occurs, specifically, in three-dimensional modeling software, a target terrain material corresponds to a terrain material ID, in the plurality of target terrain materials after combination, if the same terrain material ID corresponds to the same terrain material, no material collision exists, if the same terrain material ID corresponds to different terrain materials, the different terrain materials can generate material collision, and at this time, the target terrain materials generating the material collision can be combined.
In an example embodiment of the present disclosure, as shown in fig. 10, after merging a plurality of terrain materials corresponding to a basic terrain model and a plurality of terrain materials corresponding to a merged terrain model to obtain a plurality of target terrain materials, the following processing may be performed on the plurality of target terrain materials, and may include the following steps S1001 to S1006:
step S1001, judging whether the number of the plurality of target topographic materials is greater than a preset threshold;
step S1002, deleting repeated terrain materials from the plurality of target terrain materials when the number of the plurality of target terrain materials is larger than a preset threshold;
step S1003, adjusting the coverage relation among a plurality of target topographic materials;
step S1004, judging whether material conflicts exist in a plurality of target topographic materials;
step S1005, if yes, merging the conflicting terrain materials; combining to obtain a final target terrain material;
if not, step S1006 obtains the final target terrain texture.
In the terrain model merging method provided by the embodiment of the disclosure, a first gray level map of a basic terrain model can be obtained, a second gray level map of a merged terrain model is obtained, the first gray level map and the second gray level map are fused to obtain a fused gray level map, and the merged terrain model is subjected to terrain mapping to the basic terrain model based on the fused gray level map to obtain a target terrain model after the basic terrain model and the merged terrain model are merged. According to the scheme, after the basic terrain model and the combined terrain model needing to be combined are obtained, the respective gray maps can be combined, and terrain mapping is carried out based on the combined gray maps, so that the target terrain model after combination is obtained, the cost of manpower and material resources required for manufacturing the terrain model is reduced, the efficiency of constructing and manufacturing the terrain model is improved, and the artistic quality of the terrain model is guaranteed.
It is noted that the above-described figures are merely schematic illustrations of processes involved in a method according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
In addition, in an exemplary embodiment of the present disclosure, a terrain model merging device is also provided. Referring to fig. 11, a terrain model merging apparatus 1100 includes a gray map acquisition module 1110, a gray map fusion module 1120, and a terrain mapping module 1130.
The gray level map acquisition module is used for acquiring a first gray level map of the basic terrain model and acquiring a second gray level map of the combined terrain model; the gray level image fusion module is used for fusing the first gray level image and the second gray level image to obtain a fused gray level image; the terrain mapping module is used for carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a target terrain model after the basic terrain model and the combined terrain model are combined.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, before fusing the first gray scale map and the second gray scale map to obtain a fused gray scale map, the apparatus further includes: the gray scale adjusting unit is used for adjusting gray scales in the first gray scale image and/or the second gray scale image.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the fusing the first gray scale map and the second gray scale map to obtain a fused gray scale map, the apparatus further includes: a merging area determining unit for acquiring a merging area for merging the merging terrain model into the base terrain model; a third gray-scale image determining unit configured to determine a third gray-scale image among the first gray-scale images based on the merge region; wherein the third gray scale map corresponds to the merging region; and the first fusion unit is used for fusing the third gray level image and the second gray level image to obtain a fused gray level image.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, performing terrain mapping on the merged terrain model to the base terrain model based on the merged gray map to obtain a target terrain model after merging the base terrain model and the merged terrain model, where the apparatus further includes: a fourth gray-scale image determining unit configured to determine a fourth gray-scale image among the first gray-scale images according to the merge area; wherein the fourth gray scale map corresponds to a base region outside the merge region; the terrain mapping unit is used for carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a first terrain model obtained by combining the basic terrain model and the combined terrain model at the combined area; the first target terrain model determining unit is used for obtaining a second terrain model at the basic area according to the fourth gray level diagram, and determining the target terrain model based on the first terrain model and the second terrain model.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the base terrain model corresponds to a plurality of terrain materials, the merged terrain model corresponds to a plurality of terrain materials, and the merged terrain model is mapped to the base terrain model based on the merged gray map to obtain a target terrain model after merging the base terrain model and the merged terrain model, where the apparatus further includes: the initial terrain model acquisition unit is used for carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray level map to obtain an initial terrain model; the target terrain material acquisition unit is used for combining a plurality of terrain materials corresponding to the basic terrain model and a plurality of terrain materials corresponding to the combined terrain model to obtain a plurality of target terrain materials; and the second target terrain model determining unit is used for applying the plurality of target terrain materials to the initial terrain model to obtain a target terrain model.
In one exemplary embodiment of the present disclosure, based on the foregoing, the apparatus further comprises, prior to applying the plurality of target terrain textures to the initial terrain model: the repeated material searching unit is used for searching repeated topographic materials in the target topographic materials when the number of the target topographic materials is greater than a preset threshold value; and the repeated material deleting unit is used for deleting repeated topographic materials in the plurality of target topographic materials.
In an exemplary embodiment of the present disclosure, based on the foregoing, there is a coverage relationship between a plurality of target terrain materials, the apparatus further comprising, prior to applying the plurality of target terrain materials to the initial terrain model: and the coverage relation adjusting unit is used for adjusting the coverage relation among a plurality of target topographic materials.
In one exemplary embodiment of the present disclosure, based on the foregoing, the apparatus further comprises, prior to applying the plurality of target terrain textures to the initial terrain model: and the conflict material merging unit is used for searching the topography materials with material conflict in the target topography materials and merging the conflicting topography materials.
The terrain model merging device provided by the embodiment of the disclosure can obtain a first gray level map of a basic terrain model, obtain a second gray level map of a merged terrain model, merge the first gray level map and the second gray level map to obtain a merged gray level map, and map the merged terrain model to the basic terrain model based on the merged gray level map to obtain a target terrain model after the basic terrain model and the merged terrain model are merged. According to the scheme, after the basic terrain model and the combined terrain model needing to be combined are obtained, the respective gray maps can be combined, and terrain mapping is carried out based on the combined gray maps, so that the target terrain model after combination is obtained, the cost of manpower and material resources required for manufacturing the terrain model is reduced, the efficiency of constructing and manufacturing the terrain model is improved, and the artistic quality of the terrain model is guaranteed.
Since each functional module of the terrain model merging device according to the exemplary embodiment of the present disclosure corresponds to a step of the foregoing example embodiment of the terrain model merging method, for details not disclosed in the embodiment of the apparatus of the present disclosure, please refer to the foregoing embodiment of the terrain model merging method of the present disclosure.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, in the exemplary embodiment of the disclosure, an electronic device capable of implementing the terrain model merging method is also provided.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 1200 according to such an embodiment of the present disclosure is described below with reference to fig. 12. The electronic device 1200 shown in fig. 12 is merely an example, and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 12, the electronic device 1200 is in the form of a general purpose computing device. Components of electronic device 1200 may include, but are not limited to: the at least one processing unit 1210, the at least one memory unit 1220, a bus 1230 connecting the different system components (including the memory unit 1220 and the processing unit 1210), and a display unit 1240.
Wherein the storage unit stores program code that is executable by the processing unit 1210 such that the processing unit 1210 performs steps according to various exemplary embodiments of the present disclosure described in the above-described "exemplary methods" section of the present specification. For example, the processing unit 1210 may perform step S210 as shown in fig. 2: acquiring a first gray level map of a basic terrain model, and acquiring a second gray level map of a combined terrain model; step S220: fusing the first gray scale image and the second gray scale image to obtain a fused gray scale image; step S230: and carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a target terrain model after the basic terrain model and the combined terrain model are combined.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, before fusing the first gray scale map and the second gray scale map to obtain a fused gray scale map, the method further includes: and adjusting the gray scale in the first gray scale image and/or the second gray scale image.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, fusing the first gray scale map and the second gray scale map to obtain a fused gray scale map includes: acquiring a merging area for merging the merging terrain model into the basic terrain model; determining a third gray scale map in the first gray scale map based on the merge region; wherein the third gray scale map corresponds to the merging region; and fusing the third gray level image and the second gray level image to obtain a fused gray level image.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, performing terrain mapping on a merged terrain model to a base terrain model based on a merged gray scale map to obtain a target terrain model after merging the base terrain model and the merged terrain model, including: determining a fourth gray scale image in the first gray scale image according to the merging area; wherein the fourth gray scale map corresponds to a base region outside the merge region; performing terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a first terrain model obtained by combining the basic terrain model and the combined terrain model at the combining area; and obtaining a second terrain model at the basic area according to the fourth gray scale map, and determining a target terrain model based on the first terrain model and the second terrain model.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, a base terrain model corresponds to a plurality of terrain materials, a merged terrain model corresponds to a plurality of terrain materials, and the merged terrain model is mapped to the base terrain model based on a merged gray map to obtain a target terrain model after merging the base terrain model and the merged terrain model, including: performing terrain mapping on the combined terrain model to a basic terrain model based on the fusion gray map to obtain an initial terrain model; combining a plurality of terrain materials corresponding to the basic terrain model and a plurality of terrain materials corresponding to the combined terrain model to obtain a plurality of target terrain materials; and applying the plurality of target terrain materials to the initial terrain model to obtain a target terrain model.
In one exemplary embodiment of the present disclosure, based on the foregoing, the method further comprises, prior to applying the plurality of target terrain textures to the initial terrain model: searching repeated terrain materials in the target terrain materials when the number of the target terrain materials is larger than a preset threshold value; repeating terrain features are deleted from the plurality of target terrain features.
In an exemplary embodiment of the present disclosure, based on the foregoing aspect, there is a coverage relationship between the plurality of target terrain materials, the method further comprising, prior to applying the plurality of target terrain materials to the initial terrain model: and adjusting the coverage relation among a plurality of target terrain materials.
In one exemplary embodiment of the present disclosure, based on the foregoing, the method further comprises, prior to applying the plurality of target terrain textures to the initial terrain model: and searching the terrain materials with conflicting materials in the target terrain materials, and merging the conflicting terrain materials.
The electronic device provided by the embodiment of the disclosure can obtain a first gray scale image of a basic terrain model, obtain a second gray scale image of a combined terrain model, fuse the first gray scale image with the second gray scale image to obtain a fused gray scale image, and map the combined terrain model to the basic terrain model based on the fused gray scale image to obtain a target terrain model after the basic terrain model and the combined terrain model are combined. According to the scheme, after the basic terrain model and the combined terrain model needing to be combined are obtained, the respective gray maps can be combined, and terrain mapping is carried out based on the combined gray maps, so that the target terrain model after combination is obtained, the cost of manpower and material resources required for manufacturing the terrain model is reduced, the efficiency of constructing and manufacturing the terrain model is improved, and the artistic quality of the terrain model is guaranteed.
The storage unit 1220 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 1221 and/or cache memory unit 1222, and may further include Read Only Memory (ROM) 1223.
Storage unit 1220 may also include a program/utility 1224 having a set (at least one) of program modules 1225, such program modules 1225 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 1230 may be a local bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or using any of a variety of bus architectures.
The electronic device 1200 may also communicate with one or more external devices 1270 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1200, and/or any device (e.g., router, modem, etc.) that enables the electronic device 1200 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1250. Also, the electronic device 1200 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet through the network adapter 1260. As shown, the network adapter 1260 communicates with other modules of the electronic device 1200 over bus 1230. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 1200, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the present disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
In one example embodiment of the present disclosure, a first gray scale map of a base terrain model may be acquired, and a second gray scale map of a merged terrain model may be acquired; fusing the first gray scale image and the second gray scale image to obtain a fused gray scale image; and carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a target terrain model after the basic terrain model and the combined terrain model are combined.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, before fusing the first gray scale map and the second gray scale map to obtain a fused gray scale map, the method further includes: and adjusting the gray scale in the first gray scale image and/or the second gray scale image.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, fusing the first gray scale map and the second gray scale map to obtain a fused gray scale map includes: acquiring a merging area for merging the merging terrain model into the basic terrain model; determining a third gray scale map in the first gray scale map based on the merge region; wherein the third gray scale map corresponds to the merging region; and fusing the third gray level image and the second gray level image to obtain a fused gray level image.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, performing terrain mapping on a merged terrain model to a base terrain model based on a merged gray scale map to obtain a target terrain model after merging the base terrain model and the merged terrain model, including: determining a fourth gray scale image in the first gray scale image according to the merging area; wherein the fourth gray scale map corresponds to a base region outside the merge region; performing terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a first terrain model obtained by combining the basic terrain model and the combined terrain model at the combining area; and obtaining a second terrain model at the basic area according to the fourth gray scale map, and determining a target terrain model based on the first terrain model and the second terrain model.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, a base terrain model corresponds to a plurality of terrain materials, a merged terrain model corresponds to a plurality of terrain materials, and the merged terrain model is mapped to the base terrain model based on a merged gray map to obtain a target terrain model after merging the base terrain model and the merged terrain model, including: performing terrain mapping on the combined terrain model to a basic terrain model based on the fusion gray map to obtain an initial terrain model; combining a plurality of terrain materials corresponding to the basic terrain model and a plurality of terrain materials corresponding to the combined terrain model to obtain a plurality of target terrain materials; and applying the plurality of target terrain materials to the initial terrain model to obtain a target terrain model.
In one exemplary embodiment of the present disclosure, based on the foregoing, the method further comprises, prior to applying the plurality of target terrain textures to the initial terrain model: searching repeated terrain materials in the target terrain materials when the number of the target terrain materials is larger than a preset threshold value; repeating terrain features are deleted from the plurality of target terrain features.
In an exemplary embodiment of the present disclosure, based on the foregoing aspect, there is a coverage relationship between the plurality of target terrain materials, the method further comprising, prior to applying the plurality of target terrain materials to the initial terrain model: and adjusting the coverage relation among a plurality of target terrain materials.
In one exemplary embodiment of the present disclosure, based on the foregoing, the method further comprises, prior to applying the plurality of target terrain textures to the initial terrain model: and searching the terrain materials with conflicting materials in the target terrain materials, and merging the conflicting terrain materials.
The computer readable signal medium provided by the embodiment of the disclosure can obtain a first gray scale image of a basic terrain model, obtain a second gray scale image of a combined terrain model, fuse the first gray scale image with the second gray scale image to obtain a fused gray scale image, and map the combined terrain model to the basic terrain model based on the fused gray scale image to obtain a target terrain model after the basic terrain model and the combined terrain model are combined. According to the scheme, after the basic terrain model and the combined terrain model needing to be combined are obtained, the respective gray maps can be combined, and terrain mapping is carried out based on the combined gray maps, so that the target terrain model after combination is obtained, the cost of manpower and material resources required for manufacturing the terrain model is reduced, the efficiency of constructing and manufacturing the terrain model is improved, and the artistic quality of the terrain model is guaranteed.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described figures are only schematic illustrations of processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (11)

1. A terrain model merging method, the method comprising:
acquiring a first gray level map of a basic terrain model, and acquiring a second gray level map of a combined terrain model;
fusing the first gray scale image and the second gray scale image to obtain a fused gray scale image;
And carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a target terrain model after the basic terrain model and the combined terrain model are combined.
2. The method of claim 1, wherein prior to said fusing the first gray scale map with the second gray scale map to obtain a fused gray scale map, the method further comprises:
and adjusting gray scales in the first gray scale map and/or the second gray scale map.
3. The method of claim 1, wherein fusing the first gray scale map and the second gray scale map to obtain a fused gray scale map comprises:
acquiring a merging area for merging the merging terrain model into the basic terrain model;
determining a third gray scale map in the first gray scale map based on the merging region; wherein the third gray scale map corresponds to the merge region;
and fusing the third gray level image and the second gray level image to obtain a fused gray level image.
4. A method according to claim 3, wherein the performing terrain mapping on the combined terrain model to the base terrain model based on the fused gray scale map to obtain a target terrain model obtained by combining the base terrain model and the combined terrain model comprises:
Determining a fourth gray scale map in the first gray scale map according to the merging region; wherein the fourth gray scale map corresponds to a base region outside the merge region;
performing terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a first terrain model obtained by combining the basic terrain model and the combined terrain model at the combined area;
and obtaining a second terrain model at the basic area according to the fourth gray scale map, and determining a target terrain model based on the first terrain model and the second terrain model.
5. The method of claim 1, wherein the base terrain model corresponds to a plurality of terrain materials, the merged terrain model corresponds to a plurality of terrain materials, the mapping the merged terrain model to the base terrain model based on the merged gray scale map to obtain a target terrain model after merging the base terrain model and the merged terrain model, comprising:
performing terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain an initial terrain model;
Combining a plurality of terrain materials corresponding to the basic terrain model and a plurality of terrain materials corresponding to the combined terrain model to obtain a plurality of target terrain materials;
and applying the plurality of target terrain materials to the initial terrain model to obtain the target terrain model.
6. The method of claim 5, wherein prior to said applying said plurality of target terrain textures to said initial terrain model, said method further comprises:
searching repeated terrain materials in the target terrain materials when the number of the target terrain materials is larger than a preset threshold value;
deleting the repeated terrain material from the plurality of target terrain materials.
7. The method of claim 5, wherein there is a coverage relationship between the plurality of target terrain materials, the method further comprising, prior to said applying the plurality of target terrain materials to the initial terrain model:
and adjusting the coverage relation among the plurality of target terrain materials.
8. The method of claim 5, wherein prior to said applying said plurality of target terrain textures to said initial terrain model, said method further comprises:
And searching the terrain materials with conflicting materials in the target terrain materials, and merging the conflicting terrain materials.
9. A terrain model merging device, the device comprising:
the gray level map acquisition module is used for acquiring a first gray level map of the basic terrain model and acquiring a second gray level map of the combined terrain model;
the gray level image fusion module is used for fusing the first gray level image and the second gray level image to obtain a fused gray level image;
and the terrain mapping module is used for carrying out terrain mapping on the combined terrain model to the basic terrain model based on the fusion gray map to obtain a target terrain model after the basic terrain model and the combined terrain model are combined.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1-8.
11. An electronic device, comprising:
one or more processors; and
a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-8.
CN202311798769.8A 2023-12-25 2023-12-25 Terrain model merging method and device, storage medium and electronic equipment Pending CN117788772A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311798769.8A CN117788772A (en) 2023-12-25 2023-12-25 Terrain model merging method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311798769.8A CN117788772A (en) 2023-12-25 2023-12-25 Terrain model merging method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117788772A true CN117788772A (en) 2024-03-29

Family

ID=90393836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311798769.8A Pending CN117788772A (en) 2023-12-25 2023-12-25 Terrain model merging method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117788772A (en)

Similar Documents

Publication Publication Date Title
CN111340928B (en) Ray tracing-combined real-time hybrid rendering method and device for Web end and computer equipment
CN109771951B (en) Game map generation method, device, storage medium and electronic equipment
CN111467806B (en) Method, device, medium and electronic equipment for generating resources in game scene
CN108449409B (en) Animation pushing method, device, equipment and storage medium
Tasse et al. Enhanced texture‐based terrain synthesis on graphics hardware
CN113498532B (en) Display processing method, display processing device, electronic apparatus, and storage medium
JP2023029984A (en) Method, device, electronic apparatus, and readable storage medium for generating virtual image
CN104599315A (en) Three-dimensional scene construction method and system
CN109671147B (en) Texture map generation method and device based on three-dimensional model
CN109754464B (en) Method and apparatus for generating information
CN109766319B (en) Compression task processing method and device, storage medium and electronic equipment
CN113313832B (en) Semantic generation method and device of three-dimensional model, storage medium and electronic equipment
US20230125255A1 (en) Image-based lighting effect processing method and apparatus, and device, and storage medium
CN111784817B (en) Shadow display method and device, storage medium and electronic device
CN112717414A (en) Game scene editing method and device, electronic equipment and storage medium
CN110555916B (en) Terrain editing method and device for virtual scene, storage medium and electronic equipment
WO2023197911A1 (en) Three-dimensional virtual object generation method and apparatus, and device, medium and program product
CN110378948B (en) 3D model reconstruction method and device and electronic equipment
CN109816791B (en) Method and apparatus for generating information
CN117788772A (en) Terrain model merging method and device, storage medium and electronic equipment
CN114344894B (en) Scene element processing method, device, equipment and medium
CN113034658B (en) Method and device for generating model map
CN114255312A (en) Processing method and device of vegetation image and electronic equipment
CN111569418B (en) Rendering method, device and medium for content to be output and electronic equipment
CN110363860B (en) 3D model reconstruction method and device and electronic equipment

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