Three-dimensional grid data processing method and device
By generating and compressing residual texture maps, and combining displacement residuals and basic mesh bitstreams, the problem of balancing compression rate and visual quality in existing 3D mesh data processing technologies is solved, achieving efficient 3D mesh data compression.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-10
AI Technical Summary
Existing technologies for compressing and encoding 3D mesh data typically require the deletion of a large number of mesh vertices, resulting in severe distortion of the decoded data and making it difficult to achieve a balance between compression ratio and visual quality.
By generating and compressing residual texture maps containing high-frequency detail information, and using the basic mesh texture prediction method, displacement residual bitstream and residual texture bitstream are generated. The basic mesh bitstream is then combined for decoding to generate an approximate mesh model.
While ensuring visual quality, it significantly reduces the final transmitted bitstream size, improves compression efficiency, and enhances local texture details, thus solving the problem of balancing compression ratio and visual quality.
Smart Images

Figure CN121639835A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data compression technology, and more specifically, to a three-dimensional mesh data processing method and apparatus. Background Technology
[0002] With the rapid development of computer graphics and 3D vision technology, 3D mesh models, as key data structures representing the geometric and topological relationships of object surfaces, have been widely used in numerous fields such as digital entertainment, industrial simulation, cultural heritage digitization, and medical imaging. To achieve the ultimate visual realism, 3D mesh models typically contain a massive number of vertices, edges, and faces, resulting in exceptionally large data volumes. This poses a significant challenge to the storage, network transmission, and real-time rendering of 3D mesh models. Therefore, efficient compression and encoding of 3D mesh data has become an indispensable technical bridge connecting the generation of high-quality 3D content with the limited bandwidth and computing resources of terminals. In existing technologies, efficient compression and encoding of 3D mesh data usually involves simplifying the 3D mesh model before compressing and encoding the simplified 3D mesh data.
[0003] However, existing 3D mesh data processing methods require the deletion of a large number of mesh vertices before compressing and encoding the 3D mesh, resulting in severe data distortion after decoding and making it difficult to achieve a balance between compression ratio and visual quality. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a three-dimensional mesh data processing method and apparatus to overcome at least one of the above-mentioned defects.
[0005] In a first aspect, embodiments of this application provide a three-dimensional mesh data processing method, including: Determine the first UV map corresponding to the base mesh of the original mesh model and the base mesh bitstream used to record mesh information. Each vertex of the base mesh has a first vertex color. The base mesh is subdivided to obtain the newly added first subdivided vertex. The vertex color of the first subdivided vertex is determined based on the color of the first subdivided vertex to obtain the first subdivided prediction mesh. The vertex position offsets of the first subdivision prediction grid and the original grid are compared to generate a displacement residual bitstream. Predict the color of each pixel in the first UV map to generate a first predicted texture map; Based on the difference between the first predicted texture map and the real texture map in the YUV components, a residual texture map is generated. The residual texture map is compressed and encoded to obtain the residual texture bitstream. The real texture map is obtained by color sampling of the original texture map. The basic grid bitstream, displacement residual bitstream, and residual texture bitstream are decoded to obtain an approximate grid model.
[0006] Optionally, the step of comparing the vertex position offsets of the first subdivision prediction grid with the original grid to generate a displacement residual bitstream includes: determining the geometric position differences of corresponding vertices between the first subdivision prediction grid and the original grid to obtain displacement residuals; and compressing and encoding the displacement residuals to obtain displacement residual bitstreams.
[0007] Optionally, the step of predicting the color of each pixel in the first UV map to generate a first predicted texture map includes: for each pixel in the first UV map, determining the target grid where the pixel is located; and predicting the color of the pixel using a barycentric coordinate interpolation method based on the first vertex color of each vertex on the target grid to generate the first predicted texture map.
[0008] Optionally, the step of generating a residual texture map based on the difference between the first predicted texture map and the real texture map in the YUV components includes: calculating the difference between the real texture map and the first predicted texture map in the YUV color space, keeping the original data of the U and V components to obtain the original residual map; performing range reduction processing on the Y component values of the original residual map, and superimposing the range-reduced Y component values onto a preset initial map to obtain the residual texture map.
[0009] Optionally, the steps of determining the first UV map corresponding to the base mesh of the original mesh model and the base mesh bitstream used to record mesh information include: in the original texture map, performing color sampling on each vertex of the base mesh to determine the second vertex color; mapping the vertices of the base mesh to the texture space to obtain the first UV map, and updating the second vertex color according to the mapping relationship to determine the first vertex color of each vertex in the base mesh; and compressing and encoding the mesh information of the base mesh to obtain the base mesh bitstream.
[0010] Optionally, the step of decoding the base mesh stream, displacement residual stream, and residual texture stream to obtain an approximate mesh model includes: decoding the base mesh stream to obtain a base mesh; subdividing the base mesh and performing vertex color prediction processing to obtain a second subdivided prediction mesh; decoding the displacement residual stream to obtain a displacement residual; generating a second prediction texture map based on the displacement residual; decoding the residual texture stream to obtain a residual texture map; obtaining an approximate texture map based on the residual texture map; and obtaining an approximate mesh model based on the approximate mesh and the approximate texture map.
[0011] Optionally, the step of subdividing the base mesh and performing vertex color prediction processing to obtain a second subdivided prediction mesh includes: subdividing the base mesh to obtain newly added second subdivided vertices; and determining the vertex color of the second subdivided vertex based on the first vertex color to obtain the second subdivided prediction mesh.
[0012] Optionally, the second subdivision prediction mesh includes second subdivision vertices. The step of generating a second predicted texture map based on the displacement residual includes: applying the displacement residual to the second subdivision prediction mesh to obtain an approximate mesh; and using the vertex colors of the second subdivision vertices and the first vertex colors to predict the color of each pixel in the first UV map to generate the second predicted texture map.
[0013] Optionally, the step of obtaining an approximate texture map from the residual texture map includes: performing range enlargement processing on the Y component values in the residual texture map to obtain an approximate residual map; and adding the approximate residual map to the second predicted texture map to obtain an approximate texture map.
[0014] Secondly, embodiments of this application also provide a three-dimensional mesh data processing apparatus, the apparatus comprising: The first bitstream determination module is used to determine the first UV map corresponding to the base grid of the original mesh model and the base grid bitstream used to record mesh information. Each vertex of the base grid has a first vertex color. The mesh prediction module is used to subdivide the base mesh to obtain the newly added first subdivision vertex, and determine the vertex color of the first subdivision vertex based on the color of the first vertex to obtain the first subdivision prediction mesh. The second bitstream determination module is used to compare the vertex position offset of the first subdivision prediction grid with the original grid to generate a displacement residual bitstream. The texture prediction module is used to predict the color of each pixel in the first UV map and generate a first predicted texture map. The third bitstream determination module is used to generate a residual texture map based on the difference between the first predicted texture map and the real texture map in the YUV components, compress and encode the residual texture map to obtain the residual texture bitstream, and the real texture map is obtained based on color sampling of the original texture map. The bitstream decoding module is used to decode the basic grid bitstream, displacement residual bitstream, and residual texture bitstream to obtain an approximate grid model.
[0015] The embodiments of this application bring the following beneficial effects: The present application provides a three-dimensional mesh data processing method and apparatus that can compensate for the deficiencies of the basic mesh texture prediction by generating and compressing a residual texture map containing high-frequency detail information. This significantly reduces the final transmitted bitstream size while ensuring visual quality. Compared with existing three-dimensional mesh data processing methods, this method improves compression efficiency, enhances local texture details, and solves the problem of balancing compression rate and visual quality.
[0016] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart of the three-dimensional mesh data processing method provided in an embodiment of this application is shown; Figure 2 A flowchart illustrating the steps for determining the first UV map and the basic mesh bitstream provided in an embodiment of this application is shown. Figure 3 A flowchart illustrating the steps for determining the residual texture map provided in an embodiment of this application is shown; Figure 4 A flowchart illustrating the steps for obtaining the approximate mesh model provided in an embodiment of this application is shown; Figure 5 A schematic diagram of the structure of the three-dimensional mesh data processing apparatus provided in an embodiment of this application is shown; Figure 6 A schematic diagram of the structure of the electronic device provided in the embodiments of this application is shown. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.
[0020] To facilitate understanding of this embodiment, the following describes each of the exemplary steps provided in this embodiment, taking the application of the three-dimensional mesh data processing method provided in this application to a terminal device as an example.
[0021] Please see Figure 1 , Figure 1 This is a flowchart illustrating a three-dimensional mesh data processing method provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the three-dimensional mesh data processing method includes: Step S101: Determine the first UV map corresponding to the base grid of the original mesh model and the base grid code stream used to record mesh information.
[0022] The original mesh model can refer to a high-precision original 3D mesh model, while the basic mesh can refer to the mesh obtained after simplifying the original mesh model.
[0023] The base mesh has fewer vertices than the original mesh. The original mesh can refer to the mesh corresponding to the original mesh model, i.e., the high-precision original 3D mesh. Each vertex of the base mesh has a first vertex color.
[0024] The first UV map can refer to the UV map corresponding to the base mesh. The first UV map is used to distinguish it from the second UV map, which can refer to the original UV map corresponding to the original mesh model.
[0025] The following reference Figure 2 This section will introduce the process of determining the first UV map and the basic grid bitstream.
[0026] Figure 2 A flowchart illustrating the steps for determining the first UV map and the basic mesh bitstream provided in an embodiment of this application is shown, as follows: Figure 2 As shown, the steps for determining the first UV map and the basic mesh bitstream include: Step S1011: In the original texture map, color sampling is performed on each vertex of the base mesh to determine the color of the second vertex.
[0027] First, to reduce the number of vertices in the original mesh model, the original mesh model is simplified to obtain a base mesh. Then, in the original texture map corresponding to the original mesh model, RGB color sampling is performed on each vertex of the base mesh to determine the second vertex color of each vertex in the base mesh.
[0028] Step S1012: Map the vertices of the base mesh to the texture space to obtain the first UV map, and update the second vertex color according to the mapping relationship to determine the first vertex color of each vertex in the base mesh.
[0029] The base mesh, containing only vertex coordinate information, is input into the UVatlas algorithm to map the vertices of the base mesh to the texture space, generating the first UV map. Since the coordinates between the newly generated first UV map and the second UV map are not in a one-to-one correspondence, a coordinate mapping relationship can be found between the first and second UV maps using a k-dimensional tree. This mapping relationship uses the vertex colors of the second UV map to update the second vertex color of each vertex in the base mesh. The updated vertex color is called the first vertex color, making it more accurately represent the keypoint colors in the texture map. The second UV map can refer to the original UV map; the second UV map is the UV map of the original mesh model.
[0030] Step S1013: Compress and encode the grid information of the basic grid to obtain the basic grid bitstream.
[0031] Using the Draco encoding library, the mesh information of the base mesh is compressed and encoded to obtain the base mesh bitstream. The mesh information includes the geometric coordinates of each vertex of the base mesh, the color of the first vertex, and the topological connection relationship between vertices.
[0032] In one embodiment, after the base grid bitstream is determined, the encoding and decoding processes need to be verified.
[0033] For example, at the encoding end, the basic grid bitstream is decoded to obtain the basic reconstructed grid. If the grid information of the basic reconstructed grid is consistent with the grid information of the basic grid, then the verification is confirmed.
[0034] Step S102: Subdivide the base mesh to obtain the newly added first subdivision vertex, and determine the vertex color of the first subdivision vertex based on the color of the first vertex to obtain the first subdivision prediction mesh.
[0035] Parametric mesh subdivision surface methods, such as the Loop subdivision method or the Catmull-Clark method, are used to subdivide the base mesh, thereby increasing the number of meshes and vertices in the base mesh, making the subdivided mesh closer to the geometry of the original mesh model.
[0036] After subdivision, new vertices are added to the base mesh, referred to as the first subdivision vertex. At this point, the first subdivision vertex is not assigned a color. To assign a color to the first subdivision vertex, the color of the first subdivision vertex can be determined by interpolation based on the first vertex color of each vertex in the base mesh. The base mesh after subdivision and the assignment of color to the first subdivision vertex is then defined as the subdivision prediction mesh.
[0037] Step S103: Compare the vertex position offsets of the first subdivision prediction grid with the original grid to generate a displacement residual bitstream.
[0038] Since the first subdivision vertex in the first subdivision prediction mesh is predicted, there may be differences between the prediction result and the vertices of the original mesh. This difference can be characterized by calculating the displacement residual.
[0039] Specifically, the geometric position difference between the corresponding vertices of the first subdivision prediction mesh and the original mesh can be determined to obtain the displacement residual. For example, for each vertex in the first subdivision prediction mesh, the target vertex corresponding to that vertex in the original mesh is determined, and the difference between the vertex and the target vertex in the X-axis coordinate, Y-axis coordinate, and Z-axis coordinate is calculated. The difference between all corresponding vertices in the three coordinate axis directions is determined as the displacement residual.
[0040] Then, the displacement residual is compressed and encoded separately to obtain the displacement residual bitstream.
[0041] Step S104: Predict the color of each pixel in the first UV map to generate a first predicted texture map.
[0042] Here, the first vertex color of each vertex in the base mesh can be regarded as the key point color on the texture map, and the color of each pixel in the first UV map can be predicted using the key point color.
[0043] For example, the base mesh and each mesh in the first UV map are triangular meshes. For each pixel in the first UV map, the UV triangle where the pixel is located is determined as the target mesh where the pixel is located. The target mesh includes three vertices.
[0044] Then, based on the color of the first vertex of each vertex on the target grid, the color of the pixel is predicted using the barycentric coordinate interpolation method, thus determining the color of the pixel.
[0045] Repeat the above process until the color of each pixel in the first UV map is determined, and then use the first UV map with the colors of all pixels determined as the first predicted texture map.
[0046] Step S105: Generate a residual texture map based on the difference between the first predicted texture map and the real texture map in the YUV components, and compress and encode the residual texture map to obtain the residual texture bitstream.
[0047] The true texture map is obtained by color sampling of the original texture map. For example, the true color value of each pixel can be sampled from the original texture map, and the true color value of each pixel is assigned to the first UV map to obtain the true texture map, so as to determine the difference between the true texture map and the first predicted texture map.
[0048] The following reference Figure 3 This section will introduce the process of generating residual texture maps.
[0049] Figure 3 A flowchart illustrating the steps for determining the residual texture map provided in an embodiment of this application is shown, as follows: Figure 3 As shown, the steps for determining the residual texture map include: Step S1051: Convert the real texture map and the first predicted texture map to the YUV color space.
[0050] Convert the real texture map and the first predicted texture map from the RGB color space to the YUV color space.
[0051] In an alternative embodiment, the real texture map and the first predicted texture map can be converted to YUV420 format to further save data by utilizing chroma downsampling.
[0052] Step S1052: In the YUV color space, calculate the difference between the real texture map and the first predicted texture map in the Y component, while keeping the original data for the U and V components, to obtain the original residual map.
[0053] The difference in Y component values of corresponding pixels in the two texture maps is calculated pixel by pixel, while keeping the U and V component values of the pixels unchanged. Based on the difference in all Y component values and the unchanged U and V component values, an original residual map is generated. The original residual map includes the residual value of each pixel. The residual value can characterize the difference in brightness between the real texture map and the first predicted texture map.
[0054] Step S1053: Reduce the range of the Y component values of the original residual map, and then overlay the reduced Y component values onto the preset initial map to obtain the residual texture map.
[0055] Since the residual values in the calculated raw residual map may exceed the pixel value range of the standard image (e.g., 0-255), direct data storage could lead to overflow. To address this issue, the residual map can be preprocessed to avoid data overflow.
[0056] For example, by dividing the Y component values of the original residual plot by a preset quantization factor, which can be 2 or 3, the range of residual values can be reduced to a representable range (e.g., -128 to +127).
[0057] Then, the original residual image, after range reduction processing, is superimposed on a neutral gray background image to generate a residual texture image that can be used for standard image encoder processing. This neutral gray background image is the preset initial image, and the component values of this neutral gray background image in the YUV color space are as follows: , , This way, high-frequency detail information in the residual plot can be preserved while avoiding numerical overflow.
[0058] After obtaining the residual texture map, an efficient video coding algorithm (such as HPM or H.266 / VVC) can be used to compress and encode the residual texture map, and output the residual texture bitstream.
[0059] In this embodiment of the application, the terminal device includes an encoding end and a decoding end. Steps S101 to S105 are executed on the encoding end, and step S106 is executed on the decoding end.
[0060] Step S106: Decode the basic grid bitstream, displacement residual bitstream, and residual texture bitstream to obtain an approximate grid model.
[0061] After obtaining the basic mesh stream, displacement residual stream, and residual texture stream, decoding can be performed. The decoding process is the reverse of the encoding process. The goal is to reconstruct the original mesh model and original texture map with high quality based on the received stream, thereby obtaining an approximate mesh model corresponding to the original mesh model.
[0062] The following reference Figure 4 This section will introduce the process of obtaining an approximate mesh model.
[0063] Figure 4 A flowchart illustrating the steps for obtaining the approximate mesh model provided in this application embodiment is shown, as follows: Figure 4 As shown, the steps for obtaining the approximate mesh model include: Step S1061: Decode the basic grid bitstream to obtain the basic grid, and subdivide the basic grid and perform vertex color prediction processing to obtain the second subdivision prediction grid.
[0064] The received base grid bitstream is decoded to obtain the geometric coordinates of each vertex, the color of the first vertex, and the topological connection relationship between vertices in the base grid, that is, to obtain the grid information. The base grid can be constructed based on the grid information.
[0065] Then, the base mesh is subdivided to obtain the newly added second subdivision vertices, and the vertex colors of the second subdivision vertices are determined by interpolation based on the colors of the first vertices, so as to obtain the second subdivision prediction mesh.
[0066] The method for determining the second subdivision prediction grid is the same as the method for determining the first subdivision prediction grid in step S102, and will not be repeated here. Furthermore, the first and second subdivision prediction grids can be the same or not entirely the same.
[0067] Step S1062: Decode the displacement residual bitstream to obtain the displacement residual, and generate a second predicted texture map based on the displacement residual.
[0068] The displacement residual is obtained by decoding the displacement residual bitstream. The displacement residual is then applied to the second subdivision prediction grid to obtain an approximate grid. The approximate grid corresponds to the original grid. The approximate grid can refer to a grid structure that is similar to the original grid, that is, the grid that is restored by the displacement residual bitstream.
[0069] Then, using the vertex colors of the second subdivision vertex and the first vertex color, the color of each pixel in the first UV map is predicted to generate a second predicted texture map. The method for generating the second predicted texture map is the same as the method for generating the first predicted texture map in step S104, and will not be repeated here.
[0070] Step S1063: Decode the residual texture bitstream to obtain a residual texture map, and obtain an approximate texture map based on the residual texture map.
[0071] The received HPM residual texture bitstream is decoded to obtain a residual texture map. The Y component values in the residual texture map are magnified to obtain an approximate residual map. The approximate residual map is added to the second predicted texture map to obtain an approximate texture map.
[0072] For example, subtract the neutral gray used as the base image from the residual texture image and multiply by a preset quantization factor used at the encoding end (such as multiplying by 2 or 3) to restore the residual value before scaling, thus obtaining an approximate residual image. Finally, add the approximate residual image to the second predicted texture image to obtain the approximate texture image.
[0073] Step S1064: Obtain an approximate mesh model based on the approximate mesh and the approximate texture map.
[0074] An approximate mesh model is obtained by applying a texture map to the approximate mesh.
[0075] The three-dimensional mesh data processing method provided in this application can compensate for the deficiencies of the basic mesh texture prediction by generating and compressing a residual texture map containing high-frequency detail information. This significantly reduces the final transmitted bitstream size while ensuring visual quality, and solves the problem of balancing compression rate and visual quality while improving compression efficiency and enhancing local texture details.
[0076] Based on the same inventive concept, this application also provides a three-dimensional mesh data processing device corresponding to the three-dimensional mesh data processing method. Since the principle of the device in this application is similar to the three-dimensional mesh data processing method described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0077] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a three-dimensional mesh data processing device provided in an embodiment of this application. Figure 5 As shown, the three-dimensional mesh data processing device 200 includes: The first bitstream determination module 201 is used to determine the first UV map corresponding to the base grid of the original mesh model and the base grid bitstream used to record mesh information. Each vertex of the base grid has a first vertex color. The mesh prediction module 202 is used to subdivide the basic mesh to obtain newly added first subdivision vertices, and determine the vertex color of the first subdivision vertex based on the color of the first vertex to obtain the first subdivision prediction mesh. The second bitstream determination module 203 is used to compare the vertex position offset of the first subdivision prediction grid with the original grid to generate a displacement residual bitstream. The texture prediction module 204 is used to predict the color of each pixel in the first UV map and generate a first predicted texture map. The third bitstream determination module 205 is used to generate a residual texture map based on the difference between the first predicted texture map and the real texture map in the YUV components, compress and encode the residual texture map to obtain the residual texture bitstream, and the real texture map is obtained based on color sampling of the original texture map. The bitstream decoding module 206 is used to decode the basic grid bitstream, displacement residual bitstream, and residual texture bitstream to obtain an approximate grid model.
[0078] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 300 includes a processor 310, a memory 320, and a bus 330.
[0079] The memory 320 stores machine-readable instructions executable by the processor 310. When the electronic device 300 is running, the processor 310 and the memory 320 communicate via the bus 330. When the machine-readable instructions are executed by the processor 310, they can perform the operations described above. Figure 1 The steps of the three-dimensional mesh data processing method in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.
[0080] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 The steps of the three-dimensional mesh data processing method in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.
[0081] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0082] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0083] 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 network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0084] In addition, the functional units in the various embodiments of this application 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.
[0085] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion 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 application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0086] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of processing three-dimensional mesh data, characterized by, The method comprises the following steps: determining a first UV map corresponding to a base mesh of an original mesh model and a base mesh code stream for recording mesh information, each vertex of the base mesh having a first vertex color; performing a subdivision process on the base mesh to obtain newly added first subdivision vertices, determining vertex colors of the first subdivision vertices according to the first vertex colors, and obtaining a first subdivision prediction mesh; comparing the first subdivision prediction mesh with the original mesh in terms of vertex position offset to generate a displacement residual code stream; predicting the color of each pixel point in the first UV map to generate a first prediction texture map; generating a residual texture map according to the difference between the first prediction texture map and a real texture map in YUV components, the real texture map being obtained based on color sampling of an original texture map, and performing compression encoding on the residual texture map to obtain a residual texture code stream; decoding the base mesh code stream, the displacement residual code stream and the residual texture code stream to obtain an approximate mesh model.
2. The method of claim 1, wherein, The step of comparing the first subdivision prediction mesh with the original mesh in terms of vertex position offset to generate a displacement residual code stream comprises: determining the geometric position difference of corresponding vertices of the first subdivision prediction mesh and the original mesh to obtain a displacement residual; performing compression encoding on the displacement residual to obtain a displacement residual code stream.
3. The method of claim 1, wherein, The step of predicting the color of each pixel point in the first UV map to generate a first prediction texture map comprises: for each pixel point in the first UV map, determining a target mesh in which the pixel point is located; predicting the color of the pixel point by using the barycentric coordinate interpolation method according to the first vertex color of each vertex on the target mesh to generate a first prediction texture map.
4. The method of claim 1, wherein, The step of generating a residual texture map according to the difference between the first prediction texture map and a real texture map in YUV components comprises: in the YUV color space, calculating the difference between the real texture map and the first prediction texture map in the Y component, and keeping the original data of the U component and the V component to obtain an original residual map; performing range reduction processing on the Y component value of the original residual map, and superimposing the Y component value after the range reduction processing on a preset initial map to obtain a residual texture map.
5. The method of claim 1, wherein, The step of determining a first UV map corresponding to a base mesh of an original mesh model and a base mesh code stream for recording mesh information comprises: in the original texture map, performing color sampling on each vertex of the base mesh to determine a second vertex color; mapping the vertices of the base mesh into a texture space to obtain a first UV map, and updating the second vertex color according to the mapping relationship to determine the first vertex color of each vertex in the base mesh; performing compression encoding on the mesh information of the base mesh to obtain a base mesh code stream.
6. The method of claim 1, wherein, The step of decoding the base mesh code stream, the displacement residual code stream and the residual texture code stream to obtain an approximate mesh model comprises: decoding the base mesh code stream to obtain a base mesh, and performing subdivision and vertex color prediction processing on the base mesh to obtain a second subdivision prediction mesh; decode the displacement residual code stream to obtain a displacement residual, and generate a second predicted texture map according to the displacement residual; decode the residual texture code stream to obtain the residual texture map, and obtain an approximate texture map according to the residual texture map; obtain an approximate mesh model according to the approximate mesh and the approximate texture map.
7. The method of claim 6, wherein, The step of subdividing the base mesh and performing vertex color prediction processing to obtain a second subdivided predicted mesh includes: performing a subdivision operation on the base mesh to obtain newly added second subdivided vertices; determining the vertex color of the second subdivided vertices according to the first vertex color to obtain a second subdivided predicted mesh.
8. The method of claim 6, wherein, The second subdivided predicted mesh includes second subdivided vertices, and the step of generating a second predicted texture map according to the displacement residual includes: applying the displacement residual to the second subdivided predicted mesh to obtain an approximate mesh; predicting the color of each pixel point in the first UV map using the vertex color of the second subdivided vertices and the first vertex color to generate a second predicted texture map.
9. The method of claim 6, wherein, The step of obtaining an approximate texture map according to the residual texture map includes: performing range amplification processing on the Y component value in the residual texture map to obtain an approximate residual map; adding the approximate residual map and the second predicted texture map to obtain an approximate texture map.
10. A three-dimensional mesh data processing apparatus, characterized by comprising: It includes: A first code stream determination module is configured to determine a first UV map corresponding to a base mesh of an original mesh model and a base mesh code stream used for recording mesh information, each vertex of the base mesh having a first vertex color. A mesh prediction module is configured to perform subdivision processing on the base mesh to obtain newly added first subdivided vertices, determine the vertex color of the first subdivided vertices according to the first vertex color, and obtain a first subdivided predicted mesh. A second code stream determination module is configured to compare the first subdivided predicted mesh with the original mesh in terms of vertex position offset to generate a displacement residual code stream. A texture prediction module is configured to predict the color of each pixel point in the first UV map to generate a first predicted texture map. A third code stream determination module is configured to generate a residual texture map according to the difference between the first predicted texture map and a real texture map in YUV components, perform compression encoding on the residual texture map to obtain a residual texture code stream, and obtain the real texture map based on color sampling on an original texture map. A code stream decoding module is configured to decode the base mesh code stream, the displacement residual code stream, and the residual texture code stream to obtain an approximate mesh model.