CN107358649B - Processing method and device of terrain file - Google Patents

Processing method and device of terrain file Download PDF

Info

Publication number
CN107358649B
CN107358649B CN201710424868.8A CN201710424868A CN107358649B CN 107358649 B CN107358649 B CN 107358649B CN 201710424868 A CN201710424868 A CN 201710424868A CN 107358649 B CN107358649 B CN 107358649B
Authority
CN
China
Prior art keywords
terrain
target
information
grid
file
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
Application number
CN201710424868.8A
Other languages
Chinese (zh)
Other versions
CN107358649A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710424868.8A priority Critical patent/CN107358649B/en
Publication of CN107358649A publication Critical patent/CN107358649A/en
Application granted granted Critical
Publication of CN107358649B publication Critical patent/CN107358649B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping

Landscapes

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

Abstract

The invention discloses a method and a device for processing a terrain file. Wherein, the method comprises the following steps: before a target application runs, obtaining first grid information in a target terrain file, wherein the target application is used for displaying target terrain in a game scene during running, the target terrain file is used for generating target terrain, and the first grid information is used for generating a terrain grid of the target terrain; dividing the first grid information to obtain a first amount of second grid information; generating a first number of terrain meshes according to the first number of second mesh information; and when the target application runs, splicing the terrain grids of the first number to obtain the target terrain. The invention solves the technical problem of low running performance of the target application in processing the terrain file in the related art.

Description

Processing method and device of terrain file
Technical Field
The invention relates to the field of computers, in particular to a method and a device for processing a terrain file.
Background
At present, in a three-dimensional application scene of a target application, a Terrain (Terrain) system is used. When the target application runs, the terrain grid information is dynamically calculated in real time through the position and height information of the camera, so that the effect of dynamically generating terrain grids is achieved, and the rendering efficiency of terrain is improved. However, in the actual application process, after the height information of the terrain reaches a certain complexity, the overhead amount of dynamically calculating the terrain mesh information in real time becomes huge, and the overall operation performance of the target application when processing the terrain file is greatly reduced.
In order to solve the problem that the target application has low running performance when processing a terrain file, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a processing method and device of a terrain file, which are used for at least solving the technical problem of low running performance of target application in processing the terrain file in the related art.
According to one aspect of the embodiment of the invention, a method for processing a terrain file is provided. The method comprises the following steps: before a target application runs, obtaining first grid information in a target terrain file, wherein the target application is used for displaying target terrain in a game scene during running, the target terrain file is used for generating target terrain, and the first grid information is used for generating a terrain grid of the target terrain; dividing the first grid information to obtain a first amount of second grid information; generating a first number of terrain meshes according to the first number of second mesh information; and when the target application runs, splicing the terrain grids of the first number to obtain the target terrain.
According to another aspect of the embodiment of the invention, a processing device of the terrain file is also provided. The device includes: the game system comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring first grid information in a target terrain file before a target application is operated, the target application is used for displaying target terrain in a game scene during operation, the target terrain file is used for generating target terrain, and the first grid information is used for generating a terrain grid of the target terrain; the dividing unit is used for dividing the first grid information to obtain a first amount of second grid information; a generating unit configured to generate a first number of terrain meshes from the first number of second mesh information; and the splicing unit is used for splicing the terrain grids of the first quantity to obtain the target terrain when the target application runs.
In the embodiment of the invention, before a target application runs, first grid information in a target terrain file is obtained, wherein the target application is used for displaying target terrain in a game scene during running, the target terrain file is used for generating target terrain, and the first grid information is used for generating a terrain grid of the target terrain; dividing the first grid information to obtain a first amount of second grid information; generating a first number of terrain meshes according to the first number of second mesh information; and when the target application runs, splicing the terrain grids of the first number to obtain the target terrain. The method comprises the steps of dividing the terrain mesh information of the terrain file before the target application runs, and generating the terrain mesh from a plurality of pieces of mesh information obtained through division, so that the purpose of loading the terrain mesh when the target application runs is achieved, the running performance of the target application when the target application processes the terrain file is improved, and the technical problem of low running performance of the target application when the target application processes the terrain file in the related technology 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 embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a diagram of a hardware environment for a method of processing a terrain file according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for processing a terrain file according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method of stitching a first number of terrain meshes in accordance with an embodiment of the present invention;
FIG. 4 is a flow chart of another method of processing a terrain file according to an embodiment of the present invention;
FIG. 5 is a flow chart of a method of obtaining location information for vertices in a target terrain file in accordance with an embodiment of the present invention;
FIG. 6 is a flow chart of another method of processing a terrain file according to an embodiment of the present invention;
fig. 7 is a flowchart of a method of partitioning first mesh information according to an embodiment of the present invention;
FIG. 8 is a flow chart of another method of processing a terrain file according to an embodiment of the present invention;
FIG. 9 is a flowchart of a method for exporting mesh information from a terrain file according to an embodiment of the present invention;
FIG. 10 is a schematic illustration of a calculation of vertex normals in accordance with an embodiment of the invention;
FIG. 11 is a schematic diagram of a terrain grid in accordance with an embodiment of the present invention;
FIG. 12 is a schematic diagram of a custom landscape material according to an embodiment of the present invention;
FIG. 13 is a schematic illustration of a display of a ground grid in accordance with an embodiment of the present invention;
FIG. 14 is a schematic diagram of a device for processing a terrain file according to an embodiment of the present invention; and
fig. 15 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or 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 processing a terrain file.
Alternatively, in the present embodiment, the processing method of the terrain file may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. Fig. 1 is a schematic diagram of a hardware environment of a method for processing a terrain file according to an embodiment of the present invention. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The processing method of the terrain file according to the embodiment of the present invention may be executed by the server 102, the terminal 104, or both the server 102 and the terminal 104. The method for processing the terrain file by the terminal 104 according to the embodiment of the present invention may be executed by a client installed thereon.
Fig. 2 is a flowchart of a method for processing a terrain file according to an embodiment of the present invention. As shown in fig. 2, the method may include the steps of:
step S202, before the target application runs, first grid information in the target terrain file is obtained.
In the technical solution provided in the foregoing step S202 of the present application, before a target application runs, first mesh information in a target terrain file is obtained, where the target application is used to display a target terrain in a game scene during running, the target terrain file is used to generate a target terrain, and the first mesh information is used to generate a terrain mesh of the target terrain.
The target application of this embodiment may be a gaming application, such as a game engine, which may be developed based on the Unity development platform. The Unity development platform is similar to software which uses an interactive graphical development environment as a primary development mode, such as Director software, blend software, Virtools software, Torque Game Builder software and the like, an editor of the Unity development platform runs under Windows and Mac OS X, and the Unity development platform can release games to a plurality of platforms such as a Window platform, an OSX platform, an Android platform, an IOS and the like. The target application is used for displaying a target terrain in a game scene during runtime, for example, displaying the target terrain in the game scene during runtime.
The target application may be provided with a Terrain (Terrain) tool by which a target Terrain file is generated for generating a target Terrain in the game scene. Optionally, the terrain tool is a terrain editor, and the target terrain file is manufactured through the terrain editor, so that the efficiency of resource manufacturing is not affected, and the aim of obtaining the target terrain file is fulfilled.
The target Terrain file is also called Terrain file. The Terrain file in the game engine generally refers to a Terrain description file composed of height map, weight picture Alphamap, Texture, material information and the like, and is generally produced and exported by an artist through a graphic tool, loaded in the game running process and used for the game engine to read and draw the ground surface.
Before the target application is run, that is, when the target application is not run and the terrain grid of the target terrain is not loaded, the embodiment obtains the first grid information in the target terrain file, wherein the first grid information is used for generating the terrain grid of the target terrain and is the basic information of the terrain grid of the target terrain. Optionally, the first mesh information includes a vertex position of the target terrain, a vertex normal, and a coordinate value (UV) of the vertex, and the like.
According to the embodiment, before the target application runs, the first mesh information in the target terrain file is obtained, and therefore preprocessing of the target terrain file before the target application runs is achieved.
Step S204, the first grid information is divided to obtain a first amount of second grid information.
In the technical solution provided in the above step S204, the first mesh information is divided to obtain a first amount of second mesh information.
After the first mesh information in the target terrain file is obtained, the first mesh information is divided to obtain a first number of second mesh information, that is, the first mesh information includes a first number of second mesh information, where the first number may be N × N blocks, where N is a natural number. By dividing the first mesh information, mesh information such as a first number of vertex positions, vertex normals, and vertex coordinate values can be obtained.
The first number is specifically determined by the size of the visible area of the target feature during the running of the target application, for example, the first number is determined by the size of the visible area of the target feature during the running of the game application.
Step S206, a first number of terrain meshes are generated according to the first number of second mesh information.
In the technical solution provided by step S206 in the present application, a first number of terrain meshes are generated according to a first number of second mesh information.
After the first grid information is divided to obtain a first amount of second grid information, a first amount of terrain grids are generated according to the first amount of second grid information, and the terrain grids are ground surface grids, terrain blocks and land parcels. The first number of topographic meshes are static meshes, that is, the static meshes are static meshes obtained by extracting first mesh information from a target topographic file and dividing the first mesh information, and the static meshes formed by the first number of second mesh information are not displayed when the client runs.
Alternatively, a static mesh is derived from the height information in the target terrain file, which may be obtained from a height map (height map), which may be a grayscale map representing the height information of the terrain vertices of the target terrain, with larger size maps representing more complex terrain information.
Optionally, the normal and coordinate values of the vertices are calculated by an algorithm at the boundary of each terrain mesh to ensure that the first number of terrain meshes do not generate seams when being spliced. The method comprises the steps of obtaining the width and height (w, h) of a height map and the size (size) of a target terrain in a target terrain file, wherein w is used for representing the width, h is used for representing the height, determining the number of vertexes of the target terrain and the intervals between the vertexes according to the width and the height of the height map and the size of the target terrain, and then calculating the positions (verticals) of the vertexes and the grid UV Values (UVs). The Normals (Normals) of all current vertices are then fetched by the CalcNormals function. The normal of the vertex can be obtained by calculating the normal of all the surfaces including the vertex and then averaging the normal of the surfaces including the vertex.
Optionally, all the first number of terrain meshes are assigned to the same terrain texture, the terrain texture uses a specific Shader (Shader) written for the scheme, and the maps used in the terrain texture are obtained from the Alphamap picture and the terrain map extracted from the target terrain file.
The embodiment generates the first number of terrain meshes from the first number of second mesh information, and the first number of terrain meshes may be terrain meshes in which the first number of coordinate values and the normal are continuous.
And step S208, splicing the terrain grids of the first number when the target application runs to obtain the target terrain.
In the technical solution provided in the above step S208, when the target application runs, the first number of terrain meshes are spliced to obtain the target terrain.
After the first number of terrain meshes are generated according to the first number of second mesh information, the first number of terrain meshes are all loaded into a game scene and spliced according to a preset sequence in the game scene to obtain a target terrain, so that the problem that when the height information of the target terrain reaches a certain complexity, the overall operation performance of target application is greatly reduced due to the fact that the overhead amount of dynamically calculating the terrain mesh information is large is avoided.
Optionally, the first number of N × N pieces of terrain meshes are all loaded into the game scene, and placed according to the position of each terrain mesh in the game scene, and then a large piece of terrain mesh is spliced in the game scene, and the terrain meshes are transferred to the coordinate position corresponding to the center of the screen, and only the terrain mesh corresponding to the coordinate position and 8 pieces of terrain meshes around the terrain mesh are displayed, and other terrain meshes in the first number are hidden, so that the number of meshes displayed simultaneously is ensured to be at a lower level, for example, only 9 pieces of terrain meshes are displayed on the target terrain of 64 pieces of terrain meshes in total, where the first number is 8 × 8.
The embodiment converts the existing grid processing from real-time and dynamic processing into off-line processing, can generate a Terrain file by using a Tertain tool carried by Unity, completes the calculation of the Terrain grids before the target application runs, loads a first number of Terrain grids into a game scene when the target application runs, splices the Terrain grids to obtain the target Terrain, avoids the problem of dynamically calculating the sales volume of grid information in the running process of the target application, and simultaneously keeps the rendering efficiency of the target Terrain unaffected so as to integrally improve the running performance of a Terrain system.
The embodiment can reduce the operation overhead of the system during operation in a terrain system with higher terrain complexity, thereby reducing the performance consumption.
Through the above steps S202 to S208, before the target application runs, obtaining first mesh information in a target terrain file, where the target application is used to display a target terrain in a game scene during running, the target terrain file is used to generate a target terrain, and the first mesh information is used to generate a terrain mesh of the target terrain; dividing the first grid information to obtain a first amount of second grid information; generating a first number of terrain meshes according to the first number of second mesh information; and when the target application runs, splicing the terrain grids of the first number to obtain the target terrain. The method comprises the steps of dividing the terrain mesh information of the terrain file before the target application runs, and generating the terrain mesh from a plurality of pieces of mesh information obtained through division, so that the purpose of loading the terrain mesh when the target application runs is achieved, the running performance of the target application when the target application processes the terrain file is improved, and the technical problem of low running performance of the target application when the target application processes the terrain file in the related technology is solved.
As an optional implementation manner, in step S208, when the target application runs, the splicing the first number of terrain meshes to obtain the target terrain includes: loading a first number of terrain meshes into a game scene when a target application runs; and splicing the first number of terrain grids according to the corresponding position sequence of the first number of terrain grids in the game scene to obtain the target terrain.
Fig. 3 is a flow chart of a method of stitching a first number of terrain meshes in accordance with an embodiment of the present invention. As shown in fig. 3, the method comprises the steps of:
step S301 loads a first number of terrain meshes into a game scene when the target application is running.
In the technical solution provided in the above step S301 of the present application, when the target application runs, a first number of terrain meshes are loaded into a game scene.
The game scene of this embodiment may be a game scene. After the first number of terrain meshes are generated according to the first number of second mesh information, the first number of terrain meshes are loaded into the game scene when the target application runs, that is, all terrain meshes generated according to the first number of second mesh information are loaded into the game scene.
Step S302, splicing the first number of terrain grids according to the corresponding position sequence of the first number of terrain grids in the game scene to obtain the target terrain.
In the technical solution provided in the above step S302 of the present application, the first number of terrain meshes are spliced according to the corresponding position sequence of the first number of terrain meshes in the game scene to obtain the target terrain, where the preset sequence includes the position sequence.
After the first number of terrain meshes are loaded into a game scene, the corresponding positions of all the terrain meshes in the game scene are determined, the terrain meshes are placed according to the respective position sequence, and then the complete terrain meshes of the target terrain are spliced, wherein the target terrain comprises the complete terrain meshes.
The embodiment loads a first number of terrain meshes into a game scene by running a target application; the first number of terrain grids are spliced according to the corresponding position sequence of the first number of terrain grids in the game scene to obtain the target terrain, wherein the preset sequence comprises the position sequence, so that the purpose that the first number of terrain grids are spliced to obtain the target terrain when the target application runs is achieved, and the running performance of the target application when the target application processes the terrain files is improved.
As an alternative implementation, in step S208, after the first number of terrain meshes are spliced to obtain the target terrain, the terrain surface represented by the first mesh and the terrain surfaces represented by the plurality of second meshes are displayed, and the terrain surfaces represented by the terrain meshes except the first mesh and the plurality of second meshes in the first number of terrain meshes are hidden, where the first number of terrain meshes includes the first mesh and the plurality of second meshes, and the target terrain includes the terrain surface represented by the first mesh and the terrain surfaces represented by the plurality of second meshes located around the first mesh.
After the first number of terrain meshes are spliced to obtain the target terrain, the target terrain is displayed, a first number of terrain meshes may then be passed into the target application at the coordinate location corresponding to the center of the screen, only the terrain meshes corresponding to that coordinate location are displayed, and 8 terrain meshes around the coordinate location, all other terrain meshes of the first number of terrain meshes are hidden, i.e., part of the first number of terrain meshes are activated, ensuring that the number of activated low-assurance meshes is at a lower level, e.g., in a first number of 8 x 8 total 64 terrain meshes, only 9 terrain meshes are displayed, for the terrain grids with the number of 25w, the highest activation number is only 3w more at the same time, so that the consumption of the operation of the targeted application is reduced, and the operation performance of the targeted application is improved.
As an alternative embodiment, displaying the ground surface of the first grid representation at a preset display position of the target application and displaying the ground surface of the plurality of second grid representations at a surrounding position of the preset display position includes: and displaying the ground surface represented by the first grid at a preset display position of the target application and the ground surfaces represented by a plurality of second grids at positions around the preset display position according to a nine-grid form, wherein the preset display position is a central grid area of a nine-grid, and the positions around the preset display position are grid areas except the central grid area in the nine-grid.
Displaying a first grid representation of the terrain surface at a preset display position of the target application and a plurality of second grid representation of the terrain surface at positions surrounding the preset display position in a nine-grid format, wherein each rectangle in the nine-grid represents a terrain grid, and the displayed terrain grid is a terrain grid captured by a camera ray. The preset display position is a central grid area of the nine-grid, and the peripheral positions of the preset display position are grid areas except the central grid area in the nine-grid, so that the situation that the side of the terrain grid is hollowed out when a camera points to the edge of the terrain grid is prevented.
For example, if the performance consumption of each terrain grid is set to 1, this nine-pass approach may limit the performance consumption to 9, and if the first number is N, the performance consumption is reduced to 9/N, so that the performance consumption of the target application is reduced more as the first number is greater, and the effect is better.
As an optional implementation manner, in step S208, the material information in the target terrain file is obtained before the first number of terrain meshes are spliced to obtain the target terrain; step S208, splicing the terrain meshes of the first number to obtain the target terrain comprises the following steps: and splicing the terrain meshes with the first quantity of the ground surface materials to obtain the target terrain.
Fig. 4 is a flowchart of another method of processing a terrain file according to an embodiment of the present invention. As shown in fig. 4, the method comprises the steps of:
step S401, material information in the target terrain file is obtained.
In the technical solution provided in the foregoing step S401 of the present application, material information in a target terrain file is obtained, where the material information is used to generate a ground surface material of the target terrain.
The earth's surface material of target topography can form through the stack of multiple earth's surface material, for example, sand, stone, soil etc. when multiple earth's surface material superposes, can superpose according to corresponding weight to acquire the material information of target topography.
Step S402, the first number of terrain meshes with the earth surface materials are spliced to obtain the target terrain.
In the technical solution provided in the above step S402, the first number of terrain meshes with ground surface materials are spliced to obtain a target terrain.
After the material information in the target terrain file is obtained, the surface material of the target terrain is generated according to the material information, and the terrain meshes with the first quantity of the surface material are spliced, namely, the terrain meshes with the first quantity all use the surface material to obtain the target terrain.
According to the embodiment, the material information in the target terrain file is obtained before the target terrain is obtained by splicing the first number of terrain meshes, the first number of terrain meshes with the surface material are spliced to obtain the target terrain, and the running performance of the target application in processing the terrain file is improved.
As an alternative implementation, in step S401, the obtaining material information in the target terrain file includes: the method comprises the steps of obtaining weights of a plurality of terrain maps and a plurality of terrain maps in a target terrain file, wherein the terrain maps are used for forming earth surface materials, and the material information comprises the weights of the plurality of terrain maps and the plurality of terrain maps.
The target terrain file comprises first grid information, a plurality of terrain maps and weights of the plurality of terrain maps, wherein the weights of the plurality of terrain maps can be used for representing the participation proportion of the terrain maps when the ground surface material of the target terrain is formed, and the material information in the target terrain file is obtained by obtaining the plurality of terrain maps in the target terrain file and the weights of the plurality of terrain maps.
As an alternative implementation manner, in step S202, the obtaining the weights of the multiple terrain maps in the target terrain file includes: acquiring weight pictures in a target terrain file, wherein the weight pictures represent the weights of a preset number of terrain maps in a plurality of terrain maps by a preset number of channels, and the preset number of channels correspond to the weights of the preset number of terrain maps; and acquiring the weight picture in the target terrain file again, wherein the weights of the terrain maps except the preset number in the plurality of terrain maps are represented by channels in the acquired weight picture again.
The weights of the plurality of terrain maps can be represented by weight pictures, for example, by Alphamap pictures, wherein an Alphamap picture represents the weights among the terrain maps through the rgba four channels, an Alphamap can only express the weights of a preset number of terrain maps, and when the target terrain file uses more than the preset number of terrain maps, the material information of the target terrain needs to be determined by the plurality of alphamaps.
When the number of the plurality of terrain maps is less than or equal to the preset number, the weight picture is 1, the weight of each of the plurality of terrain maps is represented by a corresponding channel in the weight picture, when the number of the plurality of terrain maps is more than the preset number and less than twice of the preset number, the weight picture is 2, and the weights of the terrain maps except the preset number in the plurality of terrain maps are represented by the channels in the re-acquired weight picture.
Alternatively, for gaming applications, the number of terrain maps does not exceed 8, and each weight picture represents the weight between the respective terrain maps by four channels, so that the required weight picture does not exceed 2.
As an optional implementation manner, after the material information in the target terrain file is obtained, the material information in the target terrain file is processed through a preset shader, so as to obtain the surface material.
The material information is used for generating the surface material of the target terrain, after the material information in the target terrain file is obtained, all generated terrain meshes are endowed with the same surface material, the surface material uses a specific coloring device written for the scheme, the mapping used in the surface material is a terrain mapping extracted from the target terrain file, and an Alphamap picture, and the material information in the target terrain file is processed through the preset coloring device to obtain the surface material.
As an alternative implementation manner, in step S202, the obtaining the first mesh information in the target terrain file includes: and acquiring the position information of the vertex in the target terrain file, wherein the first mesh information comprises the position information of the vertex, and the position information of the vertex is used for expressing the vertex position of the target terrain.
When the first mesh information in the target terrain file is acquired, acquiring position information of a vertex in the target terrain file, wherein the position information of the vertex is used for representing the position of the vertex of the target terrain, and comprises coordinates (UV) of the vertex of the target terrain, and the UV value of the vertex is between mesh coordinates (0, 0) and (1, 1).
As an optional implementation, the obtaining of the position information of the vertex in the target terrain file includes: acquiring vertex height information and terrain size information in a target terrain file; acquiring the number of vertexes of the target terrain according to the vertex height information, and acquiring the number of the vertexes of the target terrain and intervals among the vertexes of the number according to the vertex height information and the terrain size information; and determining the position information of the vertices according to the number of the vertices and the intervals among the vertices.
Fig. 5 is a flow chart of a method of obtaining location information for vertices in a target terrain file in accordance with an embodiment of the present invention. As shown in fig. 5, the method comprises the steps of:
step S501, vertex height information in the target terrain file is obtained.
In the technical solution provided in the above step S501 of the present application, vertex height information in a target terrain file is obtained, where the vertex height information is used to represent a vertex of a target terrain.
The target terrain file comprises vertex height information, the vertex height information can be represented by a height map (height map), a gray scale map can be used for representing the height information of the terrain vertexes, and the height map with larger size can represent the more complex information of the target terrain, and the vertex height information can be obtained. The ratio of the height of the target feature to the width of the target feature is matched, i.e., as the height of the target feature increases, the width of the target feature increases accordingly, and as the height of the target feature decreases, the width of the target feature decreases accordingly.
Step S502, obtaining the terrain dimension information in the target terrain file.
In the technical solution provided in the above step S502 of the present application, terrain size information in a target terrain file is obtained, where the terrain size information is used to indicate a size of a target terrain.
The target terrain file includes terrain size information (TerrainSize) for indicating the size of the target terrain, that is, for indicating the width of the target terrain.
Step S503, the number of the vertexes of the target terrain is obtained according to the vertex height information, and the number of the vertexes of the target terrain and the intervals among the vertexes are obtained according to the vertex height information and the terrain size information.
In the technical solution provided in the above step S503 of the present application, the number of vertices of the target terrain is obtained according to the vertex height information, and the number of vertices of the target terrain and the intervals between the number of vertices are obtained according to the vertex height information and the terrain size information.
After the vertex height information in the target terrain file and the terrain size information in the target terrain file are obtained, the number of the vertexes of the target terrain is obtained according to the vertex height information, and the number of the vertexes of the target terrain and the intervals among the vertexes of the number are obtained according to the vertex height information and the terrain size information.
Step S504, the position information of the vertexes of the number is determined according to the number of the vertexes and the intervals among the vertexes of the number.
In the technical solution provided in the above step S504 of the present application, the position information of the number of vertices is determined according to the number of vertices and the intervals between the number of vertices.
The number of the vertexes of the target terrain is obtained according to the vertex height information, the number of the vertexes of the target terrain and the intervals among the vertexes of the number are obtained according to the vertex height information and the terrain size information, and then the position information of the vertexes of the number is determined according to the number of the vertexes and the intervals among the vertexes of the number.
Alternatively, after acquiring the vertex height information, the width and height (w, h) and the terrain size, the number and the interval of the Vertices of the target terrain can be obtained, and the positions (Vertices) and the UV Values (UVs) of the Vertices are further calculated.
The embodiment obtains the vertex height information in the target terrain file, wherein the vertex height information is used for representing the vertex of the target terrain; acquiring terrain size information in a target terrain file, wherein the terrain size information is used for representing the size of a target terrain; acquiring the number of vertexes of the target terrain according to the vertex height information, and acquiring the number of the vertexes of the target terrain and intervals among the vertexes of the number according to the vertex height information and the terrain size information; determining the position information of the vertexes in number according to the number of the vertexes and the intervals among the vertexes in number, realizing the acquisition of the position information of the vertexes in the target terrain file, obtaining first mesh information in the target terrain file, and dividing the first mesh information to obtain second mesh information in first number; generating a first number of terrain meshes according to the first number of second mesh information; when the target application runs, the first number of terrain meshes are spliced to obtain the target terrain, so that the running performance of the target application in processing the terrain file is improved.
As an alternative embodiment, after acquiring the number of vertices of the target terrain, acquiring a terrain surface including each vertex in the number of vertices; determining the normal of each vertex according to the normal of the ground surface of each vertex; step S204, dividing the first mesh information to obtain a first amount of second mesh information, including: and dividing the first mesh information according to the continuous position information in the position information of the number of vertexes and the continuous normal lines in the normal lines of the number of vertexes to obtain a first number of second mesh information.
Fig. 6 is a flowchart of another method of processing a terrain file according to an embodiment of the present invention. As shown in fig. 6, the method further comprises the steps of:
in step S601, a ground plane including each vertex is acquired.
In the technical solution provided in the above step S601 of the present application, a ground plane including each vertex is obtained from the number of vertices.
Obtaining a terrain surface containing each vertex, for example, the multiple vertices are vertex a and vertex B, wherein the terrain surface containing vertex a is terrain surface a1, terrain surface a2, terrain surface A3, terrain surface containing vertex B is terrain surface B1, terrain surface B2, and terrain surface B3.
Step S602, determining the normal of each vertex according to the normal of the ground surface of each vertex.
In the technical solution provided in the above step S602 of the present application, the normal of each vertex is determined according to the normal of the ground plane of each vertex, where the first mesh information includes the normal of the vertex.
After the geosurface including each vertex is obtained, the normal of the geosurface of each vertex is determined, and the normal of each vertex is determined according to the normal of the geosurface of each vertex, for example, when the geosurface of the vertex a is only the geosurface a1, the normal of the geosurface a1 is the normal of the vertex a, and the first mesh information includes the normal of the vertex.
Step S603, dividing the first mesh information according to the continuous position information in the position information of the number of vertices and the continuous normal line in the normal lines of the number of vertices, to obtain a first number of second mesh information.
In the technical solution provided in step S603 of the present application, the first mesh information is divided according to consecutive position information in the position information of the number of vertices and consecutive normal lines in the normal lines of the number of vertices, so as to obtain a first number of second mesh information.
The normal lines of the vertexes and the position information (VU value) of the vertexes are calculated at the boundary of each terrain mesh through an algorithm, so that a plurality of terrain meshes with continuous UV values and normal lines are generated, and the terrain meshes are enabled not to generate fine gaps when being spliced.
The embodiment acquires the terrain surface comprising each vertex in the number of the vertexes after acquiring the number of the vertexes of the target terrain; and determining the normal of each vertex according to the normal of the terrain surface of each vertex, wherein the first mesh information comprises the normal of the vertex so as to ensure that the terrain mesh does not generate a slit when being spliced.
As an alternative embodiment, in step S601, the obtaining a ground plane including each vertex includes: acquiring a plurality of ground planes including each vertex; step S602, determining the normal of each vertex according to the normal of the ground plane of each vertex includes: determining a normal to each vertex from an average normal to normals of the plurality of geodesic surfaces.
After the position (verticals) and UV Value (UVs) of each vertex are obtained, the normals of all current points are fetched by the calc normals function. The vertex normal may be calculated by calculating normals of all the surfaces including the vertex, and then averaging the normals of the surfaces including the vertex.
As an optional implementation manner, in step S204, dividing the first mesh information to obtain a first number of second mesh information includes: acquiring the size of a visible area of a target application in the running process; determining a first number from the size of the visible area; and dividing the first grid information according to the first quantity to obtain second grid information of the first quantity.
Fig. 7 is a flowchart of a method of partitioning first mesh information according to an embodiment of the present invention. As shown in fig. 7, the method comprises the steps of:
step S701, acquiring the size of a visible area of the terrain in the running process of the target application.
In the technical solution provided in the above step S701 of the present application, the size of the visible area of the terrain in the running process of the target application is obtained.
When the first grid information is divided, the size of a visible area of the terrain in the running process of the target application is obtained, the visible area of the target application in the running process is determined according to specific requirements, and the visible area can be determined according to the terrain area in which the target object in the game scene moves. Optionally, the target application is a game application, and the size of the visible area of the game application in the running process is obtained.
Step S702 determines a first number from the size of the visible region.
In the technical solution provided by the above step S702 of the present application, the first number is determined by the size of the visible region.
After the size of the visible area of the target application in the running process is obtained, a first number is determined according to the size of the visible area, wherein the first number is the number of second grid information obtained by dividing the first grid information and is determined by the visible area of the terrain of the target application in the running process. For example, when the size of the visible region is relatively large, the first number is large, and when the size of the visible region is relatively small, the first number is small.
Step S703, the first mesh information is divided according to a first number to obtain a first number of second mesh information.
In the technical solution provided in step S703 above, the first mesh information is divided according to a first number to obtain a first number of second mesh information.
After the first number is determined by the size of the visible region, the first mesh information is divided by the first number to obtain a first number of second mesh information.
The embodiment obtains the size of the visible area of the target application in the running process; determining a first number from the size of the visible area; the first grid information is divided according to the first quantity to obtain the first quantity of second grid information, the first grid information is divided to obtain the first quantity of second grid information, the first quantity of terrain grids are generated according to the first quantity of second grid information, when the target application runs, the first quantity of terrain grids are spliced to obtain the target terrain, and the running performance of the target application when the target application processes the terrain file is improved.
As an alternative embodiment, the target application is a Unity engine.
Most of three-dimensional games made by Unity use the onboard Terrain system, which has many advantages, such as convenient use of art tools, high efficiency of making Terrain, high compatibility with engines, and no need of worrying about incompatibility problems caused by version upgrading due to native functions of the engines.
The embodiment can analyze the derived terrain file based on the Unity terrain system to obtain a customized terrain file, generate a static grid by using height map information, derive a weight picture and a plurality of terrain maps of the terrain file, and then divide the target terrain into m × n blocks (specifically determined by the size of a visible area of the terrain in the game process) according to specific requirements. The normal and UV values of the vertex at the boundary of each block need to be calculated through an algorithm to ensure that no slit is generated during mesh splicing. In addition, newly-built earth's surface material, will weigh picture and many topography maps and transmit into the starting device, confirm the earth's surface material of topography, this earth's surface material is used to the topography net that all blocks obtained, at last in target application operation process, load the good topography net of block generation into to show the topography net through the mode of nine palace check, or hide, thereby reach the optimal operating efficiency of target application.
Example 2
The technical solution of the present invention will be described below with reference to preferred embodiments.
Fig. 8 is a flowchart of another method of processing a terrain file according to an embodiment of the present invention. As shown in fig. 8, the method comprises the steps of:
in step S801, a Unity engine is used to create a Terrain file.
The artwork of the embodiment still uses the Unity-owned Terrain editor to manufacture the Terrain file, so that the efficiency of resource manufacturing is not affected, wherein the Terrain editor is a primary tool for manufacturing the Terrain file, is perfect, is familiar to developers, is easy to use, and is convenient and quick to use.
Step S802, exporting the Terrain file into a static grid.
After the Terrain file is produced using the Unity engine, the Terrain file is exported as a static grid. And (4) exporting the height information of the terrain into a whole static grid by using a self-written tool. In the process, the final displayed Terrain mesh does not need to be generated, and only the basic information (vertex position, normal line and UV) of the Terrain mesh is extracted through a Tertain file and then is subjected to segmentation processing.
Step S803, the static grid is divided into N × N blocks according to the configuration, a block grid is obtained, and the UV value and the normal of each vertex are calculated.
After the height information, width and height (w, h) and Terrain size are extracted from the Terrain file, the number and spacing of the vertices of the Terrain can be determined, and then the positions and UV Values (UVs) of the vertices can be further calculated. Then the normals of all current vertices are fetched by the CalcNormals function. The vertex normals are calculated by calculating the normals of all the surfaces including the vertex, and then averaging the normals of all the surfaces including the vertex to obtain an average normal.
In step S804, the weight picture Alphamap and the surface map are derived.
After the Terrain file is created using the Unity engine, the Alphamap and the surface map are exported.
In step S805, a terrain rendering Shader is written.
After the Terrain file is made using the Unity engine, the Terrain rendering Shader is written.
Step S806, newly building a ground surface material corresponding to Terrain, and transmitting Alphamap and a ground surface map by using the written Shader.
After the weight picture Alphamap and the ground surface map are exported and the Terrain rendering Shader is written, the ground surface material corresponding to Terrain is newly built, the written Shader is used for transmitting the Alphamap and the ground surface map, and the ground surface material of the Terrain is determined.
In step S807, the surface texture is assigned to each of the block meshes.
After the written shaders are used to import alphamaps and surface maps, and the surface texture of the terrain is determined, the surface texture is assigned to each of the block meshes.
And step S808, loading the partitioned grids into the game scene when the target application runs, and placing the partitioned grids according to the positions.
And after the earth surface material is assigned to each block grid, loading the block grids into the game scene when the target application runs, and placing the block grids according to the positions.
And step S809, displaying the displayable area in a Sudoku mode.
Fig. 9 is a flowchart of a method for exporting mesh information from a terrain file according to an embodiment of the present invention. As shown in fig. 9, the method includes the steps of:
step S901, a Terrain file is acquired.
And step S902, acquiring the width and height of the Heightmap from the Terrain file.
After the Tertain file is acquired, the width and height of the height map are acquired from the Tertain file.
Step S903, obtaining the Terrain size TerranSize from the Terranin file.
After the Tertain file is obtained, the width and height of the height map are obtained from the Tertain file
And step S904, acquiring the number of the vertexes of the target terrain according to the width and the height of the Heightmap.
And after the width and the height of the height map are obtained from the Tertain file, obtaining the number of the top points of the target Terrain according to the width and the height of the height map.
Step S905, acquiring the intervals between the vertexes of the target terrains according to the width and the height of the height map and the terrain size TerranSize.
After the width and height of the height map are acquired from the Terrain file and the Terrain size TerrainSize is acquired from the Terrain file, the interval between the vertices of the target Terrain is acquired according to the width and height of the height map and the acquired Terrain size TerrainSize.
And step S906, determining UVs of the vertexes according to the number of the vertexes.
And after the number of the vertexes of the target terrain is obtained according to the width and the height of the Heightmap, determining UVs of the vertexes according to the number of the vertexes.
In step S907, the positions of the vertices are determined according to the number of vertices and the intervals between the vertices.
And after acquiring the number of vertexes of the target terrain according to the width and the height of the Heightmap and acquiring the interval between the vertexes of the target terrain according to the width and the height of the Heightmap and the size of the acquired terrain TerrainSinSize, determining the positions of the vertexes according to the number of the vertexes and the interval between the vertexes of the number.
In step S908, normals of all current vertices are obtained through the calc normals function.
After the positions of the vertices are determined according to the number of the vertices and the intervals among the vertices of the number, the normals of all the current vertices are obtained through a CalcNormals function.
FIG. 10 is a diagram illustrating the calculation of a vertex normal according to an embodiment of the invention. As shown in fig. 10, the vertex normal of the calculated terrain is the normal of all the terrain surfaces including the vertex, the normals of all the surfaces including the vertex are averaged to obtain an average normal, and the average normal is determined as the normal of the vertex, for example, the normal of the vertex a of the terrain, and the normals of the terrain surfaces including the vertex a are the normal V1, the normal V2, the normal V3, the normal V4, the normal V12, the normal V23, the normal V34, and the normal V41, and the normal V1, the normal V2, the normal V3, the normal V4, the normal V12, the normal V23, the normal V34, and the normal V41 are averaged to obtain the average normal V.
FIG. 11 is a schematic diagram of a terrain grid in accordance with an embodiment of the present invention. As shown in fig. 11, the terrain grid is a terrain grid shown after cutting of the target terrain in the editor is completed. The target terrain is segmented into n x n blocks of UV values and Normal normals continuous terrain grids through a preset algorithm, the shadows of the terrain grids are continuous, no seams exist at the splicing positions, if the normals of the vertexes of the terrain are discontinuous, staggered shadows exist, 8 x 8 blocks are adopted, and one terrain grid is 1/64 of longitudinal terrain, as shown in the shaded part of the lower left corner of fig. 11.
Fig. 12 is a schematic diagram of a customized landscape material according to an embodiment of the invention. As shown in fig. 12, all the generated surface meshes are assigned to the same surface texture using the specific Shader in this embodiment, and the maps used in the surface texture are a Terrain map1, a Terrain map2, a Terrain map 3, a Terrain map 4, a Terrain map 5, a Terrain map 6, a Terrain map 7, a weight picture Alphamap1, and a weight picture Alphamap2 selected from Terrain files. The Alphamap1 and the weight picture Alphamap2 represent weights of four terrain maps through an r channel, a g channel, a b channel, and an a channel, respectively, and theoretically, one Alphamap can express only the weights of four maps, but when more than four map files are used for one terrain file, the implementation needs to be performed by a plurality of alphamaps, and one Alphamap is newly added, and at most 8 terrain maps and two alphamaps are supported.
Optionally, the color value formula of a certain point on the target terrain is as follows:
fixed3col=splat_control.r*tex2D(_Splat0,IN.uv_Splat0).rgb;
col+=splat_control.g*tex2D(_Splat1,IN.uv_Splat1).rgb;
col+=splat_control.b*tex2D(_Splat2,IN.uv_Splat2).rgb;
col+=splat_control.a*tex2D(_Splat3,IN.uv_Splat3).rgb。
wherein splat _ control.r, splat _ control.g, splat _ control.b, splat _ control.a are used to represent the r channel, g channel, b channel, a channel, respectively; splat0, Splat1, Splat2, and Splat3 are used to show the first, second, third, and fourth maps; in.uv _ Splat0, in.uv _ Splat1, in.uv _ Splat2 and in.uv _ Splat are used to represent the weight of the first map at the grid vertex having the coordinate information, the weight of the second map at the grid vertex having the coordinate information, the weight of the third map at the grid vertex having the coordinate information and the weight of the fourth map at the grid vertex having the coordinate information, respectively.
Fig. 13 is a display diagram of a ground grid according to an embodiment of the invention. As shown in fig. 13, each rectangle represents a terrain block of a target terrain, the rectangle filled with grid hatching is used for representing a terrain grid captured by a camera ray, and the rectangle filled with diagonal hatching is therefore also a terrain block which is also displayed, so as to prevent the camera from being hollowed out beside the terrain grid when pointing to the edge of the terrain grid. The areas other than the rectangles filled in with the square hatching and the rectangles filled in with the diagonal hatching represent the hidden terrain grid.
Optionally, the generated n × n pieces of terrain grids are all loaded into the game scene, and placed according to respective positions, and are spliced into an initial large piece of terrain surface, and then the initial large piece of terrain surface is transmitted into a coordinate position corresponding to the screen center of the game application, only the terrain surface corresponding to the coordinate and 8 pieces of terrain surfaces around the terrain surface are displayed, and all other terrain grids are hidden, so that the number of simultaneously activated terrain grids is maintained at a lower level, for example, only 9 pieces of terrain are displayed on 64 pieces of terrain with 8 × 8, the total number of terrains is 25w, and the highest activated number of faces at the same time is only 3w multiple faces.
This squared approach may limit the performance consumption to 9 if the performance consumption of each surface grid is set to 1, and to 9/n if the total surface grid is n, and thus the more the surface grid is divided, the less the performance consumption is reduced.
The embodiment can be applied to a Unity game project with high Terrain complexity, the Tertain file is exported and divided into static grids, the operation cost of the game application in operation can be reduced, the performance consumption is further reduced, meanwhile, the display mode of the surface grids in the Sudoku mode is matched, the number of the Terrain grids rendered at the same time can be controlled at a low level, the average frame rate is improved, and the game experience is brought to users.
In the embodiment, after a Terrain file is generated by using a Tertain tool carried by the Unity, the Terrain file is analyzed and exported to be in a specific format, and then the user-defined Terrain file is loaded during game running, wherein the specific format can be a format of the user-defined file used for describing vertex position information, and an obj file which can be dynamically calculated is suitable for being applied to a Unity mobile terminal game project with complex Terrain, especially high Terrain Heightmap precision requirement.
The embodiment can be applied to scenes with high terrain complexity, such as terrain systems, 3D modeling, graphic design and the like.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 3
According to the embodiment of the invention, the processing device of the terrain file is also provided for implementing the processing method of the terrain file. Fig. 14 is a schematic diagram of a processing device for a terrain file according to an embodiment of the present invention. As shown in fig. 14, the apparatus may include: the device comprises an acquisition unit 10, a dividing unit 20, a generating unit 30 and a splicing unit 40.
An obtaining unit 10, configured to obtain first mesh information in a target terrain file before a target application is run, where the target application is used to display a target terrain in a game scene during the running, the target terrain file is used to generate the target terrain, and the first mesh information is used to generate a terrain mesh of the target terrain.
The dividing unit 20 is configured to divide the first mesh information to obtain a first amount of second mesh information.
A generating unit 30 for generating a first number of terrain meshes from the first number of second mesh information.
And the splicing unit 40 is configured to splice the first number of terrain meshes to obtain a target terrain when the target application runs.
Optionally, the splicing unit 40 includes: a loading module and a splicing module. The loading module is used for loading a first number of terrain grids into a game scene when the target application runs; and the splicing module is used for splicing the first number of terrain grids according to the corresponding position sequence of the first number of terrain grids in the game scene to obtain the target terrain.
Optionally, the apparatus further comprises: and the display unit is used for displaying the ground surface represented by the first grid and the ground surfaces represented by the second grids at the preset display position of the target application after splicing the first number of terrain grids to obtain the target terrain, and hiding the ground surfaces represented by the terrain grids except the first grid and the second grids in the first number of terrain grids, wherein the first number of terrain grids comprises the first grid and the second grids, and the target terrain comprises the ground surface represented by the first grid and the ground surfaces represented by the second grids positioned around the first grid.
Optionally, the display unit comprises: the display module is used for displaying the ground surface represented by the first grid at a preset display position of the target application and displaying the ground surfaces represented by a plurality of second grids at the peripheral positions of the preset display position according to the nine-grid form, wherein the preset display position is a central grid area of the nine-grid, and the peripheral positions of the preset display position are grid areas except the central grid area in the nine-grid.
Optionally, the apparatus further comprises: the first obtaining unit is used for obtaining material information in a target terrain file before the first number of terrain meshes are spliced to obtain a target terrain, wherein the material information is used for generating the surface material of the target terrain; the splicing unit 40 includes: and the splicing module is used for splicing the terrain meshes with the first quantity of the earth surface materials to obtain the target terrain.
The first acquisition unit includes: the device comprises a first obtaining module and a second obtaining module, wherein the first obtaining module is used for obtaining the weights of a plurality of terrain maps and a plurality of terrain maps in a target terrain file, the terrain maps are used for forming earth surface materials, and the material information comprises the weights of the plurality of terrain maps and the plurality of terrain maps.
Optionally, the first obtaining module includes: a first acquisition submodule and a second acquisition submodule. The first obtaining submodule is used for obtaining weight pictures in the target terrain file, wherein the weight pictures are represented by preset number of channels of preset number of landform maps in a plurality of landform maps, and the preset number of channels correspond to the preset number of landform maps; and the second obtaining sub-module is used for obtaining the weight pictures in the target terrain file again, wherein the weights of the terrain maps except for the preset number in the plurality of terrain maps are represented by the channels in the obtained weight pictures again.
Optionally, the apparatus further comprises: and the processing unit is used for processing the material information in the target terrain file through a preset shader after the material information in the target terrain file is acquired, so as to obtain the earth surface material.
The acquisition unit 10 includes: and the second acquisition module is used for acquiring the position information of the vertex in the target terrain file, wherein the first mesh information comprises the position information of the vertex, and the position information of the vertex is used for expressing the position of the vertex of the target terrain.
The second acquisition module includes: a third obtaining submodule, a fourth obtaining submodule, a fifth obtaining submodule and a determining submodule. The third obtaining submodule is used for obtaining vertex height information in the target terrain file, wherein the vertex height information is used for representing the vertex of the target terrain; the fourth obtaining submodule is used for obtaining terrain size information in the target terrain file, wherein the terrain size information is used for representing the size of the target terrain; the fifth obtaining submodule is used for obtaining the number of the vertexes of the target terrain according to the vertex height information and obtaining the number of the vertexes of the target terrain and the intervals among the vertexes of the number according to the vertex height information and the terrain size information; and the determining submodule is used for determining the position information of the vertexes according to the number of the vertexes and the intervals among the vertexes.
Optionally, the apparatus further comprises: a second acquisition unit and a determination unit. The second acquiring unit is used for acquiring a terrain surface including each vertex in the vertexes of the number after acquiring the number of the vertexes of the target terrain; a determining unit, configured to determine a normal of each vertex according to a normal of a ground surface of each vertex, where the first mesh information includes the normal of the vertex; the dividing unit 20 includes: the first dividing module is used for dividing the first mesh information according to the continuous position information in the position information of the number of vertexes and the continuous normal in the normal of the number of vertexes to obtain a first number of second mesh information.
Optionally, the second obtaining unit includes: a sixth obtaining submodule, configured to obtain a plurality of ground planes including each vertex; the determination unit includes: a first determining module for determining a normal of each vertex from an average normal of normals of the plurality of geosurfaces.
Optionally, the dividing unit 20 includes: the device comprises a third acquisition module, a first determination module and a second division module. The third acquisition module is used for acquiring the size of a visible area of the terrain in the running process of the target application; a first determining module for determining a first number from the size of the visible area; and the second dividing module is used for dividing the first grid information according to the first quantity to obtain the second grid information of the first quantity.
Optionally, the target application is a Unity engine.
It should be noted that the obtaining unit 10 in this embodiment may be configured to execute step S202 in embodiment 1 of this application, the dividing unit 20 in this embodiment may be configured to execute step S204 in embodiment 1 of this application, the generating unit 30 in this embodiment may be configured to execute step S206 in embodiment 1 of this application, and the splicing unit 40 in this embodiment may be configured to execute step S208 in embodiment 1 of this application.
It should be noted here that the above units and modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above embodiment 1. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
The embodiment obtains first mesh information in a target terrain file before a target application is run, wherein the target application is used for displaying target terrain in a game scene during the running, the target terrain file is used for generating target terrain, and the first mesh information is used for generating a terrain mesh of the target terrain; dividing the first mesh information by a dividing unit 20 to obtain a first amount of second mesh information; generating a first number of terrain meshes from the first number of second mesh information by the generating unit 30; when the target application runs, the first number of terrain meshes are spliced through the splicing unit 40 to obtain the target terrain. The method comprises the steps of dividing the terrain mesh information of the terrain file before the target application runs, and generating the terrain mesh from a plurality of pieces of mesh information obtained through division, so that the purpose of loading the terrain mesh when the target application runs is achieved, the running performance of the target application when the target application processes the terrain file is improved, and the technical problem of low running performance of the target application when the target application processes the terrain file in the related technology is solved.
It should be noted here that the above units and modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above embodiment 1. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
Example 4
According to the embodiment of the invention, the invention further provides a server or a terminal for implementing the processing method of the terrain file.
Fig. 15 is a block diagram of a terminal according to an embodiment of the present invention. As shown in fig. 15, the terminal may include: one or more processors 151 (only one of which is shown), a memory 153, and a transmission means 155. as shown in fig. 15, the terminal may further include an input/output device 157.
The memory 153 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for processing a terrain file in the embodiment of the present invention, and the processor 151 executes various functional applications and data processing by running the software programs and modules stored in the memory 153, that is, implements the above-mentioned method for processing a terrain file. The memory 153 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 153 may further include memory located remotely from the processor 151, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 155 is used for receiving or transmitting data via a network, and may also be used for data transmission between the processor and the memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 155 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices so as to communicate with the internet or a local area Network. In one example, the transmission device 155 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Among them, the memory 153 is used to store an application program, in particular.
The processor 151 may call the application stored in the memory 153 through the transmission means 155 to perform the following steps:
before a target application runs, obtaining first grid information in a target terrain file, wherein the target application is used for displaying target terrain in a game scene during running, the target terrain file is used for generating target terrain, and the first grid information is used for generating a terrain grid of the target terrain;
dividing the first grid information to obtain a first amount of second grid information;
generating a first number of terrain meshes according to the first number of second mesh information;
and when the target application runs, splicing the terrain grids of the first number to obtain the target terrain.
Processor 151 is further configured to perform the following steps: loading a first number of terrain meshes into a game scene when a target application runs; and splicing the first number of terrain grids according to the corresponding position sequence of the first number of terrain grids in the game scene to obtain the target terrain.
Processor 151 is further configured to perform the following steps: after a first number of terrain meshes are spliced to obtain a target terrain, displaying a ground surface represented by the first mesh at a preset display position of a target application and a ground surface represented by a plurality of second meshes at positions around the preset display position, and hiding the ground surface represented by the terrain meshes except the first mesh and the second meshes in the first number of terrain meshes, wherein the first number of terrain meshes comprises the first mesh and the second meshes, and the target terrain comprises the ground surface represented by the first mesh and the ground surfaces represented by the second meshes around the first mesh.
Processor 151 is further configured to perform the following steps: and displaying the ground surface represented by the first grid at a preset display position of the target application and the ground surfaces represented by a plurality of second grids at positions around the preset display position according to a nine-grid form, wherein the preset display position is a central grid area of a nine-grid, and the positions around the preset display position are grid areas except the central grid area in the nine-grid.
Processor 151 is further configured to perform the following steps: acquiring material information in a target terrain file before splicing the first number of terrain meshes to obtain a target terrain, wherein the material information is used for generating the surface material of the target terrain; splicing the terrain grids of the first number to obtain a target terrain comprises: and splicing the terrain meshes with the first quantity of the ground surface materials to obtain the target terrain.
Processor 151 is further configured to perform the following steps: the method comprises the steps of obtaining weights of a plurality of terrain maps and a plurality of terrain maps in a target terrain file, wherein the terrain maps are used for forming earth surface materials, and the material information comprises the weights of the plurality of terrain maps and the plurality of terrain maps.
Processor 151 is further configured to perform the following steps: acquiring weight pictures in a target terrain file, wherein the weight pictures represent the weights of a preset number of terrain maps in a plurality of terrain maps by a preset number of channels, and the preset number of channels correspond to the weights of the preset number of terrain maps; and acquiring the weight picture in the target terrain file again, wherein the weights of the terrain maps except the preset number in the plurality of terrain maps are represented by channels in the acquired weight picture again.
Processor 151 is further configured to perform the following steps: and after the material information in the target terrain file is obtained, processing the material information in the target terrain file through a preset shader to obtain the earth surface material.
Processor 151 is further configured to perform the following steps: and acquiring the position information of the vertex in the target terrain file, wherein the first mesh information comprises the position information of the vertex, and the position information of the vertex is used for expressing the vertex position of the target terrain.
Processor 151 is further configured to perform the following steps: acquiring vertex height information in a target terrain file, wherein the vertex height information is used for representing a vertex of a target terrain; acquiring terrain size information in a target terrain file, wherein the terrain size information is used for representing the size of a target terrain; acquiring the number of vertexes of the target terrain according to the vertex height information, and acquiring the number of the vertexes of the target terrain and intervals among the vertexes of the number according to the vertex height information and the terrain size information; and determining the position information of the vertices according to the number of the vertices and the intervals among the vertices.
Processor 151 is further configured to perform the following steps: after the number of the vertexes of the target terrain is obtained, obtaining a terrain surface comprising each vertex from the vertexes of the number; determining a normal of each vertex according to a normal of a ground surface of each vertex, wherein the first mesh information comprises the normal of the vertex; wherein, dividing the first mesh information to obtain the first number of second mesh information comprises: and dividing the first mesh information according to the continuous position information in the position information of the number of vertexes and the continuous normal in the normal of the number of vertexes to obtain a first number of second mesh information.
Processor 151 is further configured to perform the following steps: acquiring a plurality of ground planes including each vertex; determining the normal of each vertex from the normal of the geosurface of each vertex comprises: determining a normal to each vertex from an average normal to normals of the plurality of geodesic surfaces.
Processor 151 is further configured to perform the following steps: acquiring the size of a visible area of a terrain in the running process of a target application; determining a first number from the size of the visible area; and dividing the first grid information according to the first quantity to obtain second grid information of the first quantity.
The embodiment of the invention provides a scheme for processing a terrain file. The method comprises the steps that first grid information in a target terrain file is obtained before a target application is operated, wherein the target application is used for displaying target terrain in a game scene during operation, the target terrain file is used for generating target terrain, and the first grid information is used for generating a terrain grid of the target terrain; dividing the first grid information to obtain a first amount of second grid information; generating a first number of terrain meshes according to the first number of second mesh information; and when the target application runs, splicing the terrain grids of the first number to obtain the target terrain. The method comprises the steps of dividing the terrain mesh information of the terrain file before the target application runs, and generating the terrain mesh from a plurality of pieces of mesh information obtained through division, so that the purpose of loading the terrain mesh when the target application runs is achieved, the running performance of the target application when the target application processes the terrain file is improved, and the technical problem of low running performance of the target application when the target application processes the terrain file in the related technology is solved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 15 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 15 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 15, or have a different configuration than shown in FIG. 15.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 5
The embodiment of the invention also provides a storage medium. Alternatively, in the present embodiment, the storage medium may be a program code for executing a processing method of a terrain file.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
before a target application runs, obtaining first grid information in a target terrain file, wherein the target application is used for displaying target terrain in a game scene during running, the target terrain file is used for generating target terrain, and the first grid information is used for generating a terrain grid of the target terrain;
dividing the first grid information to obtain a first amount of second grid information;
generating a first number of terrain meshes according to the first number of second mesh information;
and when the target application runs, splicing the terrain grids of the first number to obtain the target terrain.
Optionally, the storage medium is further arranged to store program code for performing the steps of: loading a first number of terrain meshes into a game scene when a target application runs; and splicing the first number of terrain grids according to the corresponding position sequence of the first number of terrain grids in the game scene to obtain the target terrain.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after a first number of terrain meshes are spliced to obtain a target terrain, displaying a ground surface represented by the first mesh at a preset display position of a target application and a ground surface represented by a plurality of second meshes at positions around the preset display position, and hiding the ground surface represented by the terrain meshes except the first mesh and the second meshes in the first number of terrain meshes, wherein the first number of terrain meshes comprises the first mesh and the second meshes, and the target terrain comprises the ground surface represented by the first mesh and the ground surfaces represented by the second meshes around the first mesh.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and displaying the ground surface represented by the first grid at a preset display position of the target application and the ground surfaces represented by a plurality of second grids at positions around the preset display position according to a nine-grid form, wherein the preset display position is a central grid area of a nine-grid, and the positions around the preset display position are grid areas except the central grid area in the nine-grid.
Optionally, the storage medium is further arranged to store program code for performing the steps of: acquiring material information in a target terrain file before splicing the first number of terrain meshes to obtain a target terrain, wherein the material information is used for generating the surface material of the target terrain; splicing the terrain grids of the first number to obtain a target terrain comprises: and splicing the terrain meshes with the first quantity of the ground surface materials to obtain the target terrain.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the method comprises the steps of obtaining weights of a plurality of terrain maps and a plurality of terrain maps in a target terrain file, wherein the terrain maps are used for forming earth surface materials, and the material information comprises the weights of the plurality of terrain maps and the plurality of terrain maps.
Optionally, the storage medium is further arranged to store program code for performing the steps of: acquiring weight pictures in a target terrain file, wherein the weight pictures represent the weights of a preset number of terrain maps in a plurality of terrain maps by a preset number of channels, and the preset number of channels correspond to the weights of the preset number of terrain maps; and acquiring the weight picture in the target terrain file again, wherein the weights of the terrain maps except the preset number in the plurality of terrain maps are represented by channels in the acquired weight picture again.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and after the material information in the target terrain file is obtained, processing the material information in the target terrain file through a preset shader to obtain the earth surface material.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and acquiring the position information of the vertex in the target terrain file, wherein the first mesh information comprises the position information of the vertex, and the position information of the vertex is used for expressing the vertex position of the target terrain.
Optionally, the storage medium is further arranged to store program code for performing the steps of: acquiring vertex height information in a target terrain file, wherein the vertex height information is used for representing a vertex of a target terrain; acquiring terrain size information in a target terrain file, wherein the terrain size information is used for representing the size of a target terrain; acquiring the number of vertexes of the target terrain according to the vertex height information, and acquiring the number of the vertexes of the target terrain and intervals among the vertexes of the number according to the vertex height information and the terrain size information; and determining the position information of the vertices according to the number of the vertices and the intervals among the vertices.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the number of the vertexes of the target terrain is obtained, obtaining a terrain surface comprising each vertex from the vertexes of the number; determining a normal of each vertex according to a normal of a ground surface of each vertex, wherein the first mesh information comprises the normal of the vertex; wherein, dividing the first mesh information to obtain the first number of second mesh information comprises: and dividing the first mesh information according to the continuous position information in the position information of the number of vertexes and the continuous normal in the normal of the number of vertexes to obtain a first number of second mesh information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: acquiring a plurality of ground planes including each vertex; determining the normal of each vertex from the normal of the geosurface of each vertex comprises: determining a normal to each vertex from an average normal to normals of the plurality of geodesic surfaces.
Optionally, the storage medium is further arranged to store program code for performing the steps of: acquiring the size of a visible area of a terrain in the running process of a target application; determining a first number from the size of the visible area; and dividing the first grid information according to the first quantity to obtain second grid information of the first quantity.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed target application can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, 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 executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
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 network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (17)

1. A method for processing a terrain file, comprising:
before a target application runs, obtaining first grid information in a target terrain file, wherein the target application is used for displaying target terrain in a game scene during running, the target terrain file is used for generating the target terrain, and the first grid information is used for generating a terrain grid of the target terrain;
dividing the first grid information to obtain a first amount of second grid information;
generating the first number of terrain meshes according to the first number of second mesh information, wherein the first number of terrain meshes are static meshes;
and splicing the terrain grids of the first number when the target application runs to obtain the target terrain.
2. The method of claim 1, wherein stitching the first number of terrain meshes to obtain the target terrain comprises, at the time of the target application running:
loading the first number of terrain meshes into the game scene while the target application is running;
and splicing the first number of terrain meshes according to the corresponding position sequence of the first number of terrain meshes in the game scene to obtain the target terrain.
3. The method of claim 1, wherein after stitching the first number of terrain meshes to obtain the target terrain, the method further comprises:
displaying a ground surface of a first grid representation at a preset display position of the target application and a ground surface of a plurality of second grid representations at positions around the preset display position, and hiding the ground surface of the terrain grid representation except the first grid and the plurality of second grids in the first number of terrain grids, wherein the first number of terrain grids comprises the first grid and the plurality of second grids, and the target terrain comprises the ground surface of the first grid representation and the ground surfaces of the plurality of second grid representations positioned around the first grid.
4. The method of claim 3, wherein displaying the terrain of the first grid representation at a preset display location of the target application and the terrain of the plurality of second grid representations at locations surrounding the preset display location comprises:
displaying a ground surface represented by a first grid at a preset display position of the target application and displaying a ground surface represented by a plurality of second grids at positions around the preset display position according to a nine-grid form, wherein the preset display position is a central grid area of the nine-grid, and the positions around the preset display position are grid areas except the central grid area in the nine-grid.
5. The method of claim 1,
before the first number of terrain meshes are spliced to obtain the target terrain, the method further comprises: acquiring material information in the target terrain file, wherein the material information is used for generating the surface material of the target terrain;
splicing the terrain meshes of the first number to obtain the target terrain comprises: and splicing the terrain meshes with the first quantity of the ground surface materials to obtain the target terrain.
6. The method of claim 5, wherein obtaining the material information in the target terrain file comprises:
and acquiring a plurality of terrain maps in the target terrain file and the weights of the plurality of terrain maps, wherein the terrain maps are used for forming the earth surface material, and the material information comprises the plurality of terrain maps and the weights of the plurality of terrain maps.
7. The method of claim 6, wherein obtaining the weights for the plurality of terrain maps in the target terrain file comprises:
acquiring a weight picture in the target terrain file, wherein the weight picture represents the weight of the preset number of terrain maps in the multiple terrain maps by a preset number of channels, and the preset number of channels corresponds to the weight of the preset number of terrain maps;
and acquiring the weight picture in the target terrain file again, wherein the weights of the terrain maps except the preset number in the plurality of terrain maps are represented by channels in the acquired weight picture again.
8. The method of claim 5, wherein after obtaining material information in the target terrain file, the method further comprises:
and processing the material information in the target terrain file through a preset shader to obtain the surface material.
9. The method of claim 1, wherein obtaining the first mesh information in the target terrain file comprises:
and acquiring the position information of the vertex in the target terrain file, wherein the first mesh information comprises the position information of the vertex, and the position information of the vertex is used for expressing the vertex position of the target terrain.
10. The method of claim 9, wherein obtaining the location information of the vertices in the target terrain file comprises:
acquiring vertex height information in the target terrain file, wherein the vertex height information is used for representing a vertex of the target terrain;
acquiring terrain size information in the target terrain file, wherein the terrain size information is used for representing the size of the target terrain;
acquiring the number of vertexes of the target terrain according to the vertex height information, and acquiring the number of the vertexes of the target terrain and intervals among the vertexes of the number according to the vertex height information and the terrain size information;
and determining the position information of the vertexes of the number according to the number of the vertexes and the intervals among the vertexes of the number.
11. The method of claim 10, wherein after obtaining the number of vertices of the target terrain, the method further comprises:
acquiring a ground surface comprising each vertex from the number of vertexes;
determining a normal of each vertex according to a normal of a ground surface of each vertex, wherein the first mesh information comprises the normal of each vertex;
wherein dividing the first mesh information to obtain the first number of second mesh information includes: and dividing the first mesh information according to the continuous position information in the position information of the vertices and the continuous normal lines in the normal lines of the vertices to obtain the first number of second mesh information.
12. The method of claim 11,
obtaining a geosurface including said each vertex comprises: acquiring a plurality of ground planes including each vertex;
determining the normal of each vertex according to the normal of the ground surface of each vertex comprises: determining an average normal of normals of the plurality of geodesic surfaces to a normal of the each vertex.
13. The method according to any one of claims 1 to 12, wherein the dividing the first mesh information to obtain the first number of second mesh information comprises:
acquiring the size of a visible area of the terrain in the running process of the target application;
determining the first number from the size of the visible area;
and dividing the first grid information according to the first quantity to obtain the second grid information of the first quantity.
14. The method of any of claims 1 to 12, wherein the target application is a Unity engine.
15. A terrain file processing apparatus, comprising:
an obtaining unit, configured to obtain first mesh information in a target terrain file before a target application is run, where the target application is used to display a target terrain in a game scene during the running, the target terrain file is used to generate the target terrain, and the first mesh information is used to generate a terrain mesh of the target terrain;
the dividing unit is used for dividing the first grid information to obtain a first amount of second grid information;
a generating unit, configured to generate the first number of terrain meshes according to the first number of second mesh information, where the first number of terrain meshes are static meshes;
and the splicing unit is used for splicing the terrain meshes of the first number to obtain the target terrain when the target application runs.
16. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, controls an apparatus in which the storage medium is located to carry out the method of any one of claims 1 to 14.
17. A terminal comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 14 by means of the computer program.
CN201710424868.8A 2017-06-07 2017-06-07 Processing method and device of terrain file Active CN107358649B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710424868.8A CN107358649B (en) 2017-06-07 2017-06-07 Processing method and device of terrain file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710424868.8A CN107358649B (en) 2017-06-07 2017-06-07 Processing method and device of terrain file

Publications (2)

Publication Number Publication Date
CN107358649A CN107358649A (en) 2017-11-17
CN107358649B true CN107358649B (en) 2020-11-10

Family

ID=60272331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710424868.8A Active CN107358649B (en) 2017-06-07 2017-06-07 Processing method and device of terrain file

Country Status (1)

Country Link
CN (1) CN107358649B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108171797B (en) * 2017-12-05 2021-12-24 北京像素软件科技股份有限公司 Grid object generation method and device
CN108057245B (en) * 2017-12-18 2021-02-19 网易(杭州)网络有限公司 Map generation method and device, storage medium and terminal
CN108765533A (en) * 2018-05-17 2018-11-06 成都明镜视觉科技有限公司 A kind of shader parameters method for visualizing
CN109316750B (en) * 2018-11-21 2022-01-11 北京像素软件科技股份有限公司 Game scene area dividing method and device
CN109559378A (en) * 2018-11-21 2019-04-02 北京像素软件科技股份有限公司 Mesh generation method and device
CN109925716B (en) 2019-04-12 2020-04-21 网易(杭州)网络有限公司 Vertex reconstruction method and device for terrain cutting, processor and terminal
CN110363836A (en) * 2019-07-19 2019-10-22 杭州绝地科技股份有限公司 A kind of role's rendering method, device and equipment based on Matcap textures
CN111803952A (en) * 2019-11-21 2020-10-23 厦门雅基软件有限公司 Topographic map editing method and device, electronic equipment and computer readable medium
CN111729303B (en) * 2020-05-26 2024-04-05 广州尊游软件科技有限公司 Large map baking and cutting method and restoration method
CN111798504A (en) * 2020-06-02 2020-10-20 完美世界(北京)软件科技发展有限公司 Rendering method and device
CN111957045B (en) * 2020-09-01 2021-06-04 网易(杭州)网络有限公司 Terrain deformation method, device, equipment and storage medium
CN112365599A (en) * 2020-11-05 2021-02-12 国网甘肃省电力公司 Method and system for manufacturing lawn in interactive scene in power transformation operation inspection simulation system
CN114677482B (en) * 2020-12-24 2022-12-20 广州博冠信息科技有限公司 Terrain construction method and equipment
CN113368503B (en) * 2021-07-06 2023-11-24 福建天晴在线互动科技有限公司 Method and system for multiplexing terrain materials

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11203448A (en) * 1998-01-19 1999-07-30 Hitachi Ltd Image display system
CN101388043A (en) * 2008-09-26 2009-03-18 北京航空航天大学 OGC high performance remote sensing image map service method based on small picture
CN102298640A (en) * 2011-09-14 2011-12-28 清华大学 Method for preprocessing map display data
KR101239937B1 (en) * 2012-09-21 2013-03-06 (주)신한항업 Drawing image processing system be able to edit and revision part of photographing image by aim of making map

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100468461C (en) * 2005-11-10 2009-03-11 北京航空航天大学 Real time drawing method of vivid three dimensional land form geograpical model
JP5089453B2 (en) * 2008-03-24 2012-12-05 株式会社コナミデジタルエンタテインメント Image processing apparatus, image processing apparatus control method, and program
CN102109353B (en) * 2009-12-24 2013-01-02 比亚迪股份有限公司 Method and device for realizing three-dimensional navigation
US9201237B2 (en) * 2012-03-22 2015-12-01 Apple Inc. Diffraction-based sensing of mirror position
CN104318617B (en) * 2014-10-17 2017-03-08 福建师范大学 A kind of three-dimensional geography scene simulation method of Virtual emergency drilling
CN106204735B (en) * 2016-07-18 2018-11-09 中国人民解放军理工大学 Application method of the Unity3D terrain datas in 11 environment of Direct3D

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11203448A (en) * 1998-01-19 1999-07-30 Hitachi Ltd Image display system
CN101388043A (en) * 2008-09-26 2009-03-18 北京航空航天大学 OGC high performance remote sensing image map service method based on small picture
CN102298640A (en) * 2011-09-14 2011-12-28 清华大学 Method for preprocessing map display data
KR101239937B1 (en) * 2012-09-21 2013-03-06 (주)신한항업 Drawing image processing system be able to edit and revision part of photographing image by aim of making map

Also Published As

Publication number Publication date
CN107358649A (en) 2017-11-17

Similar Documents

Publication Publication Date Title
CN107358649B (en) Processing method and device of terrain file
CN107358643B (en) Image processing method, image processing device, electronic equipment and storage medium
EP3882865A1 (en) Object loading method, device, storage medium, and electronic device
US20170154468A1 (en) Method and electronic apparatus for constructing virtual reality scene model
US9275493B2 (en) Rendering vector maps in a geographic information system
CN108765520B (en) Text information rendering method and device, storage medium and electronic device
US9224233B2 (en) Blending 3D model textures by image projection
CN109544658B (en) Map rendering method and device, storage medium and electronic device
KR20080018404A (en) Computer readable recording medium having background making program for making game
CN112675545B (en) Method and device for displaying surface simulation picture, storage medium and electronic equipment
Ripolles et al. Real-time tessellation of terrain on graphics hardware
CN109697748A (en) Model compression processing method, model pinup picture processing method device, storage medium
CN114241151A (en) Three-dimensional model simplification method and device, computer equipment and computer storage medium
CN113470092B (en) Terrain rendering method and device, electronic equipment and storage medium
CN112231020B (en) Model switching method and device, electronic equipment and storage medium
CN112907451A (en) Image processing method, image processing device, computer equipment and storage medium
US10657705B2 (en) System and method for rendering shadows for a virtual environment
CN111950057A (en) Loading method and device of Building Information Model (BIM)
CN110989979A (en) Terrain generation method based on UE engine
CN113192173B (en) Image processing method and device of three-dimensional scene and electronic equipment
CN111462343B (en) Data processing method and device, electronic equipment and storage medium
CN114820980A (en) Three-dimensional reconstruction method and device, electronic equipment and readable storage medium
Dam et al. Terrain generation based on real world locations for military training and simulation
CN114429513A (en) Method and device for determining visible element, storage medium and electronic equipment
CN114565709A (en) Data storage management method, object rendering method and device

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