Game information processing method and device, and storage medium
By dividing the triangular mesh into multiple mesh regions and generating target files, the problem of low compression efficiency of triangular meshes is solved, achieving more efficient storage and generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2022-11-29
- Publication Date
- 2026-06-09
Smart Images

Figure CN115888085B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information processing technology, and more specifically, to a method, apparatus, and storage medium for processing game information. Background Technology
[0002] Existing online games are filled with a wide variety of game objects, such as characters, buildings, props, and scenes. To recreate game scenes with high quality, a large amount of texture and triangle mesh data is required. Textures are mainly used to describe the local details of the game, while triangle meshes are mainly used to describe the local spatial characteristics of game objects in the game scene. As the quality of games continues to improve, the requirements for the precision of textures and triangle meshes are also constantly increasing. However, the increase in triangle mesh precision leads to the expansion of the game package size. For games, maintaining a compact game package size is very important. Therefore, how to reduce the game package size while ensuring the precision of triangle meshes is particularly important.
[0003] Currently, the mainstream triangular mesh encoding scheme mainly extracts the connectivity between triangular meshes and then encodes the connectivity between triangular meshes based on a predefined order. However, this encoding method does not take into account the spatial structural characteristics of the triangular mesh itself and cannot achieve efficient compression of the triangular mesh.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This disclosure provides at least some embodiments of a method, apparatus, and storage medium for processing game information, to at least solve the technical problem of low compression efficiency of triangular meshes.
[0006] According to one embodiment of this disclosure, a method for processing game information is provided. The method may include: acquiring a triangular mesh of game objects in a game scene, wherein the triangular mesh is composed of multiple triangles and is used to represent a three-dimensional model of the game objects; dividing the triangular mesh into multiple mesh regions, wherein each mesh region is used to represent the local space occupied by the local geometry of the three-dimensional model in the game scene; determining at least one target mesh region among the multiple mesh regions, wherein the at least one target mesh region is used to reconstruct the mesh regions other than the at least one target mesh region among the multiple mesh regions; and generating a target file based on the connection information between the multiple mesh regions and the at least one target mesh region, wherein the target file is used to reconstruct the game objects in the game scene.
[0007] According to one embodiment of this disclosure, a game information processing apparatus is also provided. The apparatus may include: an acquisition unit for acquiring a triangular mesh of a game object in a game scene, wherein the triangular mesh is composed of multiple triangles and represents a three-dimensional model of the game object; a partitioning unit for dividing the triangular mesh into multiple mesh regions, wherein each mesh region represents a local space occupied by the local geometry of the three-dimensional model in the game scene; a determination unit for determining at least one target mesh region among the multiple mesh regions, wherein the at least one target mesh region is used to reconstruct the mesh regions other than the at least one target mesh region among the multiple mesh regions; and a generation unit for generating a target file based on the connection information between the multiple mesh regions and the at least one target mesh region, wherein the target file is used to reconstruct the game object in the game scene.
[0008] According to one embodiment of this disclosure, a non-volatile storage medium is also provided, which stores a computer program, wherein the computer program is configured to execute the game information processing method described in any of the above-mentioned embodiments when running.
[0009] According to one embodiment of this disclosure, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the game information processing method described in any of the preceding claims.
[0010] In at least some embodiments of this disclosure, a triangular mesh of a game object in a game scene is obtained, wherein the triangular mesh is composed of multiple triangles and is used to represent a three-dimensional model of the game object; the triangular mesh is divided into multiple mesh regions, wherein each mesh region is used to represent the local space occupied by the local geometry of the three-dimensional model in the game scene; at least one target mesh region is determined among the multiple mesh regions, wherein the at least one target mesh region is used to reconstruct the mesh regions other than the at least one target mesh region among the multiple mesh regions; and a target file is generated based on the connection information between the multiple mesh regions and the at least one target mesh region, wherein the target file is used to reconstruct the game object in the game scene. In other words, in this embodiment of the disclosure, the triangular mesh constituting the game object can be divided into multiple mesh regions, and at least one target mesh region can be determined from the multiple mesh regions based on the similarity between them. The target mesh region can represent the mesh region with the highest similarity among the multiple mesh regions. Based on the at least one target mesh region, the mesh regions other than the at least one target mesh region among the multiple mesh regions can be reconstructed. Based on this, a target file can be generated according to the connection information between the multiple mesh regions and the at least one target mesh region. Based on the target file, the game object can be reconstructed in the game scene. Since the target file only includes the compressed target mesh region and the connection information between the multiple mesh regions, the storage space of the target file is reduced, thereby achieving the technical effect of improving the compression efficiency of the triangular mesh and solving the technical problem of low compression efficiency of the triangular mesh. Attached Figure Description
[0011] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this application, illustrate exemplary embodiments of this disclosure and are used to explain this disclosure, but do not constitute an undue limitation of this disclosure. In the drawings:
[0012] Figure 1 This is a hardware structure block diagram of a mobile terminal for a game information processing method according to an embodiment of this disclosure.
[0013] Figure 2 This is a flowchart of a method for processing game information according to one embodiment of the present disclosure;
[0014] Figure 3 This is a flowchart of another method for processing game information according to one embodiment of the present disclosure;
[0015] Figure 4 This is a schematic diagram of a game information processing apparatus according to one embodiment of the present disclosure;
[0016] Figure 5 This is a structural block diagram of an electronic device according to one optional embodiment of the present disclosure. Detailed Implementation
[0017] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.
[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0019] According to one embodiment of this disclosure, an embodiment of a method for processing game information is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0020] This method embodiment can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smartphone (such as an Android phone, iOS phone, etc.), tablet computer, PDA, mobile Internet Device (MID), PAD, game console, and other terminal devices. Figure 1 This is a hardware structure block diagram of a mobile terminal for a game information processing method according to an embodiment of this disclosure. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a central processing unit (CPU), graphics processing unit (GPU), digital signal processing (DSP) chip, microprocessor (MCU), programmable logic device (FPGA), neural network processor (NPU), tensor processor (TPU), artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data are also shown. Optionally, the mobile terminal may further include a transmission device 106 for communication functions, an input / output device 108, and a display device 110. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0021] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the game information processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the aforementioned game information processing method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0022] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0023] The inputs in input / output device 108 can come from multiple human interface devices (HIDs). Examples include keyboards and mice, gamepads, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, and remote controls). Some HIDs, in addition to providing input functions, can also provide output functions, such as force feedback and vibration from gamepads, and audio output from controllers.
[0024] Display device 110 may be, for example, a head-up display (HUD), a touchscreen liquid crystal display (LCD), and a touch display (also referred to as a "touchscreen" or "touch display"). The LCD allows a user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows the user to interact with the GUI by touching and / or gesturing on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, a call interface, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.
[0025] According to one embodiment of this disclosure, an embodiment of a method for processing game information is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0026] In one possible implementation, this disclosure provides a method for processing game information. Figure 2 This is a flowchart of a game information processing method according to one embodiment of the present disclosure, such as... Figure 2 As shown, the method includes the following steps:
[0027] Step S201: Obtain the triangular mesh of the game object in the game scene, wherein the triangular mesh is composed of multiple triangles and is used to represent the three-dimensional model of the game object.
[0028] In the technical solution provided by step S201 of this disclosure, since the game scene includes various game objects, such as virtual vehicles, virtual game characters, virtual buildings, etc., triangular meshes are usually used to simulate the surfaces of various game objects to form a three-dimensional model of the game objects in the game scene. The triangular mesh can also be called a triangular mesh. Based on this, the triangular mesh of the game objects in the game scene can be obtained.
[0029] Optionally, since a mesh is a data structure that represents the geometric structure of an entity by a series of points and edges, and a triangular mesh is a three-dimensional (3D) model composed of multiple triangles sharing edges or vertices at different angles, the triangular mesh of each game object in the game scene can be obtained by acquiring the edges and vertices of the 3D model that constitutes each game object in the game scene.
[0030] Step S202: Divide the triangular mesh into multiple mesh regions, where each mesh region is used to represent the local space occupied by the local geometry of the 3D model in the game scene.
[0031] In the technical solution provided by step S202 of this disclosure, since the triangular mesh includes multiple vertices, which constitute a vertex set, the vertex set of the triangular mesh can be obtained. Then, the triangular mesh is divided based on the vertex set to obtain multiple mesh regions, which can be called PS_original.
[0032] Optionally, dividing a triangular mesh based on a vertex set to obtain multiple mesh regions may include the following steps: First determination step: In the sub-vertex set of the vertex set, the vertex with the largest absolute value of curvature is determined as the first vertex of the first mesh region to be generated, wherein the vertices in the sub-vertex set do not belong to the already generated second mesh region; Second determination step: In the sub-vertex set, at least one vertex adjacent to the first vertex is determined as at least one second vertex of the first mesh region to be generated; Generation step: The determined first vertex and at least one second vertex constitute the first mesh region, and the first mesh region is determined as the second mesh region, wherein the second mesh region is the already generated mesh region. After that, the first determination step can be returned until the number of vertices in the sub-vertex set is less than a first quantity threshold, wherein the first quantity threshold is the minimum number of vertices used to constitute the mesh region.
[0033] Optionally, when determining at least one second vertex of the first mesh region to be generated, if the distance between the vertices in the sub-vertex set and the first vertex is greater than a distance threshold, and / or the angle between the normal of the vertices in the sub-vertex set and the 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 has exceeded a second quantity threshold, then the determination of the second vertex is stopped, and the first mesh region generated at this time is determined as the generated mesh region. The angle threshold and the second quantity threshold can be preset. For example, the angle threshold is 90 degrees, and the second quantity threshold can be 128 or 130. No specific restrictions are imposed here.
[0034] Step S203: Determine at least one target grid region among multiple grid regions, wherein the at least one target grid region is used to reconstruct the grid regions other than the at least one target grid region among the multiple grid regions.
[0035] In the technical solution provided by step S203 of this disclosure, at least one target grid region can be determined based on the features of multiple vertices in each grid region. The features of the vertices are used to represent the height information of the vertices. Based on the at least one target grid region, the grid regions other than the at least one target grid region in the multiple grid regions can be reconstructed. The target grid region can be called PS_typical.
[0036] Optionally, in each grid region, multiple vertices are resampled according to the resampled grid to obtain the features of multiple vertices, wherein the features of the vertices are used to represent the height information of the vertices on the resampled grid.
[0037] Optionally, during the resampling process, a local coordinate system for each grid region can be determined first, wherein the local coordinate system is established with the vertex having the highest absolute value of curvature among multiple vertices as the origin; the resampling grid is divided in the target coordinate plane of the local coordinate system; the target subgrid to which each vertex is mapped in the resampling grid is determined; and the features of each vertex are determined based on the height information corresponding to each vertex on the target subgrid.
[0038] Optionally, when determining the features of each vertex based on the height information corresponding to each vertex on the target sub-mesh, the height information of the vertex in the local coordinate system can be determined as the feature of the vertex when one vertex among multiple vertices is mapped onto the target sub-mesh; when at least two vertices among multiple vertices are mapped onto the target sub-mesh, the average height information of the height information of the at least two vertices in the local coordinate system is obtained, and the average height information is determined as the feature of each of the at least two vertices.
[0039] Optionally, after determining the features of each vertex, a target matrix can be generated based on the features of multiple vertices, wherein the target matrix is used to represent the feature length of the features of multiple vertices and the size of each grid region; the target matrix is decomposed into at least one feature vector; each feature vector is used to generate a target grid region, resulting in at least one target grid region, wherein the similarity between the geometry of each target grid region and the geometry of the grid regions other than the at least one target grid region is higher than a similarity threshold, wherein the similarity threshold can be preset and is not specifically limited here.
[0040] Step S204: Based on the connection information between multiple grid regions and at least one target grid region, generate a target file, wherein the target file is used to recreate game objects in the game scene.
[0041] In the technical solution provided by step S204 of this disclosure, after determining at least one target grid region, a target file can be generated based on the connection information between multiple grid regions and the at least one target grid region. The connection information between multiple grid regions is used to represent the connection relationship between multiple grids. The connection information can be called Pconnection. The target file is used to recreate game objects in the game scene.
[0042] Optionally, the connection information between multiple mesh regions and at least one target mesh region can be encoded to obtain a target file, wherein the target file can be a text file, a compressed mesh file, or a game package.
[0043] In at least some embodiments of this disclosure, a triangular mesh of a game object in a game scene is obtained, wherein the triangular mesh is composed of multiple triangles and is used to represent the three-dimensional model of the game object; the triangular mesh is divided into multiple mesh regions, wherein each mesh region is used to represent the local space occupied by the local geometry of the three-dimensional model in the game scene; at least one target mesh region is determined among the multiple mesh regions, wherein the at least one target mesh region is used to reconstruct the mesh regions other than the at least one target mesh region among the multiple mesh regions; and a target file is generated based on the connection information between the multiple mesh regions and the at least one target mesh region, wherein the target file is used to reconstruct the game object in the game scene. In other words, in the embodiments of this disclosure, a target file can be generated based on the connection information between multiple mesh regions and at least one target mesh region. This eliminates the need to generate a target file based on each mesh region, greatly improving the efficiency of target file generation. Furthermore, since the target file only includes the compressed target mesh region and the connection information between the multiple mesh regions, the storage space of the target file is reduced, achieving the technical effect of improving the compression efficiency of the triangular mesh, thereby solving the technical problem of low compression efficiency of the triangular mesh.
[0044] The method described above in this embodiment will be further illustrated with examples below.
[0045] As an optional implementation, step S203, determining at least one target grid region among multiple grid regions, includes: determining at least one target grid region based on the features of multiple vertices in each grid region, wherein the features of the vertices are used to represent the height information of the vertices.
[0046] In this embodiment, each grid region contains multiple vertices. Based on this, at least one target grid region can be determined according to the features of the multiple vertices in each grid region. When determining the features of the multiple vertices in each grid region, the multiple vertices in each grid region can be resampled according to a resampled grid to obtain the features of the multiple vertices. The features of the vertices can be used to characterize the height information of the vertices on the resampled grid. The resampled grid can be called a grid, that is, the features of the vertices can be used to represent the height value of the corresponding grid.
[0047] As an optional implementation, in each grid region, multiple vertices are resampled according to the resampled grid to obtain the features of multiple vertices, including: determining the local coordinate system of each grid region, wherein the local coordinate system is established with the vertex with the highest absolute value of curvature among the multiple vertices as the origin; dividing the resampled grid in the target coordinate plane of the local coordinate system; determining the target subgrid to which each vertex is mapped in the resampled grid; and determining the features of each vertex based on the height information corresponding to each vertex on the target subgrid.
[0048] In this embodiment, since each grid region contains multiple vertices, a local coordinate system can be established with the vertex with the highest absolute curvature among the multiple vertices contained in each grid region as the origin. This determines the local coordinate system of each grid region. Then, the global coordinates of all vertices contained in each grid region can be converted into local coordinates. The global coordinates are the position coordinates of each vertex in the three-dimensional coordinate system of the three-dimensional object, and the local coordinates are the position coordinates of each vertex in the local coordinate system of the corresponding grid region.
[0049] For example, a vertex can be randomly selected in each grid region, and its position coordinates in the local coordinate system of the corresponding grid region and its position coordinates in the global coordinate system can be determined. Then, based on the position coordinates of the selected vertex in the local coordinate system and the position coordinates in the global coordinate system, the coordinate transformation relationship between the local coordinate system and the global coordinate system of each grid region can be determined. Then, according to the coordinate transformation relationship, the position coordinates of each vertex in the global coordinate system of each grid region can be transformed to the local coordinate system, so as to obtain the position coordinates of each vertex in the local coordinate system of each grid region.
[0050] Optionally, after determining the position coordinates of each vertex in each grid region in the local coordinate system, a resampling grid can be generated in the target coordinate plane of the local coordinate system. For example, the target coordinate plane can be the XY plane of the local coordinate system, and a resampling grid can be generated on the XY plane.
[0051] Optionally, after obtaining the resampled grid, the target subgrid to which each vertex is mapped in the resampled grid can be determined. After determining the target subgrid, the features of each vertex can be determined based on the height information corresponding to each vertex on the target subgrid.
[0052] For example, taking any vertex in a certain grid region as an example, the vertex can be projected onto the target coordinate plane of the local coordinate system, and the resampled grid in which the vertex is located when projected onto the target plane can be determined. This resampled grid is then identified as the target subgrid. After the target subgrid is determined, the Z coordinate of the vertex in the local coordinate system can be determined as the height information of the vertex on the target subgrid, and this height information can be identified as the feature of the vertex. According to this method, the features of each vertex in each grid region can be determined.
[0053] As an optional implementation, determining the features of each vertex based on the height information corresponding to each vertex on the target sub-mesh further includes: in response to a vertex among multiple vertices being mapped to the target sub-mesh, determining the height information of the vertex in the local coordinate system as the feature of the vertex; in response to at least two vertices among multiple vertices being mapped to the target sub-mesh, obtaining the average height information of the height information of the at least two vertices in the local coordinate system, and determining the average height information as the feature of each of the at least two vertices.
[0054] In this embodiment, if only one vertex in a resampled grid mapped to a local coordinate system is included among the multiple vertices of a certain grid region, then the resampled grid mapped to that vertex is determined as the target subgrid mapped to that vertex, and the Z coordinate of that vertex in the local coordinate system is determined as the height value corresponding to that vertex on the target subgrid, and the height value is determined as the feature of that vertex. Alternatively, if at least two vertices in a resampled grid mapped to a local coordinate system are included among the multiple vertices of a certain grid region, then the resampled grid mapped to those at least two vertices is determined as the target subgrid mapped to those at least two vertices in the resampled grid, and the average Z coordinate of those at least two vertices in the corresponding local coordinate system is determined as the height value corresponding to those at least two vertices on the target subgrid, and the height value is determined as the feature of each of those at least two vertices. That is, the features of those at least two vertices are the same. Based on this method, the features of multiple vertices included in each of the multiple grid regions can be determined.
[0055] Optionally, after determining the features of the multiple vertices included in each of the multiple grid regions, at least one target grid region can be determined based on the features of the multiple vertices in each grid region.
[0056] As an optional implementation, determining at least one target grid region based on the features of multiple vertices in each grid region includes: generating a target matrix from the features of the multiple vertices, wherein the target matrix is used to represent the feature length of the features of the multiple vertices and the size of each grid region; decomposing the target matrix into at least one feature vector; and generating a target grid region from each feature vector to obtain at least one target grid region, wherein the similarity between the geometry of each target grid region and the geometry of the grid regions other than the at least one target grid region in the multiple grid regions is higher than a similarity threshold.
[0057] In this embodiment, after determining the features of multiple vertices included in each of the multiple grid regions, the feature values of the multiple vertices included in each grid region can be concatenated column by column to obtain a target matrix, wherein the target matrix is used to represent the feature length of the features of the multiple vertices and the size of each grid region.
[0058] Optionally, if there are n grid regions, where each grid region includes m vertices, that is, each grid region includes m features of the vertices, then by concatenating the features of the vertices included in each grid region column by column, the size of the target matrix is m*n.
[0059] For example, suppose there are 3 grid regions. The first grid region contains vertices with eigenvalues of 2, 3, and 1. The second grid region contains vertices with eigenvalues of 2, 1, and 3. The third grid region contains vertices with eigenvalues of 1, 4, and 3. Based on this, the eigenvalues of the vertices in these 3 grid regions are concatenated column by column to obtain the target matrix, which can be represented by the following formula, where the size of the target matrix is 3*3.
[0060]
[0061] Optionally, after obtaining the target matrix, the target matrix can be decomposed into at least one eigenvector, and each eigenvector can be used to generate a target grid region, resulting in at least one target grid region. The similarity between the geometry of each target grid region and the geometry of the grid regions other than the at least one target grid region in the plurality of grid regions is higher than a similarity threshold.
[0062] For example, the target matrix can be decomposed into at least one eigenvector. The target matrix can be decomposed using the Singular Value Decomposition (SVD) method or the K-SVD method. Of course, other eigenvalue decomposition methods can also be used to decompose the target matrix, without any specific restrictions here.
[0063] As an optional implementation, step S202, which divides the triangular mesh into multiple mesh regions, includes: obtaining a vertex set of the triangular mesh, wherein the vertex set is used to generate the triangular mesh; and dividing the triangular mesh based on the vertex set to obtain multiple mesh regions.
[0064] In this embodiment, since a triangular mesh is composed of a series of vertices and edges, the vertices that constitute multiple triangular meshes can be obtained, and the obtained vertices can be used to form a vertex set. Then, the triangular mesh is divided based on the vertex set to obtain multiple mesh regions.
[0065] As an optional implementation, the triangular mesh is divided based on the vertex set to obtain multiple mesh regions, including: a first determining step, in the sub-vertex set of the vertex set, determining the vertex with the largest absolute value of curvature as the first vertex of the first mesh region to be generated, wherein the vertices in the sub-vertex set do not belong to the already 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 region to be generated; a generating step, forming the first mesh region with the first vertex and at least one second vertex, and determining the first mesh region as the second mesh region, returning to the first determining step, until the number of vertices in the sub-vertex set is less than a first quantity threshold, wherein the first quantity threshold is the minimum number of vertices used to form the mesh region.
[0066] In this embodiment, the vertices that have not been divided in the vertex set can be identified first. The set of these undivided vertices is called the sub-vertex set. Based on this, the Gaussian curvature value of each vertex in the sub-vertex set can be calculated. The Gaussian curvature values of each vertex are then sorted in descending order, and the vertex with the largest Gaussian curvature value is taken as the initial vertex of the first grid region to be generated, also known as the seed point. This vertex is then used as the first vertex in the first grid region to be generated. Afterward, with the first vertex as the center, the vertices adjacent to the first vertex can be identified as at least one second vertex in the first grid region to be generated. The second vertex can be the vertex that is closest to the first vertex in terms of physical distance and is not in any of the already generated grid regions. If there are multiple vertices that meet this rule, all of them are assigned as second vertices in the first grid region. If there is only one vertex that meets this rule, only that vertex is assigned as the second vertex in the first grid region. After identifying the second vertices, the first vertex and at least one second vertex can be used to generate the first grid region, and the first grid region is identified as the already generated grid region. For ease of explanation, the already generated grid region can be referred to as the second grid region. Then, following the above method, the first vertex can be determined from the undivided vertices in the vertex set, and at least one second vertex adjacent to the first vertex can be determined to form the second grid region, until the number of vertices included in the sub-vertex set is less than the first quantity threshold.
[0067] As an optional implementation, the distance between the second vertex and the first vertex is less than a distance threshold, and / or the angle between the normal of the second vertex and the normal of the first vertex is less than an angle threshold, and / or the number of vertices of the first vertex and at least one second vertex is less than a second quantity threshold.
[0068] In this embodiment, when determining the second vertex of the first grid region to be generated, vertices whose distance from the first vertex in the sub-vertex set is less than a distance threshold can be determined as the second vertex, and / or vertices whose angle between the normal of a vertex in the sub-vertex set and the normal of the first vertex is less than an angle threshold can be determined as the second vertex. Based on this, when no second vertex that meets the rule can be found in the sub-vertex set, or when the number of vertices included in the first grid region to be generated has exceeded the second quantity threshold, it indicates that the division of the first grid region to be generated is completed.
[0069] As an optional implementation, step S204, generating a target file based on the connection information between multiple grid regions and at least one target grid region, includes: encoding the connection information and at least one target grid region to obtain the target file.
[0070] In this embodiment, after obtaining at least one target mesh region, the connection information between the target mesh region and multiple mesh regions can be encoded to obtain a target file. Since the similarity between the geometry of each target mesh region and the geometry of the mesh regions other than the target mesh region is higher than the similarity threshold, the game objects in the game scene can be reconstructed based on the target file.
[0071] The technical solutions of the present disclosure embodiments will be further illustrated below with reference to preferred embodiments.
[0072] In related technologies, game scenes contain various game objects, each of which can be represented by a triangular mesh. Triangular meshes exhibit both self-similarity and global similarity in terms of spatial characteristics. Self-similarity primarily manifests between different triangular meshes; for example, the distribution of triangular meshes on boundaries or flat areas tends to follow certain patterns. Global similarity is evident in the high similarity between model A and model B in the game scene; parts of model A can be directly reconstructed from parts of model B. These two types of similarity implicitly introduce data redundancy when representing triangular meshes. Currently, encoding the triangular meshes of game objects in a game scene mainly involves extracting the connectivity of the triangular meshes and then encoding the connectivity based on a predetermined order. However, this encoding method does not consider the spatial structural characteristics of the triangular meshes themselves, failing to achieve efficient compression of the triangular meshes and also failing to reduce data redundancy during compression.
[0073] However, this disclosure provides a method for processing game information. By acquiring the triangular mesh of game objects in the game scene and dividing the acquired triangular mesh into multiple mesh regions, at least one target mesh region is determined among the multiple mesh regions. The geometry of the target mesh region has a high similarity to the mesh regions other than the target mesh region in the multiple mesh regions. Then, based on the connection information between the multiple mesh regions and the at least one target mesh region, a target file can be generated. Since the target file can be generated based only on the target mesh region and the connection information between the multiple mesh regions, the generation efficiency of the target file is greatly improved. Moreover, since the target file only contains the compressed target mesh region and the connection information between the multiple mesh regions, the storage space occupied by the target file can be greatly reduced.
[0074] The method for processing game information according to the embodiments of this disclosure will be further described below.
[0075] Figure 3 This is a flowchart of a game information processing method according to one embodiment of the present disclosure, such as... Figure 3As shown, the method includes the following steps:
[0076] Step S301: Divide the vertices of multiple triangular meshes to obtain multiple mesh regions.
[0077] In this embodiment, the Gaussian curvature values of the vertices of the triangular mesh that makes up all game objects in the game scene can be determined. Then, the Gaussian curvature values of all vertices are sorted in descending order, and the vertex with the largest Gaussian curvature value is used as the initial vertex in the mesh region to be generated, also known as the seed point. Next, the vertex that is physically closest to the initial vertex can be determined and added to the mesh region to be generated. For ease of explanation, the determined vertex can be called the second vertex. It should be noted that the second vertex is not in any already generated mesh region, and the angle between the normal of the second vertex and the normal of the initial vertex is less than 90 degrees. During the process of determining the second vertex, if a vertex is physically more than a distance threshold from the initial vertex, it is not determined as the second vertex; or, if the remaining vertices are all added to other mesh regions; or, if the angle between the normal of the remaining vertices and the normal of the initial vertex is greater than 90 degrees; or, if the number of vertices in the mesh region to be generated has reached a set upper limit, then the determination of the second vertex stops, the mesh region to be generated is considered complete, and each vertex contained in the mesh region is recorded. Then, we can continue to select the vertex with the largest Gaussian curvature value from the vertices that have not been assigned to any grid region, and determine the second vertex with that vertex as the center to form a grid region. According to this method, we can continue until all the vertices that make up the triangular grid are assigned to the grid region, thus obtaining multiple grid regions.
[0078] Step S302: Resample the vertices in multiple grid regions to obtain the features of the grid regions.
[0079] In this embodiment, a local coordinate system can be established with the seed point in each grid region as the origin. Then, based on the coordinate transformation relationship between the global coordinate system and each local coordinate system, the position coordinates of each vertex in the global coordinate system are transformed to the local coordinate system. Next, a resampling grid can be divided on the XY plane of each local coordinate system, and each vertex in multiple grid regions is projected onto the XY plane of the corresponding local coordinate system to determine the resampling grid to which each vertex is projected. The Z coordinate of that vertex is determined as the feature of that vertex. If multiple vertices are projected into the same resampling grid, the average Z coordinate of each vertex in the multiple vertices is calculated, and this average is used as the feature of each vertex in the multiple vertices. According to this method, the features of multiple vertices contained in each grid region can be determined. Then, the features of multiple vertices in each grid region can be used as the features of the corresponding grid region.
[0080] Step S303: Feature encoding is performed on the features of the grid region.
[0081] In this embodiment, the features of each grid region can be concatenated column-wise, that is, the feature values of each vertex included in each grid region can be concatenated column-wise to obtain a target matrix. The size of the target matrix is: the number of vertices in each grid region * the number of grid regions. After obtaining the target matrix, eigenvalue decomposition can be used to decompose the target matrix into eigenvectors, resulting in multiple eigenvectors. Each eigenvector can form a new grid region, and the set of grid regions formed by these eigenvectors can be called the feature grid region.
[0082] Step S304: Compress the feature grid region and the connection information between multiple grids to obtain the target file.
[0083] In this embodiment, the feature mesh region information generated in the above steps and the connection information between multiple mesh regions can be used to obtain a compressed target file, and the original triangular mesh can be restored based on the compressed target file.
[0084] In this embodiment, multiple triangular meshes are divided into multiple mesh regions by dividing the vertices of multiple mesh regions. The vertices in the multiple mesh regions are then resampled to obtain the features of the mesh regions. Subsequently, the features of the mesh regions are feature-encoded, and the feature mesh regions and the connection information between the mesh regions are compressed to obtain a compressed file. Since compression can be performed based on the feature mesh region information and the connection information between the mesh regions, the compression efficiency of the triangular mesh can be greatly improved. Moreover, since the generated target file only includes the feature mesh region information and the connection information between the meshes, the storage space occupied by the compressed target file can be greatly reduced, thus achieving the goal of reducing storage space and realizing the technical effect of improving compression efficiency. This solves the technical problem of low compression efficiency of triangular meshes.
[0085] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0086] This embodiment also provides a game information processing device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the terms "unit" and "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0087] Figure 4 This is a schematic diagram of a game information processing apparatus according to one embodiment of the present disclosure, such as... Figure 4 As shown, the game information processing device 400 includes: an acquisition unit 401, a division unit 402, a determination unit 403, and a generation unit 404.
[0088] Acquisition unit 401 is used to acquire the triangular mesh of game objects in the game scene, wherein the triangular mesh is composed of multiple triangles and is used to represent the three-dimensional model of the game objects;
[0089] The partitioning unit 402 is used to divide the triangular mesh into multiple mesh regions, wherein each mesh region is used to represent the local space occupied by the local geometry of the 3D model in the game scene;
[0090] The determining unit 403 is used to determine at least one target grid region among multiple grid regions, wherein the at least one target grid region is used to reconstruct the grid regions other than the at least one target grid region among the multiple grid regions;
[0091] The generation unit 404 is used to generate a target file based on the connection information between multiple grid regions and at least one target grid region, wherein the target file is used to recreate game objects in the game scene.
[0092] Optionally, the determining unit 403 includes: a first determining module, configured to determine at least one target grid region based on the features of multiple vertices in each grid region, wherein the features of the vertices are used to represent the height information of the vertices.
[0093] Optionally, the first determining module further includes: a first generating submodule, used to generate a target matrix from the features of multiple vertices, wherein the target matrix is used to represent the feature length of the features of the multiple vertices and the size of each grid region; a decomposition submodule, used to decompose the target matrix into at least one feature vector; and a second generating submodule, used to generate a target grid region from each feature vector to obtain at least one target grid region, wherein the similarity between the geometry of each target grid region and the geometry of the grid regions other than the at least one target grid region in the multiple grid regions is higher than a similarity threshold.
[0094] Optionally, the device 400 further includes a resampling unit for resampling multiple vertices in each grid region according to a resampling grid to obtain features of multiple vertices, wherein the features of the vertices are used to represent the height information of the vertices on the resampling grid.
[0095] Optionally, the resampling unit includes: a second determining module for determining a local coordinate system for each of the grid regions, wherein the local coordinate system is established with the vertex having the highest absolute value of curvature among the plurality of vertices as the origin; a first partitioning module for partitioning a resampling grid in the target coordinate plane of the local coordinate system; a third determining module for determining the target sub-grid to which each vertex is mapped in the resampling grid; and a fourth determining module for determining the features of each vertex based on the height information corresponding to each vertex on the target sub-grid.
[0096] Optionally, the fourth determining module is further configured to determine the height information of a vertex in the local coordinate system as a feature of a vertex when a vertex among multiple vertices is mapped onto the target submesh; the fourth determining module is further configured to obtain the average height information of the height information of at least two vertices in the local coordinate system when at least two vertices among multiple vertices are mapped onto the target submesh, and determine the average height information as a feature of each of the at least two vertices.
[0097] Optionally, the partitioning unit 402 includes: an acquisition module for acquiring a vertex set of a triangular mesh, wherein the vertex set is used to generate a triangular mesh; and a second partitioning module for partitioning the triangular mesh based on the vertex set to obtain multiple mesh regions.
[0098] Optionally, the second partitioning module is further configured to perform the following steps: a first determination step, in the sub-vertex set of the vertex set, determining the vertex with the largest absolute value of curvature as the first vertex of the first grid region to be generated, wherein the vertices in the sub-vertex set do not belong to the already generated second grid region; 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 grid region to be generated; a generation step, forming the first grid region with the first vertex and at least one second vertex, and determining the first grid region as the second grid region, returning to the first determination step, until the number of vertices in the sub-vertex set is less than a first quantity threshold.
[0099] Optionally, the distance between the second vertex and the first vertex is less than a distance threshold, and / or, the angle between the normal of the second vertex and the normal of the first vertex is less than an angle threshold, and / or, the number of vertices of the first vertex and at least one second vertex is less than a second quantity threshold.
[0100] Optionally, the generation unit 404 includes: an encoding module for encoding the connection information and at least one target grid region to obtain a target file.
[0101] In the game information processing apparatus of this embodiment, an acquisition unit is used to acquire the triangular mesh of game objects in the game scene; a division unit is used to divide the triangular mesh into multiple mesh regions, wherein each mesh region is used to represent the local space occupied by the local geometry of the 3D model in the game scene; a determination unit is used to determine at least one target mesh region among the multiple mesh regions, wherein the at least one target mesh region is used to reconstruct the mesh regions other than the at least one target mesh region among the multiple mesh regions; and a generation unit is used to generate a target file based on the connection information between the multiple mesh regions and the at least one target mesh region, wherein the target file is used to reconstruct the game objects in the game scene. That is, in this embodiment, a target file can be generated based on the connection information between multiple mesh regions and at least one target mesh region, which can greatly improve the compression efficiency of the triangular mesh. Furthermore, since the generated target file only includes the compressed connection information and the target mesh region, the storage space occupied by the compressed target file can be greatly reduced, achieving the goal of reducing storage space and realizing the technical effect of improving compression efficiency, thus solving the technical problem of low compression efficiency of triangular meshes.
[0102] It should be noted that the above-mentioned units and modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but not limited to these: all the above-mentioned units and modules are located in the same processor; or, the above-mentioned units and modules are located in different processors in any combination.
[0103] Embodiments of this disclosure also provide a non-volatile storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0104] Optionally, in this embodiment, the aforementioned non-volatile storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0105] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0106] Optionally, in this embodiment, the non-volatile storage medium described above can be configured to store a computer program for performing the following steps:
[0107] S1, obtain the triangular mesh of game objects in the game scene, wherein the triangular mesh is composed of multiple triangles and is used to represent the three-dimensional model of the game objects;
[0108] S2 divides the triangular mesh into multiple mesh regions, where each mesh region represents the local space occupied by the local geometry of the 3D model in the game scene;
[0109] S3, determine at least one target grid region among multiple grid regions, wherein the at least one target grid region is used to reconstruct the grid regions other than the at least one target grid region among the multiple grid regions;
[0110] S4 generates a target file based on the connection information between multiple grid regions and at least one target grid region. The target file is used to recreate game objects in the game scene.
[0111] Optionally, the aforementioned non-volatile storage medium may also be configured to store a computer program for performing the following steps: determining at least one target grid region based on the features of multiple vertices in each grid region, wherein the features of the vertices are used to represent the height information of the vertices.
[0112] Optionally, the aforementioned non-volatile storage medium may also be configured to store a computer program for performing the following steps: generating a target matrix from the features of multiple vertices, wherein the target matrix represents the feature length of the features of the multiple vertices and the size of each grid region; decomposing the target matrix into at least one feature vector; generating a target grid region from each feature vector, thereby obtaining at least one target grid region, wherein the similarity between the geometry of each target grid region and the geometry of the grid regions other than the at least one target grid region is higher than a similarity threshold.
[0113] Optionally, the aforementioned non-volatile storage medium may also be configured to store a computer program for performing the following steps: in each grid region, resampling multiple vertices according to the resampling grid to obtain features of multiple vertices, wherein the features of the vertices are used to represent the height information corresponding to the vertices on the resampling grid.
[0114] Optionally, the aforementioned non-volatile storage medium may also be configured to store a computer program for performing the following steps: determining a local coordinate system for each grid region, wherein the local coordinate system is established with the vertex having the highest absolute value of curvature among a plurality of vertices as the origin; dividing a resampled grid in a target coordinate plane of the local coordinate system; determining the target subgrid to which each vertex is mapped in the resampled grid; and determining the characteristics of each vertex based on the height information corresponding to each vertex on the target subgrid.
[0115] Optionally, the aforementioned non-volatile storage medium may also be configured to store a computer program for performing the following steps: when a vertex among a plurality of vertices is mapped onto a target submesh, determining the height information of the vertex in the local coordinate system as a feature of the vertex; when at least two vertices among a plurality of vertices are mapped onto a target submesh, obtaining the average height information of the height information of the at least two vertices in the local coordinate system, and determining the average height information as a feature of each of the at least two vertices.
[0116] Optionally, the aforementioned computer-readable storage medium may also be configured to store a computer program for performing the following steps: obtaining a vertex set of a triangular mesh, wherein the vertex set is used to generate the triangular mesh; and dividing the triangular mesh based on the vertex set to obtain multiple mesh regions.
[0117] Optionally, the aforementioned non-volatile storage medium may also be configured to store a computer program for performing the following steps: a first determining step, in a sub-vertex set of the vertex set, determining the vertex with the largest absolute value of curvature as the first vertex of the first mesh region to be generated, wherein the vertices in the sub-vertex set do not belong to the already 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 region to be generated; a generating step, forming the first mesh region with the first vertex and at least one second vertex, and determining the first mesh region as the second mesh region, returning to the first determining step, until the number of vertices in the sub-vertex set is less than a first quantity threshold.
[0118] Optionally, the aforementioned non-volatile storage medium may also be configured to store a computer program for performing the following steps: encoding connection information and at least one target grid region to obtain a target file.
[0119] In this embodiment of the non-volatile storage medium, a technical solution for processing game information is provided. A target file can be generated based on the connection information between multiple grid regions and at least one target grid region. This eliminates the need to generate a target file based on each grid region, significantly improving the efficiency of target file generation. Furthermore, since the target file only includes the compressed target grid region and the connection information between multiple grid regions, the storage space of the target file is reduced, achieving the technical effect of improving the compression efficiency of triangular grids, thereby solving the technical problem of low compression efficiency of triangular grids.
[0120] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0121] In exemplary embodiments of this application, a computer-readable storage medium stores a program product capable of implementing the methods described above in this embodiment. In some possible implementations, various aspects of the embodiments of this disclosure may also be implemented as a program product including program code, which, when the program product is run on a terminal device, causes the terminal device to perform the steps according to various exemplary embodiments of this disclosure described in the "Exemplary Methods" section above.
[0122] The program product for implementing the above-described method according to embodiments of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the embodiments of the present disclosure is not limited thereto. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0123] The aforementioned program product may take the form of any combination of one or more computer-readable media. Such computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not exhaustive) of computer-readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0124] It should be noted that the program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0125] Embodiments of this disclosure also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0126] Optionally, the electronic device 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.
[0127] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0128] S1, obtain the triangular mesh of game objects in the game scene, wherein the triangular mesh is composed of multiple triangles and is used to represent the three-dimensional model of the game objects;
[0129] S2 divides the triangular mesh into multiple mesh regions, where each mesh region represents the local space occupied by the local geometry of the 3D model in the game scene;
[0130] S3, determine at least one target grid region among multiple grid regions, wherein the at least one target grid region is used to reconstruct the grid regions other than the at least one target grid region among the multiple grid regions;
[0131] S4 generates a target file based on the connection information between multiple grid regions and at least one target grid region. The target file is used to recreate game objects in the game scene.
[0132] Optionally, the processor may also be configured to store a computer program for performing the following steps: determining at least one target grid region based on the features of multiple vertices in each grid region, wherein the features of the vertices are used to represent the height information of the vertices.
[0133] Optionally, the processor may also be configured to store a computer program for performing the following steps: generating a target matrix from the features of multiple vertices, wherein the target matrix represents the feature length of the features of the multiple vertices and the size of each grid region; decomposing the target matrix into at least one feature vector; generating a target grid region from each feature vector, thereby obtaining at least one target grid region, wherein the similarity between the geometry of each target grid region and the geometry of the grid regions other than the at least one target grid region is higher than a similarity threshold.
[0134] Optionally, the processor may also be configured to store a computer program for performing the following steps: in each grid region, resampling multiple vertices according to the resampled grid to obtain features of multiple vertices, wherein the features of the vertices are used to represent the height information of the vertices on the resampled grid.
[0135] Optionally, the processor may also be configured to store a computer program for performing the following steps: determining a local coordinate system for each grid region, wherein the local coordinate system is established with the vertex having the highest absolute value of curvature among a plurality of vertices as the origin; dividing a resampled grid in a target coordinate plane of the local coordinate system; determining the target subgrid to which each vertex is mapped in the resampled grid; and determining the features of each vertex based on the height information corresponding to each vertex on the target subgrid.
[0136] Optionally, the processor may also be configured to store a computer program for performing the following steps: when a vertex among a plurality of vertices is mapped onto a target submesh, determining the height information of the vertex in the local coordinate system as a feature of the vertex; when at least two vertices among a plurality of vertices are mapped onto a target submesh, obtaining the average height information of the height information of the at least two vertices in the local coordinate system, and determining the average height information as a feature of each of the at least two vertices.
[0137] Optionally, the processor may also be configured to store a computer program for performing the following steps: obtaining a vertex set of a triangular mesh, wherein the vertex set is used to generate the triangular mesh; and dividing the triangular mesh based on the vertex set to obtain multiple mesh regions.
[0138] Optionally, the processor may also be configured to store a computer program for performing the following steps: a first determining step, in a sub-vertex set of the vertex set, determining the vertex with the largest absolute value of curvature as the first vertex of the first mesh region to be generated, wherein the vertices in the sub-vertex set do not belong to the already 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 region to be generated; a generating step, forming the first mesh region with the first vertex and at least one second vertex, and determining the first mesh region as the second mesh region, returning to the first determining step, until the number of vertices in the sub-vertex set is less than a first quantity threshold.
[0139] Optionally, the processor may also be configured to store a computer program for performing the following steps: encoding connection information and at least one target grid region to obtain a target file.
[0140] In the electronic device of this embodiment, a technical solution for processing game information is provided. A target file can be generated based on the connection information between multiple grid regions and at least one target grid region. This eliminates the need to generate a target file based on each grid region, significantly improving the efficiency of target file generation. Furthermore, since the target file only includes the compressed target grid region and the connection information between multiple grid regions, the storage space of the target file is reduced, achieving the technical effect of improving the compression efficiency of triangular grids, thereby solving the technical problem of low compression efficiency of triangular grids.
[0141] Figure 5 This is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Figure 5 As shown, the electronic device 500 is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0142] like Figure 5 As shown, the electronic device 500 is presented in the form of a general-purpose computing device. The components of the electronic device 500 may include, but are not limited to: at least one processor 510, at least one memory 520, a bus 530 connecting different system components (including memory 520 and processor 510), and a display 540.
[0143] The memory 520 stores program code that can be executed by the processor 510, causing the processor 510 to perform the steps described in the method section of the embodiments of this application according to various exemplary implementations of this disclosure.
[0144] The memory 520 may include a readable medium in the form of volatile memory cells, such as random access memory (RAM) 5201 and / or cache memory 5202, and may further include read-only memory (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.
[0145] In some instances, memory 520 may also include programs / utilities 5204 having a set (at least one) of program modules 5205, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Memory 520 may further include memory remotely located relative to processor 510, which can be connected to electronic device 500 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0146] Bus 530 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processor 510, or a local bus using any of the various bus structures.
[0147] The display 540 may be, for example, a touchscreen liquid crystal display (LCD) that allows a user to interact with the user interface of the electronic device 500.
[0148] Optionally, the electronic device 500 can also communicate with one or more external devices 600 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 500, and / or any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via the input / output (I / O) interface 550. Furthermore, the electronic device 500 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via a network adapter 560. Figure 5 As shown, network adapter 560 communicates with other modules of electronic device 500 via bus 530. It should be understood that, although... Figure 5 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0149] The aforementioned electronic device 500 may also include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.
[0150] Those skilled in the art will understand that Figure 5 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 500 may also include components that are more... Figure 5 The more or fewer components shown, or having the same Figure 1 Different configurations are shown. The memory 520 can be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the game information processing method in this embodiment. The processor 510 executes various functional applications and data processing by running the computer program stored in the memory 520, thereby implementing the aforementioned game information processing method.
[0151] The sequence numbers of the embodiments disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0152] In the above embodiments of this disclosure, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0153] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0154] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0155] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0156] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0157] The above description is only a preferred embodiment of this disclosure. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles of this disclosure, and these improvements and modifications should also be considered within the scope of protection of this disclosure.
Claims
1. A method for processing game information, characterized in that, include: Obtain a triangular mesh of game objects in the game scene, wherein the triangular mesh is composed of multiple triangles and is used to represent the three-dimensional model of the game objects; The triangular mesh is divided into multiple mesh regions, wherein each mesh region is used to represent the local space occupied by the local geometry of the 3D model in the game scene; At least one target grid region is determined in the plurality of grid regions, wherein the at least one target grid region is used to reconstruct the grid regions other than the at least one target grid region in the plurality of grid regions, and the similarity between the geometry of the target grid region and the geometry of the grid regions other than the at least one target grid region in the plurality of grid regions is higher than a similarity threshold; Based on the connection information between the plurality of grid regions and the at least one target grid region, a target file is generated, wherein the target file is used to recreate the game object in the game scene; The process of generating a target file based on the connection information between the plurality of grid regions and the at least one target grid region includes: encoding the connection information and the at least one target grid region to obtain the target file.
2. The method according to claim 1, characterized in that, Determining at least one target grid region among the plurality of grid regions includes: Based on the features of multiple vertices in each of the grid regions, the at least one target grid region is determined, wherein the features of the vertices are used to represent the height information of the vertices.
3. The method according to claim 2, characterized in that, Determining the at least one target grid region based on the features of multiple vertices in each of the grid regions includes: The features of the plurality of vertices are generated into a target matrix, wherein the target matrix is used to represent the feature length of the features of the plurality of vertices and the size of each of the grid regions; Decompose the target matrix into at least one eigenvector; Each of the feature vectors is generated as a target grid region to obtain the at least one target grid region.
4. The method according to claim 2, characterized in that, The method further includes: In each of the grid regions, the plurality of vertices are resampled according to the resampled grid to obtain the features of the plurality of vertices, wherein the features of the vertices are used to represent the height information of the vertex on the resampled grid.
5. The method according to claim 4, characterized in that, In each of the grid regions, the plurality of vertices are resampled according to the resampled grid to obtain the features of the plurality of vertices, including: A local coordinate system is determined for each of the grid regions, wherein the local coordinate system is established with the vertex having the highest absolute value of curvature among the plurality of vertices as the origin; The resampling grid is divided in the target coordinate plane of the local coordinate system; Determine the target subgrid to which each vertex is mapped in the resampled grid; Based on the height information corresponding to each vertex on the target sub-mesh, the features of each vertex are determined.
6. The method according to claim 5, characterized in that, Based on the height information corresponding to each vertex on the target sub-mesh, the features of each vertex are determined, including: In response to mapping one of the plurality of vertices to the target submesh, the height information of the vertex in the local coordinate system is determined as a feature of the vertex; In response to at least two of the plurality of vertices being mapped to the target submesh, the average height information of the height information of the at least two vertices in the local coordinate system is obtained, and the average height information is determined as a feature of each of the at least two vertices.
7. The method according to claim 1, characterized in that, The triangular mesh is divided into multiple mesh regions, including: Obtain the vertex set of the triangular mesh, wherein the vertex set is used to generate the triangular mesh; The triangular mesh is divided based on the vertex set to obtain the multiple mesh regions.
8. The method according to claim 7, characterized in that, The triangular mesh is divided based on the vertex set to obtain the multiple mesh regions, including: The first determining step is to determine the vertex with the largest absolute value of curvature in the sub-vertex set of the vertex set as the first vertex of the first mesh region to be generated, wherein the vertices in the sub-vertex set do not belong to the already generated second mesh region. The second determination step involves identifying at least one vertex adjacent to the first vertex in the set of sub-vertexes as at least one second vertex for the first mesh region to be generated. In the generation step, the first vertex and the at least one second vertex are used to form the first grid region, and the first grid region is determined as the second grid region. The process is then repeated until the number of vertices in the sub-vertex set is less than a first quantity threshold.
9. The method according to claim 8, characterized in that, The distance between the second vertex and the first vertex is less than a distance threshold, and / or the angle between the normal of the second vertex and the normal of the first vertex is less than an angle threshold, and / or the number of vertices of the first vertex and the at least one second vertex is less than a second quantity threshold.
10. A device for processing game information, characterized in that, include: The acquisition unit is used to acquire a triangular mesh of game objects in the game scene, wherein the triangular mesh is composed of multiple triangles and is used to represent the three-dimensional model of the game object; A partitioning unit is used to divide the triangular mesh into multiple mesh regions, wherein each mesh region is used to represent the local space occupied by the local geometry of the 3D model in the game scene; A determining unit is configured to determine at least one target grid region among the plurality of grid regions, wherein the at least one target grid region is used to reconstruct the grid regions other than the at least one target grid region among the plurality of grid regions, and the similarity between the geometric structure of the target grid region and the geometric structure of the grid regions other than the at least one target grid region among the plurality of grid regions is higher than a similarity threshold. A generation unit is configured to generate a target file based on the connection information between the plurality of grid regions and the at least one target grid region, wherein the target file is used to recreate the game object in the game scene; The generation unit is configured to perform the following steps to generate the target file: encoding the connection information and the at least one target grid region to obtain the target file.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 9 when run by a processor.
12. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method described in any one of claims 1 to 9.