CN110288690B - Method and device for generating mountain in sand table map, storage medium and processor - Google Patents
Method and device for generating mountain in sand table map, storage medium and processor Download PDFInfo
- Publication number
- CN110288690B CN110288690B CN201910563196.8A CN201910563196A CN110288690B CN 110288690 B CN110288690 B CN 110288690B CN 201910563196 A CN201910563196 A CN 201910563196A CN 110288690 B CN110288690 B CN 110288690B
- Authority
- CN
- China
- Prior art keywords
- mountain
- model
- models
- bodies
- generating
- 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.)
- Active
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/60—Generating 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/04—Texture mapping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/05—Geographic models
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Graphics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Remote Sensing (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a generation method and device of mountain bodies in a sand table map, a storage medium and a processor. Wherein the method comprises the following steps: determining the outline of each mountain in a plurality of mountain bodies needed in the virtual scene, and generating a height map of each mountain body based on the outline of each mountain body; inputting the height map of each mountain into a predetermined game engine, and generating a mountain model of each mountain in a plurality of mountain in the predetermined game engine; fusing the mountain models of the plurality of mountain bodies to obtain a fused mountain model; and generating the fused mountain model into a sand table map. The invention solves the technical problem that the manufacturing of mountain bodies in the sand table map is complex in the development process of the simulated game SLG in the related technology.
Description
Technical Field
The invention relates to the technical field of mountain fusion in virtual scenes, in particular to a method and a device for generating mountain in a sand table map, a storage medium and a processor.
Background
In the development process of the simulated game SLG, the production of the sand table map and the artistic effect are difficult, and the mountain is a resource with large quantity and large volume in the sand table map, so that the influence on the artistic effect is very important. At present, the engagement mode of mountain bodies in a sand table map is generally as follows: tangent or intersecting. Fig. 1 is a schematic view of mountain engagement in a sand table map according to the prior art, as shown in fig. 1, including an intersecting engagement and a tangential engagement. The connecting mode is not only wasteful of the number of faces of the mountain model, but also increases the amount of art resources, and can not accurately judge that the inner inclined part of the mountain is swallowed when the mountain is crossed, so that the effect of random splicing is poor, and the consumption of the tangential mountain to the performance is more serious.
The mountain engagement method in the related art is realized by either overlapping the mountain in front of each other, inserting one mountain into the other mountain directly, or cutting off the invisible part. In addition, in order to maintain the diversity of each mountain in the mountain, a very large number of mountain models need to be manufactured, so that the manufacturing mode is complicated and consumes much, the artistic effect can only be manually processed, and a relatively random, real and natural effect cannot be generated.
Aiming at the problem that the manufacturing of mountain bodies in a sand table map is complex in the development process of the simulated game SLG in the related technology, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for generating mountain bodies in a sand table map, a storage medium and a processor, which are used for at least solving the technical problem that the manufacturing of the mountain bodies in the sand table map is complex in the development process of a simulation game SLG in the related art.
According to an aspect of the embodiment of the invention, there is provided a method for generating a mountain in a sand table map, including: determining the outline of each mountain in a plurality of mountain bodies required in a virtual scene, and generating a height map of each mountain body based on the outline of each mountain body; inputting the height map of each mountain into a predetermined game engine, and generating a mountain model of each mountain in the plurality of mountain in the predetermined game engine; fusing the mountain models of the plurality of mountain bodies to obtain a fused mountain model; and generating the fused mountain model into a sand table map.
Optionally, generating the height map of each mountain based on the profile of each mountain includes: taking the characteristic data corresponding to the outline of each mountain as the input of model making software, wherein the characteristic data is used for describing at least one of the following information of each mountain: height, length, width, color, material; and generating a height map of each mountain based on the characteristic data by using the model making software.
Optionally, generating a mountain model for each of the plurality of mountains in the predetermined game engine includes: determining a predetermined element based on a mountain display effect required in the virtual scene, wherein the predetermined element includes at least one of: the normal line is used for carrying out visual enhancement on the height map under a preset scene, the mapping is used for representing the colors and materials of the mountain model, and the mask layer is used for assisting the mapping to adjust the mountain display effect; and generating a mountain model of each mountain in the plurality of mountain bodies based on the height map of each mountain body and combining the predetermined elements and the characteristic data.
Optionally, generating a mountain model of each mountain of the plurality of mountain based on the height map of each mountain and in combination with the predetermined element and the feature data includes: and rendering the predetermined elements on the height map of each mountain based on the characteristic data to generate a mountain model of each mountain of the plurality of mountains.
Optionally, before fusing the mountain models of the plurality of mountain bodies to obtain the fused mountain model, the method further includes: determining a splicing rule of the plurality of mountains based on a mountain display effect required in the virtual scene, wherein the mountain display effect comprises at least one of the following: the number of mountain groups needed in the virtual scene, the length of each mountain, and the trend of each mountain.
Optionally, fusing the mountain models of the plurality of mountain bodies, and obtaining the fused mountain model includes: grouping the plurality of mountain bodies based on the number of mountain body groups and the length of each mountain body group to obtain a plurality of mountain bodies, wherein each mountain body in the plurality of mountain bodies represents a mountain range; determining a connection mode of a plurality of mountain models in each group of mountain based on the trend of each group of mountain in the virtual scene; and fusing a plurality of mountain models in each group of mountain based on the connection mode to obtain fused mountain models.
Optionally, before fusing the mountain models of the plurality of mountain, the method further comprises: determining basic plots of mountain models of the plurality of mountain bodies, wherein the basic plots are obtained by splicing a plurality of graphs, and each mountain model corresponds to part of the graphs; and displaying mountain models of the plurality of mountain bodies in the basic land block based on the height map.
Optionally, fusing the plurality of mountain models in each set of mountain based on the linking mode includes: determining position information of a graph which needs to be overlapped with a part of graphs corresponding to adjacent mountain models in the part of graphs corresponding to the mountain models in each group of mountain based on the connection mode, wherein the part of graphs belong to the basic land block; and fusing the mountain models in each group of mountain based on the position information.
According to another aspect of the embodiment of the present invention, there is also provided a device for generating a mountain in a sand table map, including: a first determining unit, configured to determine a contour of each of a plurality of mountain bodies required in a virtual scene, and generate a height map of each mountain body based on the contour of each mountain body; an input unit configured to input the height map of each of the plurality of mountains into a predetermined game engine in which a mountain model of each of the plurality of mountains is generated; the fusion unit is used for fusing the mountain models of the plurality of mountain bodies to obtain a fused mountain model; and the generation unit is used for generating the fused mountain model into the sand table map.
Optionally, the first determining unit includes: the first determining module is used for taking characteristic data corresponding to the outline of each mountain as input of model making software, wherein the characteristic data is used for describing at least one of the following information of each mountain: height, length, width, color, material; and the first generation module is used for generating a height map of each mountain based on the characteristic data by using the model making software.
Optionally, the input unit includes: a second determining module, configured to determine a predetermined element based on a mountain display effect required in the virtual scene, where the predetermined element includes at least one of: the normal line is used for carrying out visual enhancement on the height map under a preset scene, the mapping is used for representing the colors and materials of the mountain model, and the mask layer is used for assisting the mapping to adjust the mountain display effect; and the second generation module is used for generating a mountain model of each mountain in the plurality of mountain bodies based on the height map of each mountain body and combining the predetermined elements and the characteristic data.
Optionally, the second generating module includes: and the generation sub-module is used for rendering the predetermined elements on the height map of each mountain based on the characteristic data so as to generate a mountain model of each mountain in the plurality of mountain.
Optionally, the apparatus further comprises: the second determining unit is configured to determine, before fusing the mountain models of the plurality of mountain bodies to obtain the fused mountain model, a splicing rule of the plurality of mountain bodies based on a mountain display effect required in the virtual scene, where the mountain display effect includes at least one of: the number of mountain groups needed in the virtual scene, the length of each mountain, and the trend of each mountain.
Optionally, the fusion unit includes: the grouping module is used for grouping the plurality of mountain bodies based on the mountain body group number and the length of each group of mountain bodies to obtain a plurality of groups of mountain bodies, wherein each group of mountain bodies in the plurality of groups of mountain bodies represents a mountain range; the third determining module is used for determining the connection mode of the plurality of mountain models in each group of mountain based on the trend of each group of mountain in the virtual scene; and the first fusion module is used for fusing the plurality of mountain models in each group of mountain based on the connection mode to obtain fused mountain models.
Optionally, the apparatus further comprises: a third determining unit, configured to determine a base plot of mountain models of the plurality of mountain bodies before fusing the mountain models of the plurality of mountain bodies, where the base plot is obtained by stitching a plurality of graphics, and each mountain model corresponds to a part of the graphics in the plurality of graphics; and a display unit for displaying mountain models of the plurality of mountains in the base land parcel based on the height map.
Optionally, the fusion module includes: a fourth determining module, configured to determine, based on the connection manner, position information of a graph that needs to overlap with a partial graph corresponding to an adjacent mountain model in the partial graphs corresponding to the mountain models in each group of mountain, where the partial graphs belong to the base plot; and the second fusion module is used for fusing the mountain models in each group of mountain based on the position information.
According to another aspect of the embodiment of the present invention, there is further provided a storage medium, where the storage medium includes a stored program, and when the program runs, the device where the storage medium is controlled to execute the method for generating a mountain in a sand table map according to any one of the above.
According to another aspect of the embodiment of the present invention, there is further provided a processor, configured to execute a program, where the program executes the method for generating a mountain in a sand table map according to any one of the above.
In the embodiment of the invention, the contour of each mountain in a plurality of mountain bodies needed in a virtual scene is determined, and a height map of each mountain body is generated based on the contour of each mountain body; inputting the height map of each mountain into a preset game engine, and generating a mountain model of each mountain in a plurality of mountain in the preset game engine; the mountain models of a plurality of mountain bodies are fused, the mountain bodies needed in the sand table map are manufactured in a mode of obtaining the fused mountain body model, the mountain body height map can be generated based on the outline of the mountain bodies by the method for generating the mountain bodies in the sand table map, the mountain body height map is used as the input of a preset game engine, the mountain body model is obtained after the height map is processed, the mountain body model is fused, the fused mountain body model is generated into the sand table map, the purpose of generating the mountain body model based on the height map is achieved, the technical effect of improving the mountain body generation efficiency is achieved, and the technical problem that the manufacturing of the mountain bodies in the sand table map is complex in the development process of the simulated game SLG in the related art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a schematic illustration of mountain engagement in a sand table map according to the prior art;
FIG. 2 is a flow chart of a method of generating a mountain in a sand table map according to an embodiment of the present invention;
FIG. 3 (a) is a schematic diagram of a masking layer according to an embodiment of the present invention;
FIG. 3 (b) is a schematic illustration of a height diagram according to an embodiment of the invention;
FIG. 3 (c) is a schematic illustration of normals and a map according to an embodiment of the invention;
FIG. 4 is a schematic illustration of a basic plot-based mountain model, according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of mountain model fusion in accordance with an embodiment of the invention;
FIG. 6 (a) is a schematic diagram of a mountain generated in a sand table map according to the prior art;
FIG. 6 (b) is a schematic illustration of a mountain generated in a sand table map according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a generation apparatus of mountain bodies in a sand table map according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, there is provided a method embodiment of a method for generating a mountain in a sand table map, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different from that herein.
Fig. 2 is a flowchart of a method for generating a mountain in a sand table map according to an embodiment of the present invention, as shown in fig. 2, the method for generating a mountain in a sand table map includes the steps of:
step S202, determining the outline of each mountain in a plurality of mountain bodies needed in the virtual scene, and generating a height map of each mountain body based on the outline of each mountain body.
In addition, the contour of each of the plurality of mountains may be determined based on a requirement for an overall effect of the mountain in the virtual scene. That is, the contours of a plurality of mountains required in the course of making the sand table map may be determined based on the overall effect on the mountains in the virtual scene. The profile may be used to represent features of the mountain and the feature data may be used to represent the mountain.
In an alternative embodiment, generating a height map for each mountain based on the profile of each mountain may include: taking the feature data corresponding to the outline of each mountain as the input of model making software, wherein the feature data is used for describing at least one of the following information of each mountain: height, length, width, color, material; and generating a height map of each mountain based on the characteristic data by using model making software.
The modeling software may include, but is not limited to, the following: ZBrush, world Machine, world Creator. Specifically, the feature data corresponding to the contour of each mountain may be input to the modeling software, and then the feature data may be converted in the modeling software to output the height map. The height map is a gray map, each pixel represents the height of one sampling point, the gray scale range of the gray map is 0 to 255, the gray value 0 of the gray map represents the lowest point of the mountain, and the gray value 255 of the gray map represents the highest point of the mountain.
Step S204, inputting the height map of each mountain into a predetermined game engine, and generating a mountain model of each mountain in a plurality of mountain in the predetermined game engine.
The predetermined game engine is not specifically limited in the embodiment of the present invention, and may be any one or more game engines corresponding to a game that requires the virtual scene provided by the embodiment of the present invention.
In step S204, generating a mountain model of each of the plurality of mountain bodies in the predetermined game engine may include: determining a predetermined element based on a desired mountain display effect in the virtual scene, wherein the predetermined element may include at least one of: the normal line is used for carrying out visual enhancement on the height map under a preset scene, the mapping is used for representing the color and the material of the mountain model, and the mask layer is used for assisting the mapping to adjust the mountain display effect; a mountain model of each of the plurality of mountain bodies is generated based on the height map of each mountain body in combination with the predetermined element and the feature data.
FIG. 3 (a) is a schematic diagram of a mask layer according to an embodiment of the present invention, where the mask layer may be used to control a display area of a mountain, and in particular, may also be used to assist in mapping to adjust a display effect of the mountain; in addition, the shade layer blend is output by the world machine software, the required effect can be obtained through adjustment, the pure white value 255 represents complete display, and the pure black value 0 represents complete non-display; FIG. 3 (b) is a schematic diagram of a height map, as shown in FIG. 3 (b), according to an embodiment of the present invention, which is a gray scale map, different gray scale values may represent heights of different areas of a mountain; fig. 3 (c) is a schematic diagram of a normal line and a map according to an embodiment of the present invention, where the normal line (left) may represent details of the height map in the case of a low model area, and the height map is visually enhanced, and the map (right), i.e., a color map, is used to represent colors and materials of a mountain, as shown in fig. 3 (c).
Further, generating a mountain model of each of the plurality of mountain based on the height map of each mountain in combination with the predetermined element and the feature data may include: predetermined elements are rendered onto the height map of each mountain based on the feature data to generate a mountain model of each of the plurality of mountain.
For example, the color, length, height, width, etc. of the mountain may be determined based on the feature data; in addition, a map, a normal, or the like may be created based on the feature data.
Through the above-described schemes in step S202 to step S204, it can be known that a height map of each mountain is generated based on the contour of each of a plurality of mountains in the virtual scene, and a mountain model is generated based on the height map in a predetermined game engine. That is, in the embodiment of the present invention, the mountain in the sand table map is not applied to the solid model, but a precise height map is required to be made of the mountain outline, and the mountain model is generated based on the height map and in combination with predetermined elements such as the normal line, the map, the mask layer, and the like. And the mountain model is generated through the height map, so that a lot of art resources are saved compared with the traditional 3D mountain model.
Step S206, fusing the mountain models of the plurality of mountain bodies to obtain a fused mountain model.
And step S208, generating the fused mountain model into a sand table map.
Through the steps, the outline of each mountain in a plurality of mountain bodies needed in the virtual scene can be determined, and a height map of each mountain body is generated based on the outline of each mountain body; inputting the height map of each mountain into a predetermined game engine, and generating a mountain model of each mountain in a plurality of mountain in the predetermined game engine; fusing the mountain models of the plurality of mountain bodies to obtain a fused mountain model; and generating the fused mountain model into a sand table map. Compared with the defect of low efficiency of mountain making caused by directly making a large number of entity mountain models when mountain bodies required by a sand table map are made in the related art, the mountain body generating method in the sand table map provided by the embodiment of the invention can generate a mountain body height map based on the outline of the mountain body, process the mountain body height map as the input of a preset game engine to obtain the mountain body model, fuse the mountain body models, and generate the fused mountain body model into the sand table map, thereby realizing the purpose of generating the mountain body model based on the height map, achieving the technical effect of improving the mountain body generating efficiency and further solving the technical problem that the mountain body in the sand table map is relatively complex in the development process of the simulated game SLG in the related art.
In addition, compared with the prior art, after the manufactured physical mountain model is manufactured, the manufactured physical mountain model is overlapped, or one physical mountain model is directly inserted into the other physical mountain model, or the invisible part inserted into the other physical mountain model is directly cut off, so that the display reality of the fused mountain is lower. In the embodiment of the invention, a new splicing rule is determined for the generated multiple mountain models. Therefore, before fusing the mountain models of the plurality of mountain bodies to obtain the fused mountain model, the method further comprises: determining a splicing rule of a plurality of mountain bodies based on mountain body display effects required in the virtual scene, wherein the mountain body display effects comprise at least one of the following: the number of mountain groups needed in the virtual scene, the length of each mountain, and the trend of each mountain.
Preferably, fusing the mountain models of the plurality of mountain bodies to obtain the fused mountain model may include: grouping a plurality of mountain bodies based on the number of mountain body groups and the length of each mountain body group to obtain a plurality of mountain bodies, wherein each mountain body in the plurality of mountain bodies represents a mountain range; determining a connection mode of a plurality of mountain models in each group of mountain based on the trend of each group of mountain in the virtual scene; and fusing a plurality of mountain models in each group of mountain based on the connection mode to obtain the fused mountain model. That is, in the embodiment of the present invention, the number of the mountain bodies of each group is determined based on the required mountain length in the sand table map, and for example, every 12 mountain bodies may be divided into one group to constitute one mountain.
In addition, before fusing the mountain models of the plurality of mountain bodies, the method further comprises: determining basic plots of mountain models of a plurality of mountain bodies, wherein the basic plots are obtained by splicing a plurality of graphs, and each mountain model corresponds to part of the graphs in the plurality of graphs; a mountain model of a plurality of mountain is displayed in the base land mass based on the height map. In addition, because of the inherent number of the basic land, countless mountains on the sand table map do not generate additional molding surface numbers, and resources are greatly saved.
That is, in the embodiment of the present invention, the carrier of the mountain model is a basic land block, and the basic land block is obtained by splicing a plurality of graphics. In the case where the pattern is rectangular, the mountain model is produced based on a foundation land block obtained by splicing the rectangles. Fig. 4 is a schematic diagram of a mountain model based on a basic land block according to an embodiment of the present invention, as shown in fig. 4, a rectangular stack is formed when two mountain models are spliced in each of a plurality of mountain models, so that the mountain models are fused more naturally.
The area of the foundation land may be set based on the number of mountains in the sand table map, for example, 256×256.
Specifically, fusing the plurality of mountain models in each group of mountain based on the engagement manner may include: determining position information of a graph which needs to be overlapped with a part of graphs corresponding to adjacent mountain models in the part of graphs corresponding to the mountain models in each group of mountain based on a connection mode, wherein the part of graphs belong to a basic land block; the mountain models in each set of mountain are fused based on the position information.
After the number and the connection mode of a group of mountain bodies are set, the mountain body model can be drawn into the basic land block according to the set splicing rule, wherein the area displayed by the mountain bodies can be controlled by the mask layer. It is easy to notice that a land is overlapped when the mountain bodies are connected, and the mountain bodies are fused in the overlapped land. Wherein fig. 5 is a schematic diagram of mountain model fusion according to an embodiment of the present invention, as shown in fig. 5, 7 mountain models (i.e., mountain models 1, … … mountain model 7 shown in fig. 5) are configured for mountain fusion, wherein fig. 5 also shows an effect after the mountain model 1 and the mountain model 4 are spliced (i.e., initial spliced mountain 1 in fig. 5), as shown in fig. 5, the initial spliced mountain is formed by splicing 2 mountain models 1 and one mountain model 4; specifically, the mountain model 1 to be spliced and a rectangle at the splice of the mountain model 4 are placed in an overlapping manner. In addition, fig. 5 also shows an effect diagram of one fused mountain after the above 7 mountain models are spliced and fused, that is, the fused mountain 1 in fig. 5. It should be noted that the mountain model can be spliced in any pair according to actual display requirements.
Wherein, fig. 6 (a) is a schematic view of a mountain generated in a sand table map according to the prior art, and fig. 6 (b) is a schematic view of a mountain generated in a sand table map according to an embodiment of the present invention, and as can be seen from comparison of fig. 6 (a) and fig. 6 (b), the mountain generated in a sand table according to the prior art is not high in reality and is not natural enough; the mountain body generated in the sand table by the method for generating the mountain body in the sand table map provided by the embodiment of the invention is high in authenticity and natural.
From the above, it can be seen that the method for generating a mountain in a sand table map provided by the embodiment of the invention can be used for manufacturing a height map of a mountain through model manufacturing software such as World Machine, and generating a mountain model based on the height map to manufacture the mountain, so that the defects that the mountain manufactured by a physical mountain model is unreal and the details are not abundant in the prior art are perfectly overcome; in addition, through the fusion of pictures, the mountain is perfectly fused in the joined place, the problems that the traditional mountain cannot be randomly spliced and the artistic effect is poor are solved, the random splicing and fusion of a group of mountain is realized through mountain model fusion, the repeated sense is completely avoided, the size of the bag body is greatly reduced, and the loading speed of a sand table map is greatly improved.
Example 2
According to another aspect of the embodiment of the present invention, there is provided a device for generating mountain in a sand table map, where it is noted that the device for generating mountain in a sand table map may perform the method for generating mountain in a sand table map in the embodiment 1, and fig. 7 is a schematic diagram of the device for generating mountain in a sand table map according to the embodiment of the present invention, and as shown in fig. 7, the device for generating mountain in a sand table map includes: a first determination unit 71, an input unit 73, a fusion unit 75, and a generation unit 77. The generation device of the mountain in the sand table map will be described in detail.
Wherein the first determining unit 71 is configured to determine a contour of each of a plurality of mountain bodies required in the virtual scene, and generate a height map of each mountain body based on the contour of each mountain body.
An input unit 73 for inputting the height map of each mountain into a predetermined game engine in which a mountain model of each of a plurality of mountain is generated.
And a fusion unit 75, configured to fuse the mountain models of the plurality of mountain bodies to obtain a fused mountain model.
And the generating unit 77 is used for generating the fused mountain model into the sand table map.
Here, the above-described first determining unit 71, input unit 73, fusion unit 75, and generation unit 77 correspond to steps S202 to S208 in embodiment 1, and the above-described modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in embodiment 1. It should be noted that the modules described above may be implemented as part of an apparatus in a computer system, such as a set of computer-executable instructions.
As can be seen from the above, in the above-described embodiments of the present invention, it is possible to determine the contour of each of a plurality of mountains required in a virtual scene using a first determination unit, and generate a height map of each mountain based on the contour of each mountain; then, inputting the height map of each mountain into a predetermined game engine by using an input unit, and generating a mountain model of each of a plurality of mountain in the predetermined game engine; then, fusing the mountain models of the plurality of mountain bodies by utilizing a fusion unit to obtain a fused mountain model; and generating the fused mountain model into the sand table map by using the generating unit. Compared with the defect of low efficiency of mountain making caused by directly making a large number of entity mountain models when mountain bodies required by a sand table map are made in the related art, the mountain body generating device in the sand table map provided by the embodiment of the invention can generate a mountain body height map based on the outline of the mountain body, process the mountain body height map as the input of a preset game engine to obtain the mountain body model, fuse the mountain body models, and generate the fused mountain body model into the sand table map, thereby realizing the purpose of generating the mountain body model based on the height map, achieving the technical effect of improving the mountain body generating efficiency, and further solving the technical problem that the mountain body in the sand table map is relatively complex in the development process of the simulated game SLG in the related art.
In an alternative embodiment, the first determining unit comprises: the first determining module is used for taking feature data corresponding to the outline of each mountain as input of model making software, wherein the feature data is used for describing at least one of the following information of each mountain: height, length, width, color, material; and the first generation module is used for generating a height map of each mountain based on the characteristic data by using model making software.
In an alternative embodiment, the input unit comprises: a second determining module, configured to determine a predetermined element based on a mountain display effect required in the virtual scene, where the predetermined element includes at least one of: the normal line is used for carrying out visual enhancement on the height map under a preset scene, the mapping is used for representing the color and the material of the mountain model, and the mask layer is used for assisting the mapping to adjust the mountain display effect; and the second generation module is used for generating a mountain model of each mountain in the plurality of mountain based on the height map of each mountain and combining the predetermined elements and the characteristic data.
In an alternative embodiment, the second generating module includes: and the generation sub-module is used for rendering the predetermined elements on the height map of each mountain based on the characteristic data so as to generate a mountain model of each mountain in the plurality of mountain.
In an alternative embodiment, the apparatus further comprises: the second determining unit is configured to determine, before fusing the mountain models of the plurality of mountain bodies to obtain the fused mountain model, a splicing rule of the plurality of mountain bodies based on a mountain display effect required in the virtual scene, where the mountain display effect includes at least one of: the number of mountain groups needed in the virtual scene, the length of each mountain, and the trend of each mountain.
In an alternative embodiment, the fusion unit comprises: the grouping module is used for grouping a plurality of mountain bodies based on the number of mountain body groups and the length of each mountain body group to obtain a plurality of groups of mountain bodies, wherein each group of mountain bodies in the plurality of groups of mountain bodies represents a mountain range; the third determining module is used for determining the connection mode of a plurality of mountain models in each group of mountain based on the trend of each group of mountain in the virtual scene; and the first fusion module is used for fusing a plurality of mountain models in each group of mountain based on a connection mode to obtain fused mountain models.
In an alternative embodiment, the apparatus further comprises: the third determining unit is used for determining basic plots of the mountain models of the mountain bodies before the mountain model of the mountain bodies are fused, wherein the basic plots are spliced based on the graphics, and each mountain model corresponds to part of the graphics in the graphics; and a display unit for displaying mountain models of a plurality of mountains in the basic land parcel based on the height map.
In an alternative embodiment, the fusion module includes: a fourth determining module, configured to determine, based on a connection manner, position information of a graph that needs to overlap with a partial graph corresponding to an adjacent mountain model in partial graphs corresponding to mountain models in each group of mountain, where the partial graphs belong to a basic land block; and the second fusion module is used for fusing the mountain models in each group of mountain based on the position information.
Example 3
According to another aspect of the embodiment of the present invention, there is further provided a storage medium, where the storage medium includes a stored program, and when the program runs, the device where the storage medium is controlled to execute the method for generating a mountain in the sand table map according to any one of the foregoing embodiment 1.
Example 4
According to another aspect of the embodiment of the present invention, there is further provided a processor, configured to execute a program, where the program executes the method for generating a mountain in a sand table map according to any one of the foregoing embodiments 1.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The 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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.
Claims (10)
1. The generation method of the mountain in the sand table map is characterized by comprising the following steps of:
determining the outline of each mountain in a plurality of mountain bodies required in a virtual scene, and generating a height map of each mountain body based on the outline of each mountain body;
inputting the height map of each mountain into a predetermined game engine, and generating a mountain model of each mountain in the plurality of mountain in the predetermined game engine;
fusing the mountain models of the plurality of mountain bodies to obtain a fused mountain model;
generating the fused mountain model into a sand table map;
before the mountain models of the mountain are fused, determining basic plots of the mountain models of the mountain, wherein the basic plots are obtained by splicing a plurality of graphs, and each mountain model corresponds to part of the graphs; and displaying mountain models of the plurality of mountain bodies in the basic land block based on the height map of each mountain body.
2. The method of claim 1, wherein generating a height map for each mountain based on the profile of each mountain comprises:
taking the characteristic data corresponding to the outline of each mountain as the input of model making software, wherein the characteristic data is used for describing at least one of the following information of each mountain: height, length, width, color, material;
and generating a height map of each mountain based on the characteristic data by using the model making software.
3. The method of claim 2, wherein generating a mountain model for each of the plurality of mountain bodies in the predetermined game engine comprises:
determining a predetermined element based on a mountain display effect required in the virtual scene, wherein the predetermined element includes at least one of: the normal line is used for carrying out visual enhancement on the height map under a preset scene, the mapping is used for representing the colors and materials of the mountain model, and the mask layer is used for assisting the mapping to adjust the mountain display effect;
and generating a mountain model of each mountain in the plurality of mountain bodies based on the height map of each mountain body and combining the predetermined elements and the characteristic data.
4. The method of claim 3, wherein generating a mountain model for each of the plurality of mountain based on the height map for each mountain in combination with the predetermined elements and the feature data comprises:
and rendering the predetermined elements on the height map of each mountain based on the characteristic data to generate a mountain model of each mountain of the plurality of mountains.
5. The method of claim 1, wherein prior to fusing the mountain models of the plurality of mountain bodies to obtain the fused mountain model, the method further comprises:
determining a splicing rule of the plurality of mountains based on a mountain display effect required in the virtual scene, wherein the mountain display effect comprises at least one of the following: the number of mountain groups needed in the virtual scene, the length of each mountain, and the trend of each mountain.
6. The method of claim 5, wherein fusing the mountain models of the plurality of mountain bodies to obtain a fused mountain model comprises:
grouping the plurality of mountain bodies based on the number of mountain body groups and the length of each mountain body group to obtain a plurality of mountain bodies, wherein each mountain body in the plurality of mountain bodies represents a mountain range;
determining a connection mode of a plurality of mountain models in each group of mountain based on the trend of each group of mountain in the virtual scene;
and fusing a plurality of mountain models in each group of mountain based on the connection mode to obtain fused mountain models.
7. The method of claim 6, wherein fusing the plurality of mountain models in each set of mountain based on the engagement means comprises:
determining position information of a graph which needs to be overlapped with a part of graphs corresponding to adjacent mountain models in the part of graphs corresponding to the mountain models in each group of mountain based on the connection mode, wherein the part of graphs belong to a basic land block;
and fusing the mountain models in each group of mountain based on the position information.
8. The utility model provides a generating device of mountain body in sand table map which characterized in that includes:
a first determining unit, configured to determine a contour of each of a plurality of mountain bodies required in a virtual scene, and generate a height map of each mountain body based on the contour of each mountain body;
an input unit configured to input the height map of each of the plurality of mountains into a predetermined game engine in which a mountain model of each of the plurality of mountains is generated;
the fusion unit is used for fusing the mountain models of the plurality of mountain bodies to obtain a fused mountain model; before the mountain models of the mountain are fused, determining basic plots of the mountain models of the mountain, wherein the basic plots are obtained by splicing a plurality of graphs, and each mountain model corresponds to part of the graphs; displaying mountain models of the plurality of mountain bodies in the basic land block based on the height map of each mountain body;
and the generation unit is used for generating the fused mountain model into the sand table map.
9. A storage medium comprising a stored program, wherein the program, when run, controls a device in which the storage medium is located to perform the method of generating a mountain in a sand table map as claimed in any one of claims 1 to 7.
10. A processor for running a program, wherein the program when run performs the method of generating a mountain in a sand table map as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910563196.8A CN110288690B (en) | 2019-06-26 | 2019-06-26 | Method and device for generating mountain in sand table map, storage medium and processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910563196.8A CN110288690B (en) | 2019-06-26 | 2019-06-26 | Method and device for generating mountain in sand table map, storage medium and processor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110288690A CN110288690A (en) | 2019-09-27 |
CN110288690B true CN110288690B (en) | 2023-06-20 |
Family
ID=68006267
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910563196.8A Active CN110288690B (en) | 2019-06-26 | 2019-06-26 | Method and device for generating mountain in sand table map, storage medium and processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110288690B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112190948B (en) * | 2020-10-15 | 2024-03-22 | 网易(杭州)网络有限公司 | Game map generation method and device, electronic equipment and storage medium |
CN112386909B (en) * | 2020-11-17 | 2024-07-19 | 网易(杭州)网络有限公司 | Processing method and device of virtual ice seal area model, processor and electronic device |
CN112927365B (en) * | 2021-04-13 | 2023-05-26 | 网易(杭州)网络有限公司 | Method and device for rendering mountain in three-dimensional virtual scene of application program |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108090955A (en) * | 2017-11-09 | 2018-05-29 | 珠海金山网络游戏科技有限公司 | The system and method that a kind of virtual scene simulates true mountain model |
CN108176052B (en) * | 2018-01-31 | 2021-05-25 | 网易(杭州)网络有限公司 | Simulation method and device for model building, storage medium, processor and terminal |
CN108765574A (en) * | 2018-06-19 | 2018-11-06 | 北京智明星通科技股份有限公司 | 3D scenes intend true method and system and computer readable storage medium |
-
2019
- 2019-06-26 CN CN201910563196.8A patent/CN110288690B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110288690A (en) | 2019-09-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110288690B (en) | Method and device for generating mountain in sand table map, storage medium and processor | |
CN112215934B (en) | Game model rendering method and device, storage medium and electronic device | |
CN109816762B (en) | Image rendering method and device, electronic equipment and storage medium | |
CN111429557A (en) | Hair generating method, hair generating device and readable storage medium | |
CN111402373B (en) | Image processing method and device, electronic equipment and storage medium | |
CN107369200B (en) | 3D scene special effect processing method and storage device | |
CN104199659A (en) | Method and device for exporting model information capable of being identified by 3DMAX | |
CN114119848B (en) | Model rendering method and device, computer equipment and storage medium | |
KR20080051135A (en) | 2d/3d combined rendering | |
CN113648655B (en) | Virtual model rendering method and device, storage medium and electronic equipment | |
CN112150592B (en) | Animation file generation method and device, storage medium and electronic equipment | |
CN113485548A (en) | Model loading method and device of head-mounted display equipment and head-mounted display equipment | |
Eisemann et al. | Stylized vector art from 3d models with region support | |
CN116485967A (en) | Virtual model rendering method and related device | |
CN116188242A (en) | Map rendering method, device, equipment and program product | |
CN111651959B (en) | Method and terminal for realizing 3D font | |
CN115063330A (en) | Hair rendering method and device, electronic equipment and storage medium | |
CN110728750B (en) | Intelligent driving environment live-action modeling method, system, terminal and storage medium | |
CN113838155A (en) | Method and device for generating material map and electronic equipment | |
CN115035276A (en) | Virtual model fusion method and device and electronic equipment | |
CN112711783A (en) | Jewelry design method and system based on three-dimensional software and illusion engine | |
CN105224325A (en) | Rendering intent and device | |
CN112274934B (en) | Model rendering method, device, equipment and storage medium | |
CN117115805B (en) | Random irregular object identification method and device under Unreal Engine platform | |
US20230385465A1 (en) | System and method for authoring high quality renderings and generating manufacturing output of custom products |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |