Threedimensional model data processing method and device
Threedimensional model data processing method and device
 CN 104,637,089 B
 Filed: 02/15/2015
 Issued: 08/04/2020
 Est. Priority Date: 02/15/2015
 Status: Active Grant
First Claim
Patent Images
1. A method of threedimensional model data processing, the method comprising:
 acquiring coordinate data in the threedimensional model, wherein the coordinate data comprises vertex coordinates and texture coordinates;
increasing the number of vertex coordinates to enable the vertex coordinates in the threedimensional model to correspond to the texture coordinates one by one;
the method comprises the following steps;
utilizing the preset proportion of the scattering elements to scatter and recombine the topology of the threedimensional model into a plurality of twodimensional topologies;
the scattering elements comprise angles, area ratios and distance ratios;
in the process of scattering according to the angle, polygons which are mutually connected in the threedimensional space still keep a mutual connection relationship after scattering;
corresponding shared vertex coordinates are increased in the twodimensional topology according to the number of texture coordinates until the number of the increased vertex coordinates in the twodimensional topology is the same as the number of the texture coordinates in the twodimensional topology;
respectively converting the data types of the vertex coordinates and the texture coordinates to obtain compressed threedimensional model data;
the method comprises the following steps;
respectively calculating a conversion coefficient corresponding to the vertex coordinate and a conversion coefficient corresponding to the texture coordinate;
calculating a conversion coefficient corresponding to the vertex coordinate according to a ratio of a constant to a difference value between a coordinate maximum value and a coordinate minimum value in a preset range, wherein the constant is the maximum value of an effective value range of the data type after the vertex coordinate is converted;
the conversion coefficient corresponding to the texture coordinate is the maximum value of the effective value range of the data type after the texture coordinate conversion;
converting the data type of the vertex coordinate according to the conversion coefficient corresponding to the vertex coordinate;
converting the data type of the texture coordinate according to the conversion coefficient corresponding to the texture coordinate;
storing the vertex coordinates subjected to the data type conversion and the texture coordinates subjected to the data type conversion in an array form to obtain compressed threedimensional model data;
the storage positions of vertex coordinates in corresponding arrays or the storage positions of texture coordinates in corresponding arrays are used for describing polygons in the threedimensional model, the compressed threedimensional model data comprise vertex indexes, the storage positions of the vertex coordinates and the storage positions of the texture coordinates in onetoone correspondence are recorded in the vertex indexes, and the vertexes of the polygons correspond to the storage positions of the vertex coordinates or the storage positions of the texture coordinates;
sending the compressed threedimensional model data to a terminal for rendering, wherein the rendering comprises the following steps;
when a threedimensional graph is rendered, acquiring a storage position of a vertex coordinate according to the vertex index, and calling the vertex coordinate according to the storage position of the vertex coordinate; and
acquiring storage positions of texture coordinates in onetoone correspondence according to the vertex indexes, calling the texture coordinates according to the storage positions of the texture coordinates, and sending the vertex coordinates and the texture coordinates to a terminal so that the terminal analyzes the received vertex coordinates and the received texture coordinates, and transmits the analyzed vertex coordinates and the analyzed texture coordinates into a video memory from a buffer area for rendering to obtain a corresponding threedimensional image.
Chinese PRB Reexamination
Abstract
A method of threedimensional model data processing, the method comprising: acquiring coordinate data in the threedimensional model, wherein the coordinate data comprises vertex coordinates and texture coordinates; respectively converting the data types of the vertex coordinates and the texture coordinates to obtain compressed threedimensional model data; and sending the compressed threedimensional model data to a terminal for rendering. By adopting the method, the compression efficiency of the threedimensional model data can be effectively improved. In addition, a threedimensional model data processing device is also provided.
8 Claims

1. A method of threedimensional model data processing, the method comprising:

acquiring coordinate data in the threedimensional model, wherein the coordinate data comprises vertex coordinates and texture coordinates; increasing the number of vertex coordinates to enable the vertex coordinates in the threedimensional model to correspond to the texture coordinates one by one;
the method comprises the following steps;
utilizing the preset proportion of the scattering elements to scatter and recombine the topology of the threedimensional model into a plurality of twodimensional topologies;
the scattering elements comprise angles, area ratios and distance ratios;
in the process of scattering according to the angle, polygons which are mutually connected in the threedimensional space still keep a mutual connection relationship after scattering;
corresponding shared vertex coordinates are increased in the twodimensional topology according to the number of texture coordinates until the number of the increased vertex coordinates in the twodimensional topology is the same as the number of the texture coordinates in the twodimensional topology;respectively converting the data types of the vertex coordinates and the texture coordinates to obtain compressed threedimensional model data;
the method comprises the following steps;
respectively calculating a conversion coefficient corresponding to the vertex coordinate and a conversion coefficient corresponding to the texture coordinate;
calculating a conversion coefficient corresponding to the vertex coordinate according to a ratio of a constant to a difference value between a coordinate maximum value and a coordinate minimum value in a preset range, wherein the constant is the maximum value of an effective value range of the data type after the vertex coordinate is converted;
the conversion coefficient corresponding to the texture coordinate is the maximum value of the effective value range of the data type after the texture coordinate conversion;
converting the data type of the vertex coordinate according to the conversion coefficient corresponding to the vertex coordinate;
converting the data type of the texture coordinate according to the conversion coefficient corresponding to the texture coordinate;
storing the vertex coordinates subjected to the data type conversion and the texture coordinates subjected to the data type conversion in an array form to obtain compressed threedimensional model data;
the storage positions of vertex coordinates in corresponding arrays or the storage positions of texture coordinates in corresponding arrays are used for describing polygons in the threedimensional model, the compressed threedimensional model data comprise vertex indexes, the storage positions of the vertex coordinates and the storage positions of the texture coordinates in onetoone correspondence are recorded in the vertex indexes, and the vertexes of the polygons correspond to the storage positions of the vertex coordinates or the storage positions of the texture coordinates;sending the compressed threedimensional model data to a terminal for rendering, wherein the rendering comprises the following steps;
when a threedimensional graph is rendered, acquiring a storage position of a vertex coordinate according to the vertex index, and calling the vertex coordinate according to the storage position of the vertex coordinate; and
acquiring storage positions of texture coordinates in onetoone correspondence according to the vertex indexes, calling the texture coordinates according to the storage positions of the texture coordinates, and sending the vertex coordinates and the texture coordinates to a terminal so that the terminal analyzes the received vertex coordinates and the received texture coordinates, and transmits the analyzed vertex coordinates and the analyzed texture coordinates into a video memory from a buffer area for rendering to obtain a corresponding threedimensional image.


2. The method of claim 1, further comprising, after the step of increasing the number of vertex coordinates such that the vertex coordinates in the threedimensional model correspond onetoone to the texture coordinates:

respectively storing the vertex coordinates and the texture coordinates after data type conversion in an array form; polygons in the threedimensional model are described using storage locations of the vertex coordinates in the respective array or storage locations of the texture coordinates in the respective array.


3. The method according to claim 1, wherein the coordinate data further includes a texture index in which a storage location of texture coordinates and a storage location of onetoone correspondence vertex coordinates are recorded;
 the method further comprises the following steps;
acquiring a storage position of a texture coordinate according to the texture index, and calling the texture coordinate according to the storage position of the texture coordinate; and acquiring the storage positions of the vertex coordinates in onetoone correspondence according to the texture indexes, and calling the vertex coordinates according to the storage positions of the vertex coordinates.
 the method further comprises the following steps;

4. A threedimensional model data processing apparatus, characterized in that the apparatus comprises:

the data acquisition module is used for acquiring coordinate data in the threedimensional model, wherein the coordinate data comprises vertex coordinates and texture coordinates; the coordinate processing module is used for increasing the number of vertex coordinates so that the vertex coordinates in the threedimensional model correspond to the texture coordinates one by one;
the coordinate processing module includes;
the scattering and recombining module is used for scattering and recombining the topology of the threedimensional model into a plurality of twodimensional topologies by using the preset proportion of scattering elements;
the scattering elements comprise angles, area ratios and distance ratios;
in the process of scattering according to the angle, polygons which are mutually connected in the threedimensional space still keep a mutual connection relationship after scattering;
a coordinate increasing module, configured to increase corresponding shared vertex coordinates in the twodimensional topology according to the number of texture coordinates until the increased number of vertex coordinates in the twodimensional topology is the same as the number of texture coordinates in the twodimensional topology;the data compression module is used for respectively converting the data types of the vertex coordinates and the texture coordinates to obtain compressed threedimensional model data;
the data compression module comprises;
the conversion coefficient calculation module is used for calculating the conversion coefficient corresponding to the vertex coordinate and the conversion coefficient corresponding to the texture coordinate respectively;
calculating a conversion coefficient corresponding to the vertex coordinate according to a ratio of a constant to a difference value between a coordinate maximum value and a coordinate minimum value in a preset range, wherein the constant is the maximum value of an effective value range of the data type after the vertex coordinate is converted;
the conversion coefficient corresponding to the texture coordinate is the maximum value of the effective value range of the data type after the texture coordinate conversion;
the first conversion module is used for converting the data type of the vertex coordinate according to the conversion coefficient corresponding to the vertex coordinate;
the second conversion module is used for converting the data type of the texture coordinate according to the conversion coefficient corresponding to the texture coordinate;
the coordinate storage module is used for storing the vertex coordinates subjected to the data type conversion and the texture coordinates subjected to the data type conversion in an array form to obtain compressed threedimensional model data;
the storage positions of vertex coordinates in corresponding arrays or the storage positions of texture coordinates in corresponding arrays are used for describing polygons in the threedimensional model, the compressed threedimensional model data comprise vertex indexes, the storage positions of the vertex coordinates and the storage positions of the texture coordinates in onetoone correspondence are recorded in the vertex indexes, and the vertices of the polygons correspond to the storage positions of the vertex coordinates or the storage positions of the texture coordinates;the first calling module is used for acquiring the storage position of the vertex coordinate according to the vertex index and calling the vertex coordinate according to the storage position of the vertex coordinate when the threedimensional graph is rendered;
the first calling module is further used for obtaining storage positions of texture coordinates corresponding to the vertex indexes one by one and calling the texture coordinates according to the storage positions of the texture coordinates;the data sending module is used for sending the compressed threedimensional model data to a terminal for rendering;
the called vertex coordinates and texture coordinates are sent to a terminal, so that the terminal analyzes the received vertex coordinates and texture coordinates, and transmits the analyzed vertex coordinates and texture coordinates from a buffer area to a video memory for rendering, and a corresponding threedimensional image is obtained.


5. The apparatus of claim 4, wherein the coordinate storage module is further configured to store the vertex coordinates and the texture coordinates after the data type conversion in an array form;

the device further comprises; a polygon description module for describing polygons in the threedimensional model using storage locations of the vertex coordinates in a respective array or storage locations of the texture coordinates in a respective array.


6. The apparatus according to claim 4, wherein the coordinate data further includes a texture index in which a storage location of texture coordinates and a storage location of onetoone correspondence vertex coordinates are recorded;
 the device further comprises;
the second calling module is used for acquiring the storage position of the texture coordinate according to the texture index and calling the texture coordinate according to the storage position of the texture coordinate; the second calling module is further used for obtaining storage positions of the vertex coordinates in onetoone correspondence according to the texture indexes and calling the vertex coordinates according to the storage positions of the vertex coordinates.
 the device further comprises;

7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 3 are implemented when the computer program is executed by the processor.

8. A computerreadable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 3.
Specification(s)