CN115888085A - Game information processing method, device and storage medium - Google Patents

Game information processing method, device and storage medium Download PDF

Info

Publication number
CN115888085A
CN115888085A CN202211511154.8A CN202211511154A CN115888085A CN 115888085 A CN115888085 A CN 115888085A CN 202211511154 A CN202211511154 A CN 202211511154A CN 115888085 A CN115888085 A CN 115888085A
Authority
CN
China
Prior art keywords
vertex
mesh
grid
target
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211511154.8A
Other languages
Chinese (zh)
Inventor
鲁昂
吴栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202211511154.8A priority Critical patent/CN115888085A/en
Publication of CN115888085A publication Critical patent/CN115888085A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application discloses a game information processing method, a game information processing device and a storage medium. The method comprises the following steps: acquiring a triangular mesh of a game object in a game scene, wherein the triangular mesh is formed by a plurality of triangles and is used for representing a three-dimensional model of the game object; dividing the triangular mesh into a plurality of mesh areas, wherein each mesh area is used for representing a local space occupied by a local geometric structure of the three-dimensional model in a game scene; determining at least one target grid area in the plurality of grid areas, wherein the at least one target grid area is used for restoring the grid areas except the at least one target grid area in the plurality of grid areas; and generating an object file based on the connection information among the grid areas and at least one target grid area, wherein the object file is used for restoring the game object in the game scene. The method and the device solve the technical problem that the compression efficiency of the triangular mesh is low.

Description

Game information processing method, device and storage medium
Technical Field
The present disclosure relates to the field of information processing technologies, and in particular, to a method and an apparatus for processing game information, and a storage medium.
Background
Various existing network games are full of various game objects, such as characters, buildings, props, scenes and the like, and in order to restore the game scenes with high quality, a large amount of chartlet and triangular grid data are needed, wherein the chartlet is mainly used for describing local details of the games, the triangular grid is mainly used for describing local spatial characteristics of the game objects in the game scenes, and with the continuous enhancement of the game quality, the requirements of the chartlet and the triangular grid precision are continuously improved, but the improvement of the triangular grid precision leads to the expansion of the game bag body, and for the games, the maintenance of the simplified game bag body is very important, so that how to reduce the game bag body is especially important on the basis of ensuring the triangular grid precision.
At present, the mainstream triangle mesh coding scheme mainly extracts the connectivity between triangle meshes and then codes the connectivity between the triangle meshes based on a predefined sequence, but the coding mode does not consider the spatial structure characteristics of the triangle meshes, and the efficient compression of the triangle meshes cannot be realized.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
At least some embodiments of the present disclosure provide a method, an apparatus, and a storage medium for processing game information, so as to at least solve the technical problem of low compression efficiency of a triangular mesh.
According to one embodiment of the disclosure, a method for processing game information is provided. The method can comprise the following steps: acquiring a triangular mesh of a game object in a game scene, wherein the triangular mesh is composed of a plurality of triangles and is used for representing a three-dimensional model of the game object; dividing the triangular mesh into a plurality of mesh areas, wherein each mesh area is used for representing a local space occupied by a local geometric structure of the three-dimensional model in a game scene; determining at least one target grid area in the plurality of grid areas, wherein the at least one target grid area is used for restoring the grid areas except for the at least one target grid area from the plurality of grid areas; and generating an object file based on the connection information among the grid areas and at least one target grid area, wherein the object file is used for restoring the game object in the game scene.
According to one embodiment of the disclosure, a game information processing device is further provided. The apparatus may include: the game system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a triangular mesh of a game object in a game scene, the triangular mesh is composed of a plurality of triangles and is used for representing a three-dimensional model of the game object; the dividing unit is used for dividing the triangular mesh into a plurality of mesh areas, wherein each mesh area is used for representing a local space occupied by a local geometric structure of the three-dimensional model in a game scene; the device comprises a determining unit, a calculating unit and a processing unit, wherein the determining unit is used for determining at least one target grid area in the grid areas, and the at least one target grid area is used for restoring the grid areas except the at least one target grid area in the grid areas; and the generating unit is used for generating an object file based on the connection information among the grid areas and at least one object grid area, wherein the object file is used for restoring the game object in the game scene.
According to an embodiment of the present disclosure, there is also provided a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to execute the method for processing game information in any one of the above-mentioned items when running.
According to an embodiment of the present disclosure, there is also provided an electronic device including a memory and a processor, the memory storing a computer program therein, the processor being configured to execute the computer program to perform the method for processing game information in any one of the above.
In at least some embodiments of the present disclosure, a triangular mesh of a game object in a game scene is obtained, wherein the triangular mesh is composed of a plurality of triangles and is used for representing a three-dimensional model of the game object; dividing the triangular mesh into a plurality of mesh areas, wherein each mesh area is used for representing a local space occupied by a local geometric structure of the three-dimensional model in a game scene; determining at least one target grid area in the plurality of grid areas, wherein the at least one target grid area is used for restoring the grid areas except the at least one target grid area in the plurality of grid areas; and generating an object file based on the connection information among the grid areas and at least one object grid area, wherein the object file is used for restoring the game object in the game scene. That is to say, in the embodiment of the present disclosure, a triangular mesh forming a game object may be divided into a plurality of mesh areas, and according to similarities between the plurality of mesh areas, at least one target mesh area may be determined from the plurality of mesh areas, where the target mesh area may represent a mesh area with the highest similarity among the plurality of mesh areas, and based on the at least one target mesh area, a mesh area other than the at least one target mesh area among the plurality of mesh areas may be restored.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the disclosure and together with the description serve to explain the disclosure and not to limit the disclosure. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a game information processing method according to an embodiment of the present disclosure;
FIG. 2 is a flow diagram of a method of processing game information according to one embodiment of the present disclosure;
FIG. 3 is a flow diagram of another method of processing gaming information according to one embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a processing device for game information according to one embodiment of the present disclosure;
FIG. 5 is a block diagram of an electronic device according to an alternative embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those skilled in the art, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings 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 disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with one embodiment of the present disclosure, an embodiment of a method for processing game information is provided, it is noted that the steps illustrated in the flow chart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flow chart, in some cases, the steps illustrated or described may be performed in an order different than that presented herein.
The method embodiments may be performed in a mobile terminal, a computer terminal or a similar computing device. Taking the example of the Mobile terminal running on the Mobile terminal, the Mobile 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, a Mobile Internet Device (MID), a PAD, a game console, etc. Fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a game information processing method according to an embodiment of the present disclosure. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the mobile terminal may further include a transmission device 106, an input/output device 108, and a display device 110 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the game information processing method in the embodiment of the present disclosure, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned game information processing method. The memory 104 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 104 may further include memory located remotely from the processor 102, which may be connected to the mobile 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 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The inputs in the input output Device 108 may come from a plurality of Human Interface Devices (HIDs). For example: keyboard and mouse, game pad, other special game controller (such as steering wheel, fishing rod, dance mat, remote controller, etc.). Some human interface devices may provide output functions in addition to input functions, such as: force feedback and vibration of the gamepad, audio output of the controller, etc.
The display device 110 may be, for example, a head-up display (HUD), a touch screen type Liquid Crystal Display (LCD), and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a Graphical User Interface (GUI) with which a user can interact by touching finger contacts and/or gestures on a touch-sensitive surface, where the human-machine interaction function optionally includes the following interactions: executable instructions for creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, emailing, call interfacing, playing digital video, playing digital music, and/or web browsing, etc., for performing the above-described human-computer interaction functions, are configured/stored in one or more processor-executable computer program products or readable storage media.
In accordance with one embodiment of the present disclosure, an embodiment of a method for processing game information is provided, it is noted that the steps illustrated in the flow chart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flow chart, in some cases, the steps illustrated or described may be performed in an order different than that presented herein.
In a possible implementation manner, an embodiment of the present disclosure provides a method for processing game information, and fig. 2 is a flowchart of a method for processing game information according to an embodiment of the present disclosure, as shown in fig. 2, the method includes the following steps:
step S201, obtaining a triangular mesh of a game object in a game scene, where the triangular mesh is composed of a plurality of triangles and is used for representing a three-dimensional model of the game object.
In the technical solution provided in the above step S201 of the present disclosure, since the game scene includes various game objects, for example, a virtual vehicle, a virtual game character, a virtual building, and the like, a triangular mesh is usually used to simulate the surfaces of the various game objects to form a three-dimensional model of the game objects in the game scene, where the triangular mesh may also be referred to as a triangular mesh, and based on this, the triangular mesh of the game objects in the game scene may be obtained.
Alternatively, since the mesh is a data structure in which the geometry of the entity is represented by a series of points and edges, and the triangular mesh is a three-dimensional (3D) model composed of a plurality of triangles sharing edges or vertices at different angles, based on this, the triangular mesh of each game object in the game scene can be acquired by acquiring the edges and vertices of the 3D model constituting each game object in the game scene.
Step S202, the triangular mesh is divided into a plurality of mesh areas, wherein each mesh area is used for representing the local space occupied by the local geometric structure of the three-dimensional model in the game scene.
In the technical solution provided in the above step S202 of the present disclosure, since the triangular mesh includes a plurality of vertices, and the plurality of vertices form a vertex set, the vertex set of the triangular mesh may be obtained, and then the triangular mesh is divided based on the vertex set to obtain a plurality of mesh regions, where the plurality of mesh regions may be referred to as PS _ original.
Optionally, the step of dividing the triangular mesh based on the vertex set to obtain a plurality of mesh regions may include the following steps: a first determination step: determining a vertex with the maximum curvature absolute value as a first vertex of a first grid area to be generated in a sub-vertex set of the vertex set, wherein the vertex in the sub-vertex set does not belong to a generated second grid area; a second determination step: in the sub-vertex set, determining at least one vertex adjacent to the first vertex as at least one second vertex of the first mesh area to be generated; a generation step: and after the determined first vertex and at least one second vertex form a first mesh area, and the first mesh area is determined as a second mesh area, wherein the second mesh area is the generated mesh area, the first determination step can be continued until the number of vertices in the sub-vertex set is less than a first number threshold, wherein the first number threshold is the minimum number of vertices for forming the mesh area.
Optionally, when determining at least one second vertex of the first mesh region to be generated, if a distance between a vertex in the sub vertex set and the first vertex is greater than a distance threshold, and/or an included angle between a normal of the vertex in the sub vertex set and a normal of the first vertex is greater than an angle threshold, or the number of vertices included in the first mesh region to be generated already exceeds a second number threshold, the determining of the second vertex is stopped, and the first mesh region generated at this time is determined as the generated mesh region, where the angle threshold and the second number threshold may be preset, for example, the angle threshold is 90 degrees, and the second number threshold may be 128 or 130, which is not limited herein.
Step S203, determining at least one target grid region in the plurality of grid regions, wherein the at least one target grid region is used to restore grid regions of the plurality of grid regions except for the at least one target grid region.
In the technical solution provided in the above step S203 of the present disclosure, at least one target mesh region may be determined based on the features of the vertices in each mesh region, where the features of the vertices are used to represent height information of the vertices, and mesh regions other than the at least one target mesh region in the plurality of mesh regions may be restored based on the at least one target mesh region, where the target mesh region may be referred to as PS _ typal.
Optionally, in each grid region, resampling the multiple vertices according to the resampling grid to obtain features of the multiple vertices, where the features of the vertices are used to represent height information of the vertices on the resampling grid.
Optionally, in the resampling process, a local coordinate system of each mesh region may be determined, where the local coordinate system is established with a vertex with the highest curvature absolute value among the multiple vertices as an origin; dividing a resampling grid in a target coordinate plane of a local coordinate system; determining a target sub-grid to which each vertex is mapped in the resampling grid; determining the characteristics of each vertex based on the corresponding height information of each vertex on the target sub-mesh.
Optionally, when determining the feature of each vertex based on the corresponding height information of each vertex on the target sub-mesh, the height information of a vertex in the local coordinate system may be determined as the feature of a vertex when a vertex in the plurality of vertices is mapped onto the target sub-mesh; when at least two vertexes of the plurality of vertexes are mapped onto the target sub-mesh, average height information of the at least two vertexes in the local coordinate system is obtained, and the average height information is determined as a feature of each vertex of the at least two vertexes.
Optionally, after determining the feature of each vertex, generating an object matrix based on the features of the plurality of vertices, wherein the object matrix is used for representing the feature lengths of the features of the plurality of vertices and the size of each mesh region; decomposing the target matrix into at least one eigenvector; generating each feature vector into a target grid region to obtain at least one target grid region, wherein a similarity between a geometric structure of each target grid region and a geometric structure of a grid region other than the at least one target grid region in the plurality of grid regions is higher than a similarity threshold, wherein the similarity threshold may be preset, and is not limited specifically here.
Step S204, generating an object file based on the connection information among the grid areas and at least one object grid area, wherein the object file is used for restoring the game object in the game scene.
In the technical solution provided by the above step S204 of the present disclosure, after at least one target grid region is determined, an object file may be generated based on connection information between multiple grid regions and the at least one target grid region, where the connection information between the multiple grid regions is used to indicate a connection relationship between the multiple grids, the connection information may be referred to as Pconnection, and the object file is used to restore a game object in a game scene.
Optionally, the connection information between the multiple mesh areas and at least one target mesh area may be encoded to obtain a target file, where the target file may be a text file, a compressed mesh file, or a game bag body.
In at least some embodiments of the present disclosure, a triangular mesh of a game object in a game scene is obtained, where the triangular mesh is composed of a plurality of triangles and is used for representing a three-dimensional model of the game object; dividing the triangular mesh into a plurality of mesh areas, wherein each mesh area is used for representing a local space occupied by a local geometric structure of the three-dimensional model in a game scene; determining at least one target grid area in the plurality of grid areas, wherein the at least one target grid area is used for restoring the grid areas except the at least one target grid area in the plurality of grid areas; and generating an object file based on the connection information among the grid areas and at least one target grid area, wherein the object file is used for restoring the game object in the game scene. That is to say, in the embodiment of the present disclosure, the target file may be generated according to the connection information between the multiple mesh areas and the at least one target mesh area, so that it is not necessary to generate the target file based on each mesh area, and the generation efficiency of the target file may be greatly improved.
The above method of this embodiment is further illustrated below.
As an alternative implementation, step S203, determining at least one target grid area in the plurality of grid areas includes: and determining at least one target grid area based on the characteristics of a plurality of vertexes in each grid area, wherein the characteristics of the vertexes are used for representing the height information of the vertexes.
In this embodiment, each mesh region includes a plurality of vertices, and based on this, at least one target mesh region may be determined according to features of the plurality of vertices in each mesh region, where in determining the features of the plurality of vertices in each mesh region, the plurality of vertices may be resampled according to a resampling mesh in each mesh region to obtain features of the plurality of vertices, where the features of the vertices may be used to characterize height information corresponding to the vertices on the resampling mesh, where the resampling mesh may be referred to as grid, that is, the features of the vertices may be used to represent height values of the corresponding grid.
As an optional implementation manner, in each grid region, resampling the multiple vertices according to the resampling grid to obtain features of the multiple vertices, including: determining a local coordinate system of each grid region, wherein the local coordinate system is established by taking a vertex with the highest curvature absolute value in the plurality of vertexes as an origin; dividing a resampling grid in a target coordinate plane of a local coordinate system; determining a target sub-grid to which each vertex is mapped in the resampling grid; determining the characteristics of each vertex based on the corresponding height information of each vertex on the target sub-mesh.
In this embodiment, each grid region includes a plurality of vertices, and based on this, a local coordinate system may be established with a vertex with the highest absolute value of curvature among the plurality of vertices included in each grid region as an origin, so that the local coordinate system of each grid region may be determined, and then global coordinates of all vertices included in each grid region may be converted into local coordinates, where the global coordinates are position coordinates of each vertex in a three-dimensional coordinate system in which the three-dimensional space object is located, and the local coordinates are position coordinates of each vertex in the local coordinate system in which the corresponding grid region is located.
For example, a vertex may be optionally selected in each mesh region, a position coordinate of the vertex in the local coordinate system where the corresponding mesh region is located and a position coordinate of the vertex in the global coordinate system are determined, then a coordinate transformation relationship between the local coordinate system and the global coordinate system corresponding to each mesh region is determined based on the position coordinate of the vertex selected in each mesh region in the local coordinate system and the position coordinate of the vertex in the global coordinate system, and then the position coordinate of each vertex in each mesh region in the global coordinate system is transformed into the local coordinate system according to the coordinate transformation relationship, so as to obtain the position coordinate of each vertex in each mesh region in the local coordinate system where each mesh region is located.
Alternatively, after determining the position coordinates of each vertex in each grid region in the local coordinate system, the resampling grid may be divided in a target coordinate plane of the local coordinate system, for example, the target coordinate plane may be an XY plane of the local coordinate system, and the resampling grid may be divided on the XY plane.
Optionally, after obtaining the resampling mesh, a target sub-mesh to which each vertex is mapped in the resampling mesh may be determined, and after determining the target sub-mesh, the feature of each vertex may be determined based on the corresponding height information of each vertex on the target sub-mesh.
For example, taking any vertex in a certain grid area as an example, the vertex may be projected onto a target coordinate plane of a local coordinate system, and a resampling grid where the vertex is located when projected onto the target plane is determined, the resampling grid may be determined as a target sub-grid, after the target sub-grid is determined, a Z coordinate of the vertex in the local coordinate system may be determined as height information corresponding to the vertex on the target sub-grid, and the height information may be determined as a feature of the vertex, according to the method, a feature of each vertex in each grid area may be determined.
As an optional implementation, determining the feature of each vertex based on the corresponding height information of each vertex on the target sub-mesh further includes: determining height information of a vertex in a local coordinate system as a characteristic of the vertex in response to the mapping of the vertex in the plurality of vertices to the target sub-mesh; in response to at least two vertices of the plurality of vertices being mapped to the target sub-mesh, average height information of the at least two vertices in the local coordinate system is obtained, and the average height information is determined as a characteristic of each of the at least two vertices.
In this embodiment, if there is only one vertex number in a resampling mesh mapped to a local coordinate system in a plurality of vertices included in a mesh region, determining the resampling mesh to which the vertex is mapped as a target sub-mesh to which the vertex is mapped, determining a Z coordinate of the vertex in the local coordinate system as a height value corresponding to the vertex on the target sub-mesh, and determining the height value as a feature of the vertex; in addition, if at least two vertex numbers in a resampling mesh mapped to the local coordinate system are included in a mesh region, the resampling mesh to which the at least two vertices are mapped is determined as a target sub-mesh to which the at least two vertices are mapped in the resampling mesh, and an average value of Z coordinates of the at least two vertices in the corresponding local coordinate system is determined as a height value of the at least two vertices on the target sub-mesh, and the height value is determined as a feature of each of the at least two vertices, that is, features of the at least two vertices are the same.
Optionally, after determining the features of the vertices included in each of the plurality of mesh regions, the at least one target mesh region may be determined based on the features of the vertices included in each of the plurality of mesh regions.
As an optional implementation, determining at least one target mesh region based on the features of the vertices in each mesh region includes: generating the characteristics of the plurality of vertexes into an object matrix, wherein the object matrix is used for representing the characteristic lengths of the characteristics of the plurality of vertexes and the size of each grid area; decomposing the target matrix into at least one eigenvector; and generating each feature vector into a target grid area to obtain at least one target grid area, wherein the similarity between the geometric structure of each target grid area and the geometric structures of the grid areas except for the at least one target grid area in the plurality of grid areas is higher than a similarity threshold value.
In this embodiment, after determining the features of the multiple vertices included in each of the multiple mesh regions, the feature values of the multiple vertices included in each of the multiple mesh regions may be spliced in columns to obtain an object matrix, where the object matrix is used to represent the feature lengths of the features of the multiple vertices and the size of each mesh region.
Optionally, if there are n mesh regions, where there are m vertices included in each mesh region, that is, there are m vertex features included in each mesh region, based on which, after the vertex features included in each mesh region are spliced in columns, the size of the obtained target matrix is m × n.
For example, assume that there are 3 mesh regions, where feature values of a plurality of vertices included in a first mesh region are 2, 3, and 1, feature values of a plurality of vertices included in a second mesh region are 2, 1, and 3, and feature values of a plurality of vertices included in a third mesh region are 1, 4, and 3, respectively, and based on this, the feature values of the plurality of vertices of the 3 mesh regions are spliced in columns, and an objective matrix obtained can be represented by the following formula, where the size of the objective matrix is 3 × 3.
Figure BDA0003970911900000091
Optionally, after obtaining the target matrix, the target matrix may be decomposed into at least one eigenvector, and each eigenvector is used to generate a target grid region, so as to obtain at least one target grid region, where a similarity between a geometric structure of each target grid region and a geometric structure of a grid region other than the at least one target grid region in the plurality of grid regions is higher than a similarity threshold.
For example, the target matrix may be subjected to feature decomposition to obtain at least one feature vector, where the target matrix may be decomposed by using a feature decomposition method of Singular Value Decomposition (SVD), or the target matrix may be decomposed by using a feature decomposition method of K-SVD, and certainly, the target matrix may also be decomposed by using other feature decomposition methods, which is not limited herein.
As an alternative implementation, step S202, dividing the triangular mesh into a plurality of mesh areas, includes: acquiring a vertex set of the triangular mesh, wherein the vertex set is used for generating the triangular mesh; and dividing the triangular mesh based on the vertex set to obtain a plurality of mesh areas.
In this embodiment, since the triangular mesh is composed of a series of vertices and edges, based on this, vertices constituting a plurality of triangular meshes may be acquired, and the acquired vertices may be configured into a vertex set, and then, the triangular mesh may be divided based on the vertex set, several of which result in a plurality of mesh regions.
As an optional implementation manner, the dividing the triangular mesh based on the vertex set to obtain a plurality of mesh regions includes: a first determining step of determining, in a sub-vertex set of the vertex set, a vertex having a maximum curvature absolute value as a first vertex of a first mesh region to be generated, wherein the vertex in the sub-vertex set does not belong to a generated second mesh region; a second determining step of determining at least one vertex adjacent to the first vertex as at least one second vertex of the first mesh region to be generated in the sub-vertex set; and a generating step, namely forming a first grid area by the first vertex and at least one second vertex, determining the first grid area as the second grid area, and returning to the first determining step until the number of the vertices in the sub-vertex set is less than a first number threshold, wherein the first number threshold is the minimum number of the vertices used for forming the grid area.
In this embodiment, the vertex in the vertex set that is not divided may be determined first, and then a set composed of the vertices in the vertex set that is not divided is referred to as a sub-vertex set, based on which, a gaussian curvature value of each vertex in the sub-vertex set may be calculated, and then the gaussian curvature values of each vertex are sorted in a descending order, and the vertex with the largest gaussian curvature value is used as an initial vertex of the first mesh region to be generated, which may also be referred to as a seed point, and is used as a first vertex in the first mesh region to be generated; then, a vertex adjacent to the first vertex may be determined as at least one second vertex of the first mesh area to be generated, where the second vertex may be a vertex that is closest to the first vertex in terms of physical distance and is not in any generated mesh area, if there are a plurality of vertices that comply with the rule, each of the plurality of vertices may be divided into the first mesh area as the second vertex, and if there is only one vertex that comply with the rule, only the one vertex may be divided into the first mesh area as the second vertex, and then after the second vertex is determined, the first vertex and the at least one second vertex may be generated to generate the first mesh area, and the first mesh area may be determined as the generated mesh area. Then, according to the above method, a first vertex is determined from the non-divided vertices in the vertex set, and at least one second vertex adjacent to the first vertex is determined to form a second mesh region until the number of vertices included in the sub-vertex set is smaller than the first number threshold.
As an alternative embodiment, the distance between the second vertex and the first vertex is smaller than a distance threshold, and/or the angle between the normal of the second vertex and the normal of the first vertex is smaller than an angle threshold, and/or the number of vertices between the first vertex and at least one second vertex is smaller than a second number threshold.
In this embodiment, when determining the second vertex of the first mesh region to be generated, a vertex in the set of sub-vertices whose distance from the first vertex is smaller than the distance threshold may be determined as the second vertex, and/or a vertex in the set of sub-vertices whose included angle between the normal of the vertex and the normal of the first vertex is smaller than the angle threshold may be determined as the second vertex, based on which, when the second vertex meeting the rule cannot be found in the set of sub-vertices, or the number of vertices included in the first mesh region to be generated already exceeds the second number threshold, it indicates that the division of the first mesh region to be generated is completed.
As an optional implementation manner, in step S204, generating a target file based on the connection information between the multiple mesh areas and the at least one target mesh area, includes: and coding the connection information and at least one target grid area to obtain a target file.
In this embodiment, after obtaining at least one target grid region, the connection information between the target grid region and the plurality of grid regions may be encoded to obtain a target file, and since the similarity between the geometric structure of each target grid region and the geometric structure of the grid region other than the at least one target grid region in the plurality of grid regions is higher than the similarity threshold, the game object in the game scene may be restored based on the target file.
The technical solutions of the embodiments of the present disclosure are further described below with reference to preferred embodiments.
In the related art, various game objects exist in a game scene, a model of each game object can be represented by a triangular mesh, and the triangular mesh has self-similarity and global similarity in terms of spatial characteristics, wherein the self-similarity is mainly embodied between the triangular meshes, for example, the distribution of the triangular meshes on a boundary or a flat area has certain regularity, the global similarity is mainly embodied that a great similarity exists between a model a and a model B in the game scene, a part of the area of the model a can be directly restored through some areas of the model B, and the two types of similarity imply data redundancy introduced when the triangular meshes are expressed. At present, when triangular meshes of game objects in a game scene are coded, connectivity of the triangular meshes is mainly extracted, and then the connectivity is coded based on a predetermined sequence, but the coding mode does not consider the spatial structure characteristics of the triangular meshes, so that efficient compression of the triangular meshes cannot be realized, and data redundancy during compression of the triangular meshes cannot be reduced.
However, the embodiment of the present disclosure provides a method for processing game information, in which a triangular mesh of a game object in a game scene is obtained, the obtained triangular mesh is divided into a plurality of mesh areas, and at least one target mesh area is determined in the plurality of mesh areas, and a geometric structure of the target mesh area has a higher similarity to mesh areas other than the target mesh area in the plurality of mesh areas, and then a target file can be generated based on connection information between the plurality of mesh areas and the at least one target mesh area.
The following further describes a game information processing method according to an embodiment of the present disclosure.
Fig. 3 is a flowchart of a method for processing game information according to an embodiment of the present disclosure, as shown in fig. 3, the method includes the following steps:
step S301, dividing vertices of the plurality of triangular meshes to obtain a plurality of mesh regions.
In this embodiment, the gaussian curvature values of the vertices of the triangular meshes forming the models of all game objects in the game scene may be determined, and then the gaussian curvature values of all the vertices are sorted in a descending order, and the vertex with the largest gaussian curvature value is used as an initial vertex in the mesh region to be generated, which may also be referred to as a seed point, and then, a vertex closest to the initial vertex in a physical distance may be determined with the initial vertex as a center, and the determined vertex is added to the mesh region to be generated. In the process of determining the second vertex, if the vertex and the initial vertex exceed the distance threshold in the physical distance, the vertex is not determined as the second vertex, or other mesh areas are added to the remaining vertices, or an included angle between the normal of the remaining vertices and the normal of the initial vertex is greater than 90 degrees, or the number of vertices in the mesh area to be generated reaches a set upper limit value, the determination of the second vertex is stopped, the mesh area to be generated is considered to be divided completely, and each vertex included in the mesh area is recorded. Then, the vertex with the maximum gaussian curvature value is continuously selected from the vertexes which are not divided into any grid area, a second vertex is determined by taking the vertex as the center to form the grid area, and according to the method, all vertexes forming the triangular grid are divided into the grid area, so that a plurality of grid areas can be obtained.
Step S302, resampling vertexes in the plurality of grid areas to obtain the characteristics of the grid areas.
In this embodiment, a local coordinate system may be established with the seed point in each grid region as an origin, and then the position coordinates of each vertex in the entire coordinate system are converted into each local coordinate system based on the coordinate conversion relationship between the global coordinate system and each local coordinate system. Then, a resampling grid can be divided on an XY plane of each local coordinate system, each vertex in a plurality of grid areas is projected onto the XY plane of the corresponding local coordinate system, the resampling grid to which each vertex is projected is determined, and a Z coordinate of the vertex is determined as a feature of the vertex, wherein if a plurality of vertices are projected onto the same resampling grid, an average value is solved for the Z coordinate of each vertex in the plurality of vertices, and the average value is used as a feature of each vertex in the plurality of vertices.
Step S303, feature encoding is performed on the features of the mesh region.
In this embodiment, the features of each grid region may be spliced in columns, that is, the feature values of each vertex included in each grid region are spliced in columns to obtain a target matrix, where the size of the target matrix is: number of vertices in each mesh region x number of mesh regions. After the target matrix is obtained, the target matrix can be decomposed into the form of eigenvectors by means of eigen decomposition, so as to obtain a plurality of eigenvectors, each eigenvector can form a new grid region, and the grid region set formed by these eigenvectors can become the eigen grid region.
And step S304, compressing the connection information between the characteristic grid area and the grids to obtain the target file.
In this embodiment, the feature mesh region information generated in the above step and the connection information between the plurality of mesh regions may be used to obtain a compressed target file, and the original triangular mesh may be restored based on the compressed target file.
In the embodiment, the vertices of the triangular meshes are divided to obtain a plurality of mesh areas, the vertices in the mesh areas are resampled to obtain the features of the mesh areas, then the features of the mesh areas are feature-coded, and the connection information between the feature mesh areas and the mesh areas obtained after the feature coding is compressed to obtain a compressed file.
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 disclosure 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 disclosure.
In this embodiment, a game information processing device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of the device is omitted. As used hereinafter, the terms "unit", "module" and "modules" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a schematic diagram of a game information processing apparatus according to an embodiment of the present disclosure, and as shown in fig. 4, the game information processing apparatus 400 includes: an acquisition unit 401, a division unit 402, a determination unit 403, and a generation unit 404.
An obtaining unit 401, configured to obtain a triangular mesh of a game object in a game scene, where the triangular mesh is formed by a plurality of triangles and is used to represent a three-dimensional model of the game object;
a dividing unit 402, configured to divide the triangular mesh into a plurality of mesh regions, where each mesh region is used to represent a local space occupied by a local geometric structure of the three-dimensional model in the game scene;
a determining unit 403, configured to determine at least one target grid region in the multiple grid regions, where the at least one target grid region is used to restore grid regions other than the at least one target grid region in the multiple grid regions;
a generating unit 404, configured to generate an object file based on the connection information between the plurality of grid areas and the at least one target grid area, where the object file is used to reproduce the game object in the game scene.
Optionally, the determining unit 403 includes: the first determining module is used for determining at least one target grid area based on the characteristics of a plurality of vertexes in each grid area, wherein the characteristics of the vertexes are used for representing the height information of the vertexes.
Optionally, the first determining module further includes: a first generation submodule, configured to generate features of the plurality of vertices into an objective matrix, where the objective matrix is used to represent feature lengths of the features of the plurality of vertices and a size of each mesh region; a decomposition submodule for decomposing the target matrix into at least one eigenvector; and the second generation submodule is used for generating each feature vector into a target grid area to obtain at least one target grid area, wherein the similarity between the geometric structure of each target grid area and the geometric structure of the grid area except for the at least one target grid area in the plurality of grid areas is higher than a similarity threshold value.
Optionally, the apparatus 400 further includes a resampling unit, configured to resample, in each grid region, the multiple vertices according to the resampling grid, to obtain features of the multiple vertices, where the features of the vertices are used to represent height information corresponding to the vertices on the resampling grid.
Optionally, the resampling unit comprises: a second determining module, configured to determine a local coordinate system of each of the mesh regions, where the local coordinate system is established with a vertex with a highest absolute value of curvature among the plurality of vertices as an origin; the first division module is used for dividing a resampling grid in a target coordinate plane of a local coordinate system; a third determining module for determining a target sub-grid to which each vertex is mapped in the resampled grid; and the fourth determining module is used for determining the characteristics of each vertex based on the corresponding height information of each vertex on the target sub-mesh.
Optionally, the fourth determining module is further configured to determine, when a vertex in the plurality of vertices is mapped onto the target sub-mesh, height information of the vertex in the local coordinate system as a feature of the vertex; and the fourth determining module is further used for acquiring the average height information of the at least two vertexes in the local coordinate system in response to the mapping of the at least two vertexes of the plurality of vertexes to the target sub-mesh, and determining the average height information as the characteristic of each vertex of the at least two vertexes.
Optionally, the dividing unit 402 includes: the acquisition module is used for acquiring a vertex set of the triangular mesh, wherein the vertex set is used for generating the triangular mesh; and the second division module is used for dividing the triangular meshes based on the vertex set to obtain a plurality of mesh areas.
Optionally, the second dividing module is further configured to perform the following steps: a first determining step of determining, in a sub-vertex set of the vertex set, a vertex having a maximum curvature absolute value as a first vertex of a first mesh region to be generated, wherein the vertex in the sub-vertex set does not belong to a generated second mesh region; a second determining step of determining at least one vertex adjacent to the first vertex as at least one second vertex of the first mesh region to be generated in the sub-vertex set; and a generating step, namely forming a first grid area by the first vertex and at least one second vertex, determining the first grid area as a second grid area, and returning to the first determining step until the number of the vertexes in the sub-vertex set is less than a first number threshold.
Optionally, the distance between the second vertex and the first vertex is smaller than a distance threshold, and/or the angle between the normal of the second vertex and the normal of the first vertex is smaller than an angle threshold, and/or the number of vertices of the first vertex and the at least one second vertex is smaller than a second number threshold.
Optionally, the generating unit 404 includes: and the coding module is used for coding the connection information and the at least one target grid area to obtain a target file.
In the game information processing apparatus of the embodiment, the acquisition unit is configured to acquire a triangular mesh of a game object in a game scene; the dividing unit is used for dividing the triangular mesh into a plurality of mesh areas, wherein each mesh area is used for representing a local space occupied by a local geometric structure of the three-dimensional model in a game scene; the device comprises a determining unit, a calculating unit and a judging unit, wherein the determining unit is used for determining at least one target grid area in the grid areas, and the at least one target grid area is used for restoring the grid areas except the at least one target grid area in the grid areas; and the generating unit is used for generating an object file based on the connection information among the grid areas and at least one object grid area, wherein the object file is used for restoring the game object in the game scene. That is to say, in the embodiment of the present disclosure, the target file may be generated based on the connection information between the multiple mesh areas and the at least one target mesh area, so that the compression efficiency of the triangular mesh may be greatly improved, and because the generated target file only includes the compressed connection information and the target mesh area, so that the storage space occupied by the compressed target file may be greatly reduced, the purpose of reducing the storage space is achieved, the technical effect of improving the compression efficiency is achieved, and the technical problem of low compression efficiency of the triangular mesh is solved.
It should be noted that, the above units and modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the units and the modules are all positioned in the same processor; alternatively, the units and modules may be located in different processors in any combination.
Embodiments of the present disclosure also provide a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
Optionally, in this embodiment, the nonvolatile storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, in this embodiment, the nonvolatile storage medium may be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group.
Alternatively, in the present embodiment, the above-mentioned nonvolatile storage medium may be configured to store a computer program for executing the steps of:
s1, obtaining a triangular mesh of a game object in a game scene, wherein the triangular mesh is composed of a plurality of triangles and is used for representing a three-dimensional model of the game object;
s2, dividing the triangular mesh into a plurality of mesh areas, wherein each mesh area is used for representing a local space occupied by a local geometric structure of the three-dimensional model in a game scene;
s3, determining at least one target grid area in the plurality of grid areas, wherein the at least one target grid area is used for restoring the grid areas except the at least one target grid area in the plurality of grid areas;
and S4, generating an object file based on the connection information among the grid areas and at least one object grid area, wherein the object file is used for restoring the game object in the game scene.
Optionally, the non-volatile storage medium may be further configured to store a computer program for performing the following steps: and determining at least one target grid area based on the characteristics of a plurality of vertexes in each grid area, wherein the characteristics of the vertexes are used for representing the height information of the vertexes.
Optionally, the above-mentioned non-volatile storage medium may be further configured to store a computer program for executing the steps of: generating the characteristics of the plurality of vertexes into an object matrix, wherein the object matrix is used for representing the characteristic lengths of the characteristics of the plurality of vertexes and the size of each grid area; decomposing the target matrix into at least one eigenvector; and generating each feature vector into a target grid area to obtain at least one target grid area, wherein the similarity between the geometric structure of each target grid area and the geometric structures of the grid areas except for the at least one target grid area in the plurality of grid areas is higher than a similarity threshold value.
Optionally, the non-volatile storage medium may be further configured to store a computer program for performing the following steps: and in each grid area, resampling the multiple vertexes according to the resampling grid to obtain the characteristics of the multiple vertexes, wherein the characteristics of the vertexes are used for expressing the height information of the vertexes corresponding to the resampling grid.
Optionally, the non-volatile storage medium may be further configured to store a computer program for performing the following steps: determining a local coordinate system of each grid region, wherein the local coordinate system is established by taking a vertex with the highest curvature absolute value in the plurality of vertexes as an origin; dividing a resampling grid in a target coordinate plane of a local coordinate system; determining a target sub-grid to which each vertex is mapped in the resampling grid; determining the characteristics of each vertex based on the corresponding height information of each vertex on the target sub-mesh.
Optionally, the non-volatile storage medium may be further configured to store a computer program for performing the following steps: when one vertex in the plurality of vertexes is mapped to the target sub-mesh, determining the height information of the vertex in the local coordinate system as the characteristic of the vertex; in response to at least two vertices of the plurality of vertices being mapped to the target sub-mesh, average height information of the at least two vertices in the local coordinate system is obtained, and the average height information is determined as a characteristic of each of the at least two vertices.
Optionally, the computer-readable storage medium may be further configured to store a computer program for executing the steps of: acquiring a vertex set of the triangular mesh, wherein the vertex set is used for generating the triangular mesh; and dividing the triangular mesh based on the vertex set to obtain a plurality of mesh areas.
Optionally, the non-volatile storage medium may be further configured to store a computer program for performing the following steps: a first determining step of determining, in a sub-vertex set of the vertex set, a vertex having a maximum curvature absolute value as a first vertex of a first mesh region to be generated, wherein the vertex in the sub-vertex set does not belong to a generated second mesh region; a second determining step, in the sub-vertex set, determining at least one vertex adjacent to the first vertex as at least one second vertex of the first mesh area to be generated; and a generating step, namely forming a first grid area by the first vertex and at least one second vertex, determining the first grid area as a second grid area, and returning to the first determining step until the number of the vertices in the sub-vertex set is less than a first number threshold.
Optionally, the non-volatile storage medium may be further configured to store a computer program for performing the following steps: and coding the connection information and at least one target grid area to obtain a target file.
In the nonvolatile storage medium of this embodiment, a technical solution of a processing method of game information is provided. The target file can be generated according to the connection information between the grid areas and the at least one target grid area, the target file does not need to be generated based on each grid area, the generation efficiency of the target file can be greatly improved, and the target file only comprises the compressed target grid area and the connection information between the grid areas, so that the purpose of reducing the storage space of the target file is achieved, the technical effect of improving the compression efficiency of the triangular grid is achieved, and the technical problem of low compression efficiency of the triangular grid is solved.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, and may also be implemented by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a computer-readable storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present application, a computer-readable storage medium has stored thereon a program product capable of implementing the above-described method of the present embodiment. In some possible implementations, various aspects of the embodiments of the present disclosure may also be implemented in the form of a program product including program code for causing a terminal device to perform the steps according to various exemplary implementations of the present disclosure described in the above section "exemplary method" of this embodiment, when the program product is run on the terminal device.
The program product for implementing the above method according to the embodiments of the present disclosure may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product of the disclosed embodiments is not limited in this respect, and in the disclosed embodiments, the computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product described above may employ any combination of one or more computer-readable media. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that the program code embodied on the computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Embodiments of the present disclosure also provide an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, obtaining a triangular mesh of a game object in a game scene, wherein the triangular mesh is composed of a plurality of triangles and is used for representing a three-dimensional model of the game object;
s2, dividing the triangular mesh into a plurality of mesh areas, wherein each mesh area is used for representing a local space occupied by a local geometric structure of the three-dimensional model in a game scene;
s3, determining at least one target grid area in the plurality of grid areas, wherein the at least one target grid area is used for restoring the grid areas except the at least one target grid area in the plurality of grid areas;
and S4, generating a target file based on the connection information among the grid areas and at least one target grid area, wherein the target file is used for restoring the game object in the game scene.
Optionally, the processor may be further configured to store a computer program for performing the steps of: and determining at least one target grid area based on the characteristics of a plurality of vertexes in each grid area, wherein the characteristics of the vertexes are used for representing the height information of the vertexes.
Optionally, the processor may be further configured to store a computer program for performing the following steps: generating the characteristics of the plurality of vertexes into an object matrix, wherein the object matrix is used for representing the characteristic lengths of the characteristics of the plurality of vertexes and the size of each grid area; decomposing the target matrix into at least one eigenvector; and generating each feature vector into a target grid area to obtain at least one target grid area, wherein the similarity between the geometric structure of each target grid area and the geometric structures of the grid areas except for the at least one target grid area in the plurality of grid areas is higher than a similarity threshold value.
Optionally, the processor may be further configured to store a computer program for performing the following steps: and in each grid area, resampling the multiple vertexes according to the resampling grid to obtain the characteristics of the multiple vertexes, wherein the characteristics of the vertexes are used for expressing the height information of the vertexes corresponding to the resampling grid.
Optionally, the processor may be further configured to store a computer program for performing the following steps: determining a local coordinate system of each grid region, wherein the local coordinate system is established by taking a vertex with the highest curvature absolute value in a plurality of vertexes as an origin; dividing a resampling grid in a target coordinate plane of a local coordinate system; determining a target sub-grid to which each vertex is mapped in the resampling grid; determining the characteristics of each vertex based on the corresponding height information of each vertex on the target sub-mesh.
Optionally, the processor may be further configured to store a computer program for performing the following steps: when one vertex in the plurality of vertexes is mapped to the target sub-mesh, determining the height information of the vertex in the local coordinate system as the characteristic of the vertex; in response to at least two vertices of the plurality of vertices being mapped to the target sub-mesh, average height information of the at least two vertices in the local coordinate system is obtained, and the average height information is determined as a characteristic of each of the at least two vertices.
Optionally, the processor may be further configured to store a computer program for performing the following steps: acquiring a vertex set of the triangular mesh, wherein the vertex set is used for generating the triangular mesh; and dividing the triangular mesh based on the vertex set to obtain a plurality of mesh areas.
Optionally, the processor may be further configured to store a computer program for performing the following steps: a first determining step of determining, in a sub-vertex set of the vertex set, a vertex having a maximum curvature absolute value as a first vertex of a first mesh region to be generated, wherein the vertex in the sub-vertex set does not belong to a generated second mesh region; a second determining step of determining at least one vertex adjacent to the first vertex as at least one second vertex of the first mesh region to be generated in the sub-vertex set; and a generating step, namely forming a first grid area by the first vertex and at least one second vertex, determining the first grid area as a second grid area, and returning to the first determining step until the number of the vertices in the sub-vertex set is less than a first number threshold.
Optionally, the processor may be further configured to store a computer program for performing the steps of: and coding the connection information and at least one target grid area to obtain a target file.
In the electronic device of the embodiment, a technical solution of a method for processing game information is provided. The target file can be generated according to the connection information between the grid areas and at least one target grid area, so that the target file does not need to be generated based on each grid area, the generation efficiency of the target file can be greatly improved, and the target file only comprises the compressed target grid area and the connection information between the grid areas, so that the purpose of reducing the storage space of the target file is achieved, the technical effect of improving the compression efficiency of the triangular grid is achieved, and the technical problem of low compression efficiency of the triangular grid is solved.
Fig. 5 is a schematic diagram of an electronic device according to an embodiment of the disclosure. As shown in fig. 5, the electronic device 500 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic apparatus 500 is in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: the at least one processor 510, the at least one memory 520, a bus 530 connecting the various system components (including the memory 520 and the processor 510), and a display 540.
Wherein the above-mentioned memory 520 stores program code, which can be executed by the processor 510, to cause the processor 510 to perform the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned method section of the embodiments of the present application.
The memory 520 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM) 5201 and/or a cache memory unit 5202, and may further include a read-only memory unit (ROM) 5203, 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, memory 520 may also include program/utility 5204 having a set (at least one) of program modules 5205 such program modules 5205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment. The memory 520 may further include memory remotely located from the processor 510, which may be connected to the electronic device 500 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.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, and processor 510 or a local bus using any of a variety of bus architectures.
The display 540 may, for example, be a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the electronic device 500.
Optionally, the electronic apparatus 500 may also communicate with one or more external devices 600 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic apparatus 500, and/or with any devices (e.g., router, modem, etc.) that enable the electronic apparatus 500 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 550. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 560. As shown in FIG. 5, the network adapter 560 communicates with the other modules of the electronic device 500 via the bus 530. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with the electronic device 500, which may include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The electronic device 500 may further include: a keyboard, a cursor control device (e.g., a mouse), an input/output interface (I/O interface), a network interface, a power source, and/or a camera.
It will be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration and is not intended to limit the structure of the electronic device. For example, electronic device 500 may also include more or fewer components than shown in FIG. 5, or have a different configuration than shown in FIG. 1. The memory 520 may be used to store a computer program and corresponding data, such as a computer program and corresponding data corresponding to the game information processing method in the embodiment of the disclosure. The processor 510 executes various functional applications and data processing, i.e., implements the above-described game information processing method, by running the computer program stored in the memory 520.
The above-mentioned serial numbers of the embodiments of the present disclosure are merely for description, and do not represent the advantages or disadvantages of the embodiments.
In the above embodiments of the present disclosure, 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 technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be an indirect coupling or communication connection through some interfaces, units or modules, and may be electrical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units 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 disclosure 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 may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: 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 foregoing is illustrative of the preferred embodiments of the present disclosure, and it will be appreciated by those skilled in the art that various modifications and adaptations can be made without departing from the principles of the disclosure, and such modifications and adaptations are intended to be within the scope of the disclosure.

Claims (13)

1. A method for processing game information, comprising:
acquiring a triangular mesh of a game object in a game scene, wherein the triangular mesh is composed of a plurality of triangles and is used for representing a three-dimensional model of the game object;
dividing the triangular mesh into a plurality of mesh areas, wherein each mesh area is used for representing a local space occupied by a local geometric structure of the three-dimensional model in the game scene;
determining at least one target grid area in the grid areas, wherein the at least one target grid area is used for restoring grid areas except for the at least one target grid area in the grid areas;
and generating an object file based on the connection information among the grid areas and the at least one target grid area, wherein the object file is used for restoring the game object in the game scene.
2. The method of claim 1, wherein determining at least one target grid area among the plurality of grid areas comprises:
and determining the at least one target grid area based on the characteristics of a plurality of vertexes in each grid area, wherein the characteristics of the vertexes are used for representing the height information of the vertexes.
3. The method of claim 2, wherein determining the at least one target mesh region based on the characteristics of the plurality of vertices in each of the mesh regions comprises:
generating the features of the plurality of vertexes into an objective matrix, wherein the objective matrix is used for representing the feature lengths of the features of the plurality of vertexes and the size of each grid area;
decomposing the target matrix into at least one feature vector;
and generating each feature vector into one target grid area to obtain the at least one target grid area, wherein the similarity between the geometric structure of each target grid area and the geometric structures of the grid areas except the at least one target grid area in the plurality of grid areas is higher than a similarity threshold value.
4. The method of claim 2, further comprising:
in each grid region, resampling the multiple vertexes according to a resampling grid to obtain the features of the multiple vertexes, wherein the features of the vertexes are used for representing the height information of the vertexes corresponding to the resampling grid.
5. The method of claim 4, wherein resampling the plurality of vertices in the resampling grid to obtain the features of the plurality of vertices in each of the grid regions comprises:
determining a local coordinate system of each grid region, wherein the local coordinate system is established by taking a vertex with the highest curvature absolute value in the plurality of vertexes as an origin;
dividing the resampling grid in a target coordinate plane of the local coordinate system;
determining a target sub-grid to which each of the vertices is mapped in the resampling grid;
determining the characteristics of each vertex based on the height information corresponding to each vertex on the target sub-mesh.
6. The method of claim 5, wherein determining the feature of each vertex based on the height information corresponding to each vertex on the target sub-mesh comprises:
determining the height information of a vertex in the local coordinate system as a characteristic of the vertex in response to mapping the vertex to the target sub-mesh;
in response to mapping at least two of the vertices of the plurality of vertices to the target sub-mesh, obtaining average height information of the at least two of the vertices in the local coordinate system, and determining the average height information as a characteristic of each of the at least two of the vertices.
7. The method of claim 1, wherein dividing the triangular mesh into a plurality of mesh regions comprises:
acquiring a vertex set of the triangular mesh, wherein the vertex set is used for generating the triangular mesh;
and dividing the triangular mesh based on the vertex set to obtain the plurality of mesh areas.
8. The method of claim 7, wherein partitioning the triangular mesh based on the set of vertices to obtain the plurality of mesh regions comprises:
a first determination step of determining, in a sub-vertex set of the vertex set, a vertex having a maximum curvature absolute value as a first vertex of a first mesh region to be generated, wherein the vertex in the sub-vertex set does not belong to a generated second mesh region;
a second determining step of determining, in the sub-vertex set, at least one vertex adjacent to the first vertex as at least one second vertex of the first mesh region to be generated;
and a generating step, namely forming the first grid area by the first vertex and the at least one second vertex, determining the first grid area as the second grid area, and returning to the first determining step until the number of the vertexes in the sub-vertex set is less than a first number threshold.
9. The method according to claim 8, wherein the distance between the second vertex and the first vertex is smaller than a distance threshold, and/or the angle between the normal of the second vertex and the normal of the first vertex is smaller than an angle threshold, and/or the number of vertices of the first vertex and the at least one second vertex is smaller than a second number threshold.
10. The method according to any one of claims 1 to 9, wherein generating the target file based on the connection information between the plurality of grid areas and the at least one target grid area comprises:
and coding the connection information and the at least one target grid area to obtain the target file.
11. An apparatus for processing game information, comprising:
the game system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a triangular mesh of a game object in a game scene, the triangular mesh is composed of a plurality of triangles and is used for representing a three-dimensional model of the game object;
a dividing unit, configured to divide the triangular mesh into a plurality of mesh regions, where each mesh region is used to represent a local space occupied by a local geometric structure of the three-dimensional model in the game scene;
a determining unit, configured to determine at least one target grid area in the multiple grid areas, where the at least one target grid area is used to restore grid areas other than the at least one target grid area in the multiple grid areas;
a generating unit, configured to generate an object file based on connection information between the multiple mesh areas and the at least one target mesh area, where the object file is used to restore the game object in the game scene.
12. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to, when executed by a processor, perform the method of any one of claims 1 to 10.
13. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 10.
CN202211511154.8A 2022-11-29 2022-11-29 Game information processing method, device and storage medium Pending CN115888085A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211511154.8A CN115888085A (en) 2022-11-29 2022-11-29 Game information processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211511154.8A CN115888085A (en) 2022-11-29 2022-11-29 Game information processing method, device and storage medium

Publications (1)

Publication Number Publication Date
CN115888085A true CN115888085A (en) 2023-04-04

Family

ID=86496741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211511154.8A Pending CN115888085A (en) 2022-11-29 2022-11-29 Game information processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN115888085A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116597063A (en) * 2023-07-19 2023-08-15 腾讯科技(深圳)有限公司 Picture rendering method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116597063A (en) * 2023-07-19 2023-08-15 腾讯科技(深圳)有限公司 Picture rendering method, device, equipment and medium
CN116597063B (en) * 2023-07-19 2023-12-05 腾讯科技(深圳)有限公司 Picture rendering method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US20220020211A1 (en) Efficient compression of data representing triangular mesh attributes
KR20090080421A (en) Method and system for compressing and decoding mesh data of 3-dimensional mesh model
CN104035562B (en) Method and system for mapping three-dimensional desktop touch events
AU2017272304B2 (en) Auto vr: an assistant system for virtual reality painting
CN114177613B (en) Navigation grid updating method, device, equipment and computer readable storage medium
US20180276870A1 (en) System and method for mass-animating characters in animated sequences
CN115888085A (en) Game information processing method, device and storage medium
CN113952720A (en) Game scene rendering method and device, electronic equipment and storage medium
US9177418B1 (en) System and method for converting computer aided design data into a three dimensional model
CN115861498A (en) Redirection method and device for motion capture
CN113240789B (en) Virtual object construction method and device
CN112915540B (en) Data processing method, device and equipment for virtual scene and storage medium
CN115115814A (en) Information processing method, information processing apparatus, readable storage medium, and electronic apparatus
CN114816457A (en) Method, device, storage medium and electronic device for cloning virtual model
CN109636888A (en) 2D special effect making method and device, electronic equipment, storage medium
CN114283230A (en) Vegetation model rendering method and device, readable storage medium and electronic device
CN114299203A (en) Processing method and device of virtual model
CN108305329B (en) Model building method and terminal
CN114842122B (en) Model rendering method, device, equipment and storage medium
CN113706675B (en) Mirror image processing method, mirror image processing device, storage medium and electronic device
CN116228941A (en) Animation generation method and device for model, storage medium and electronic device
CN114445531A (en) Method and device for realizing thundercloud effect, storage medium and electronic device
CN115761106A (en) Information processing method, information processing apparatus, storage medium, and electronic apparatus
CN117173318A (en) Applique texture processing method and device, storage medium and electronic device
CN116245983A (en) Method and device for generating model assembly animation, storage medium and electronic 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