CN103729864A - Compression storage method and system for three-dimensional model - Google Patents
Compression storage method and system for three-dimensional model Download PDFInfo
- Publication number
- CN103729864A CN103729864A CN201310704136.6A CN201310704136A CN103729864A CN 103729864 A CN103729864 A CN 103729864A CN 201310704136 A CN201310704136 A CN 201310704136A CN 103729864 A CN103729864 A CN 103729864A
- Authority
- CN
- China
- Prior art keywords
- radius
- mid point
- vertex
- summit
- summits
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Image Generation (AREA)
Abstract
The invention discloses a compression storage method and system for a three-dimensional model. According to the method, when the vertex of the three-dimensional model is stored, floating point data are converted into integer data to be stored, storage space is compressed by 50%, and storage cost is reduced; the system comprises a vertex coordinate obtaining module, a maximum and minimum vertex obtaining module, a midpoint and radius obtaining module, a vertex storing module and a vertex reading module. When the vertex is read, compared with the operation of reading the floating point data, the operation of reading the integer data can greatly promote reading speed and reading efficiency.
Description
Technical field
The present invention relates to field of data storage, particularly a kind of compression and storage method of three-dimensional model and system.
Background technology
Three-dimensional model is the For Polygons Representation of object, by data such as summit and triangle index, formed, vertex data consists of X, Y, tri-floating-point components of Z again, a floating-point takies 4 bytes, and a summit takies 12 bytes, when the summit of model quantity increases, the storage space that model takies also increases thereupon, this not only can increase the cost of transmission and storage in the application of program or in the actual motion of software, also can the quantity on limited model summit and the use of number of triangles.The particularly application in field of play, in a Games Software, include a large amount of data, model data has taken the storage space of huge ratio, and the increase of the raising of carrying cost and transmission burden, must increase a series of costs such as game issue and popularization.Therefore,, if can effectively reduce taking up room of three-dimensional modeling data, for the operation and maintenance of other software especially Games Software, be all significant.
Summary of the invention
For addressing the above problem, the object of the present invention is to provide a kind of compression and storage method and system of three-dimensional model, reduce the storage space of three-dimensional model, reduce the transportation burden of model data, promote the operational efficiency of software.
The present invention solves the technical scheme that its problem adopts:
The preferred embodiments of the present invention provide a kind of compression and storage method of three-dimensional model, comprising:
The step that apex coordinate obtains, all summits of traversal three-dimensional model, obtain the three-dimensional coordinate on all summits;
The step that minimax summit obtains, contrasts the minimum and maximum value of all summits in each dimension coordinate, obtains the maximum vertex forming with three maximal values and the minimum vertex forming with three minimum value;
The step that mid point and radius obtain, obtains mid point and radius between maximum vertex and minimum vertex;
The step of summit storage, is converted into integer by all summits of three-dimensional model by mid point and radius and stores.
In the step of summit storage, arbitrary summit, when storage, deducts after mid point this summit divided by radius, then is multiplied by 32767 and stores after rounding.The data stored are like this integer type, can reduce storage space.Because floating data storage takies 32, and integer type data take 16, can reduce in actual applications by 50% storage space, the use of greatly having saved storage space.
Described compression and storage method also comprises the step that read on summit:
Read mid point and radius, read summit simultaneously and round three numerical value of rear storage, these three numerical value are multiplied by radius respectively after 32767, then be added with mid point, as the coordinate figure of respective vertices; Or
Read mid point and radius, read summit simultaneously and round three numerical value of rear storage, these three numerical value are multiplied by respectively after radius divided by 32767, then are added with mid point, as the coordinate figure of respective vertices.
Summit is when reading, by the summit reduction of storage.The present invention is simple, and saves storage space and transmission time, and then reduces carrying cost and promote software operation efficiency.
The preferred embodiments of the present invention provide a kind of compression storage system of three-dimensional model, comprising:
Apex coordinate acquisition module, all summits of traversal three-dimensional model, obtain the three-dimensional coordinate on all summits;
Minimax summit acquisition module, contrasts the minimum and maximum value of all summits in each dimension coordinate, obtains the maximum vertex forming with three maximal values and the minimum vertex forming with three minimum value;
Mid point and radius acquisition module, obtain mid point and radius between maximum vertex and minimum vertex;
Summit memory module, is converted into integer by all summits of three-dimensional model by mid point and radius and stores.
This compression storage system also comprises summit read module:
Read mid point and radius, read summit simultaneously and round three numerical value of rear storage, these three numerical value are multiplied by radius respectively after 32767, then be added with mid point, as the coordinate figure of respective vertices; Or
Read mid point and radius, read summit simultaneously and round three numerical value of rear storage, these three numerical value are multiplied by respectively after radius divided by 32767, then are added with mid point, as the coordinate figure of respective vertices.
The invention has the beneficial effects as follows:
The present invention adopts a kind of compression and storage method and system of three-dimensional model, when the summit of storage three-dimensional model, floating data is converted to integer data and stores, and the storage space of compression 50%, reduces the cost of storing; When reading summit, read integer operation compared with reading floating-point operation, can greatly promote the speed reading, promote the efficiency reading.The present invention can greatly promote the operation of software, especially includes the Games Software of a large amount of three-dimensional modeling datas.
Accompanying drawing explanation
Below in conjunction with accompanying drawing and example, the invention will be further described.
Fig. 1 is the process flow diagram of the inventive method;
Fig. 2 is the process flow diagram that apex coordinate obtains;
Fig. 3 is the process flow diagram that minimax summit obtains;
Fig. 4 is the process flow diagram that mid point and radius obtain;
Fig. 5 is the process flow diagram of summit storage;
Fig. 6 is the process flow diagram that read on summit.
Embodiment
Referring to accompanying drawing, the present invention is further detailed explanation and explanation.
The compression and storage method of a kind of three-dimensional model of realizing as the present invention, with reference to the process flow diagram shown in Fig. 1, comprising:
The step 100 that apex coordinate obtains, three-dimensional model has multiple summits, and different summits is in the coordinate difference of the X, Y, Z axis of three-dimensional coordinate, with reference to the step 202 in Fig. 2 and step 204, all summits of traversal three-dimensional model, can obtain the coordinate on all summits;
The step 102 that minimax summit obtains, shown in Fig. 3, step 302 contrasts the minimum and maximum value of all summits in each dimension coordinate, and step 304 obtains the maximum vertex forming with three maximal values and the minimum vertex forming with three minimum value;
The step 104 that mid point and radius obtain, shown in Fig. 4, step 402 deducts minimum vertex afterwards divided by 2 by maximum vertex, step 406 obtains middle point coordinate by step 402 acquired results and minimum vertex addition, and step 410 is calculated the distance of maximum vertex or minimum vertex and mid point and obtained radius;
The step 106 of summit storage, shown in Fig. 5, for the arbitrary summit in three-dimensional model, step 502 deducts D coordinates value after mid point respectively divided by radius by this summit, obtain three and be greater than 0 and be less than or equal to 1 coefficient value, step 506 is multiplied by respectively 32767 and round and store by these three coefficient values;
After storage, when the summit in three-dimensional model is read, need to be according to the operation contrary with when storage, concrete, the step 108 reading for summit, shown in Fig. 6, step 602 reads mid point and radius, simultaneously, step 604 reads summit and rounds three numerical value of rear storage, step 608 is multiplied by radius respectively by these three numerical value after 32767, and step 610 is added step 608 acquired results and mid point, as the coordinate figure of respective vertices.
In described step 608, three numerical value can also be multiplied by respectively after radius divided by 32767, by step 610, step 608 acquired results and mid point be added again afterwards, as the coordinate figure of respective vertices.
The step 106 of storing by summit, the summit of three-dimensional model is converted to integer data by floating data stores, because floating data generally takies 32, and shaping data only take 16 when storage, therefore, can save 50% space, thereby save the storage space using, reduce corresponding carrying cost.
In the step 106 of summit storage, what be multiplied by 32767 is 2 15 powers subtract 1, meets the shared figure place of shaping data, after calculating, directly rounds.
Concrete, while supposing that three-dimensional model does not compress, thering is N summit, each summit has three floating datas need to take altogether 12 bytes, and three-dimensional model needs the storage space of 12N byte; After compressing by shaping, each summit takies 6 bytes, and the mid point of storing and radius take 24 bytes, and ratio of compression is (6N+24)/12N, approaches 50% compression ratio.
The summit of three-dimensional model is when storing and reading, do not need extra compression algorithm or software can improve compressibility, storage realizes soon and easily with the operation travelling speed reading, for the Games Software that stores a large amount of three-dimensional models, data to three-dimensional model are compressed, and can greatly reduce the storage space that three-dimensional model takies and improve operational efficiency.
The compression storage system that the invention provides a kind of three-dimensional model, comprising:
Apex coordinate acquisition module, all summits of traversal three-dimensional model, obtain the three-dimensional coordinate on all summits;
Minimax summit acquisition module, contrasts the minimum and maximum value of all summits in each dimension coordinate, obtains the maximum vertex forming with three maximal values and the minimum vertex forming with three minimum value;
Mid point and radius acquisition module, obtain mid point and radius between maximum vertex and minimum vertex;
Summit memory module, is converted into integer by all summits of three-dimensional model by mid point and radius and stores.
Described mid point and the radius obtaining between maximum vertex and minimum vertex is specially:
Maximum vertex deducts minimum vertex afterwards divided by 2, and acquired results and minimum vertex are added and obtain mid point;
Calculate the distance of maximum vertex or minimum vertex and mid point and obtain radius.
Describedly all summits of three-dimensional model are converted into integer by mid point and radius store and comprise:
For the arbitrary summit in all summits, this summit is deducted to D coordinates value after mid point respectively divided by radius, obtain three and be greater than 0 and be less than or equal to 1 coefficient value;
These three coefficient values are multiplied by respectively to 32767 and round and store.
Described compression storage system also comprises summit read module:
Read mid point and radius, read summit simultaneously and round three numerical value of rear storage, these three numerical value are multiplied by radius respectively after 32767, then be added with mid point, as the coordinate figure of respective vertices; Or
Read mid point and radius, read summit simultaneously and round three numerical value of rear storage, these three numerical value are multiplied by respectively after radius divided by 32767, then are added with mid point, as the coordinate figure of respective vertices.
Described system is concrete with reference to content described in above method when realizing, and does not repeat them here.
The present invention, in when application, is not limited to the software of certain type, all applied different fields of the present invention that meets, or with the conversion of different types of data, its object is to reduce the replacement scheme of storage space, all within protection scope of the present invention.
Claims (8)
1. a compression and storage method for three-dimensional model, is characterized in that, comprising:
The step that apex coordinate obtains, all summits of traversal three-dimensional model, obtain the three-dimensional coordinate on all summits;
The step that minimax summit obtains, contrasts the minimum and maximum value of all summits in each dimension coordinate, obtains the maximum vertex forming with three maximal values and the minimum vertex forming with three minimum value;
The step that mid point and radius obtain, obtains mid point and radius between maximum vertex and minimum vertex;
The step of summit storage, is converted into integer by all summits of three-dimensional model by mid point and radius and stores.
2. compression and storage method according to claim 1, is characterized in that, described in the mid point and the radius that obtain between maximum vertex and minimum vertex be specially:
Maximum vertex deducts minimum vertex afterwards divided by 2, and acquired results and minimum vertex are added and obtain mid point;
Calculate the distance of maximum vertex or minimum vertex and mid point and obtain radius.
3. compression and storage method according to claim 1, is characterized in that, describedly all summits of three-dimensional model are converted into integer by mid point and radius store and comprises:
For the arbitrary summit in all summits, this summit is deducted to D coordinates value after mid point respectively divided by radius, obtain three and be greater than 0 and be less than or equal to 1 coefficient value;
These three coefficient values are multiplied by respectively to 32767 and round and store.
4. compression and storage method according to claim 3, is characterized in that, described method also comprises the step that read on summit:
Read mid point and radius, read summit simultaneously and round three numerical value of rear storage, these three numerical value are multiplied by radius respectively after 32767, then be added with mid point, as the coordinate figure of respective vertices; Or
Read mid point and radius, read summit simultaneously and round three numerical value of rear storage, these three numerical value are multiplied by respectively after radius divided by 32767, then are added with mid point, as the coordinate figure of respective vertices.
5. a compression storage system for three-dimensional model, is characterized in that, comprising:
Apex coordinate acquisition module, all summits of traversal three-dimensional model, obtain the three-dimensional coordinate on all summits;
Minimax summit acquisition module, contrasts the minimum and maximum value of all summits in each dimension coordinate, obtains the maximum vertex forming with three maximal values and the minimum vertex forming with three minimum value;
Mid point and radius acquisition module, obtain mid point and radius between maximum vertex and minimum vertex;
Summit memory module, is converted into integer by all summits of three-dimensional model by mid point and radius and stores.
6. compression storage system according to claim 5, is characterized in that, described in the mid point and the radius that obtain between maximum vertex and minimum vertex be specially:
Maximum vertex deducts minimum vertex afterwards divided by 2, and acquired results and minimum vertex are added and obtain mid point;
Calculate the distance of maximum vertex or minimum vertex and mid point and obtain radius.
7. compression storage system according to claim 5, is characterized in that, describedly all summits of three-dimensional model are converted into integer by mid point and radius store and comprises:
For the arbitrary summit in all summits, this summit is deducted to D coordinates value after mid point respectively divided by radius, obtain three and be greater than 0 and be less than or equal to 1 coefficient value;
These three coefficient values are multiplied by respectively to 32767 and round and store.
8. compression storage system according to claim 7, is characterized in that, described compression storage system also comprises summit read module:
Read mid point and radius, read summit simultaneously and round three numerical value of rear storage, these three numerical value are multiplied by radius respectively after 32767, then be added with mid point, as the coordinate figure of respective vertices; Or
Read mid point and radius, read summit simultaneously and round three numerical value of rear storage, these three numerical value are multiplied by respectively after radius divided by 32767, then are added with mid point, as the coordinate figure of respective vertices.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310704136.6A CN103729864A (en) | 2013-12-18 | 2013-12-18 | Compression storage method and system for three-dimensional model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310704136.6A CN103729864A (en) | 2013-12-18 | 2013-12-18 | Compression storage method and system for three-dimensional model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103729864A true CN103729864A (en) | 2014-04-16 |
Family
ID=50453925
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310704136.6A Pending CN103729864A (en) | 2013-12-18 | 2013-12-18 | Compression storage method and system for three-dimensional model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103729864A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104359821A (en) * | 2014-11-04 | 2015-02-18 | 深圳市帝迈生物技术有限公司 | Particle classification statistic method and system for scatter diagram and blood cell analyzer |
CN105808558A (en) * | 2014-12-30 | 2016-07-27 | 中国铁道科学研究院电子计算技术研究所 | Index table discrete quantity storage method and application thereof in reversed furtherest neighbor retrieval |
CN107038016A (en) * | 2017-03-29 | 2017-08-11 | 广州酷狗计算机科技有限公司 | A kind of floating number conversion method and device based on GPU |
CN111486888A (en) * | 2020-04-14 | 2020-08-04 | 新石器慧通(北京)科技有限公司 | Error correction method and device and unmanned vehicle |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010055032A1 (en) * | 2000-06-23 | 2001-12-27 | Yasuhiko Saito | Data processing method, recording medium and data processing apparatus |
CN101019325A (en) * | 2004-09-13 | 2007-08-15 | 易斯普维 | Method for compressing and decompressing a sequence of numbers |
CN101354788A (en) * | 2008-08-20 | 2009-01-28 | 大连民族学院 | One-dimensional nondestructive geometric compressing method of three-dimensional grid model |
WO2011088960A1 (en) * | 2010-01-19 | 2011-07-28 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Image encoder and image decoder |
CN103378863A (en) * | 2012-04-18 | 2013-10-30 | 董福田 | Method and device for spatial data compression, decompression and progressive transmission |
-
2013
- 2013-12-18 CN CN201310704136.6A patent/CN103729864A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010055032A1 (en) * | 2000-06-23 | 2001-12-27 | Yasuhiko Saito | Data processing method, recording medium and data processing apparatus |
CN101019325A (en) * | 2004-09-13 | 2007-08-15 | 易斯普维 | Method for compressing and decompressing a sequence of numbers |
CN101354788A (en) * | 2008-08-20 | 2009-01-28 | 大连民族学院 | One-dimensional nondestructive geometric compressing method of three-dimensional grid model |
WO2011088960A1 (en) * | 2010-01-19 | 2011-07-28 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Image encoder and image decoder |
CN103378863A (en) * | 2012-04-18 | 2013-10-30 | 董福田 | Method and device for spatial data compression, decompression and progressive transmission |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104359821A (en) * | 2014-11-04 | 2015-02-18 | 深圳市帝迈生物技术有限公司 | Particle classification statistic method and system for scatter diagram and blood cell analyzer |
CN105808558A (en) * | 2014-12-30 | 2016-07-27 | 中国铁道科学研究院电子计算技术研究所 | Index table discrete quantity storage method and application thereof in reversed furtherest neighbor retrieval |
CN107038016A (en) * | 2017-03-29 | 2017-08-11 | 广州酷狗计算机科技有限公司 | A kind of floating number conversion method and device based on GPU |
CN107038016B (en) * | 2017-03-29 | 2019-11-15 | 广州酷狗计算机科技有限公司 | A kind of floating number conversion method and device based on GPU |
CN111486888A (en) * | 2020-04-14 | 2020-08-04 | 新石器慧通(北京)科技有限公司 | Error correction method and device and unmanned vehicle |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102682103B (en) | Three-dimensional space index method aiming at massive laser radar point cloud models | |
CN103093499B (en) | A kind of city three-dimensional model data method for organizing being applicable to Internet Transmission | |
CN103729864A (en) | Compression storage method and system for three-dimensional model | |
JP5068849B2 (en) | Ray tracing method, system, and program | |
CN111339599B (en) | Conversion method from BIM model to GIS model | |
CN105556565A (en) | Fragment shaders perform vertex shader computations | |
CN107993279B (en) | Scene accurate expression method | |
CN105046733A (en) | Three-dimensional multi-texture based mapping method | |
CN105139449A (en) | Three-dimensional model compression method based on three-dimensional mesh subdivision and coding | |
EP2347356A1 (en) | System and method for hybrid solid and surface modeling for computer-aided design environments | |
CN101354788B (en) | One-dimensional nondestructive geometric compressing method of three-dimensional grid model | |
CN104200425A (en) | Device and method for entity clipping during graphic processing unit (GPU) graphic processing | |
CN111930742B (en) | Building information model BIM-based data storage method and related device | |
CN112365598B (en) | Method, device and terminal for converting oblique photography data into three-dimensional data | |
EP3192054A1 (en) | System, method and computer program product for automatic optimization of 3d textured models for network transfer and real-time rendering | |
CN112419511A (en) | Three-dimensional model file processing method and device, storage medium and server | |
CN105160705B (en) | A kind of processing method based on d engine to mobile terminal 3 d image data | |
CN105931279A (en) | Three-dimensional model data compression method and system | |
CN116958385A (en) | Material texture dynamic updating method supporting mass monomer models, storage medium and equipment | |
CN103378863A (en) | Method and device for spatial data compression, decompression and progressive transmission | |
CN101546351A (en) | Geometric parameterization modeling method for optimizing variable-complexity shape | |
WO2012166764A2 (en) | Mesh sequence file format | |
CN111862331A (en) | CPU operation-based model voxelization efficiency optimization method and system | |
CN113032699A (en) | Robot model construction method, robot model construction device and robot processor | |
Tatarchuk et al. | Programming for real-time tessellation on gpu |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140416 |
|
RJ01 | Rejection of invention patent application after publication |