CN105931279B - A kind of three-dimensional modeling data compression method and system - Google Patents
A kind of three-dimensional modeling data compression method and system Download PDFInfo
- Publication number
- CN105931279B CN105931279B CN201610240410.2A CN201610240410A CN105931279B CN 105931279 B CN105931279 B CN 105931279B CN 201610240410 A CN201610240410 A CN 201610240410A CN 105931279 B CN105931279 B CN 105931279B
- Authority
- CN
- China
- Prior art keywords
- low
- bit data
- figures
- data
- coordinate
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/005—Statistical coding, e.g. Huffman, run length coding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Present invention relates particularly to a kind of three-dimensional modeling data compression method and systems, this method comprises: the apex coordinate of floating type each in three-dimensional modeling data to be compressed is split as high eight-bit data and low 20 four figures evidence;Respectively by the high eight-bit data and low 20 four figures according to the high eight-bit data and low 20 four figures evidence for arrange by preset order and after memory sequencing;Using first index value in three-dimensional modeling data to be compressed as a reference value, calculate the offset in addition to n-th index value relative to the N-1 index value, wherein, the index value is integer type, offset=N-1 the index value of n-th index value-the of n-th index value relative to the N-1 index value, N >=2;To by above-mentioned steps, treated that three-dimensional modeling data to be compressed carries out LZMA coding.The technical solution provided through the invention can improve the compression ratio of three-dimensional modeling data.
Description
Technical field
The present invention relates to technical field of data compression, and in particular to a kind of three-dimensional modeling data compression method and system.
Background technique
In October, 2015, World Wide Web Consortium (World Wide Web Consortium, W3C) release html5 standard,
In cover webgl.Webgl is the figure rendering interface of browser end, usually develops the three-dimensional that three-dimensional program uses at the end PC
Model data is then to need from the three-dimensional modeling data for locally reading, and using in browser end by network transmission, due to
These three-dimensional modeling data amounts are bigger, and network transmission is so fast unlike reading from local, so must be to these data
Carry out compression transmission.
Currently used three-dimensional modeling data format is obj format, and the data in obj format are in a manner of character string
Arrangement, opposite occupancy memory space is larger, and compressed data file is still larger, passes through net after such data file compression
Network transmission, transmission rate are still relatively slow.
Summary of the invention
In view of this, it is an object of the invention to overcome the deficiencies of the prior art and provide a kind of compressions of three-dimensional modeling data
Method and system realize the compression ratio for improving three-dimensional modeling data.
In order to achieve the above object, the present invention adopts the following technical scheme:
A kind of three-dimensional modeling data compression method, comprising:
Step S1, the apex coordinate of floating type each in three-dimensional modeling data to be compressed is split as high eight-bit data and low two
Ten four figures evidences, wherein the high eight-bit data include eight exponent bits of the apex coordinate, low 20 four figures is according to packet
Include the apex coordinate a bit sign position and 23 mantissa parts;
Step S2, respectively by the high eight-bit data and low 20 four figures according to being arranged by preset order and the row of storage
High eight-bit data and low 20 four figures evidence after sequence;
Step S3, it using first index value in three-dimensional modeling data to be compressed as a reference value, calculates except n-th indexes
The outer offset relative to the N-1 index value of value, wherein the index value is integer type, and n-th index value is relative to N-
The offset of the 1 index value=N-1 index value of n-th index value-the, N >=2;
Step S4, to by step S1~S3, treated that three-dimensional modeling data to be compressed carries out LZMA coding.
It preferably, further include step S0 before the step S1: by the X of apex coordinate each in three-dimensional modeling data to be compressed
Coordinate value, Y axis coordinate value and Z axis coordinate value are arranged by the preset order.
Preferably, the step S0 further include:
The X-coordinate value, Y axis coordinate value and Z axis coordinate value of normal vector coordinate each in three-dimensional modeling data to be compressed are pressed into institute
Preset order is stated to be arranged;
The step S1 further include:
The normal vector coordinate of floating type each in three-dimensional modeling data to be compressed is split as high eight-bit data and low 24
Position data, wherein the high eight-bit data include the sign bit and exponent bits of the normal vector coordinate, the low 20 four figures evidence
Mantissa part including the normal vector coordinate.
Preferably, the step S0 further include:
The X-coordinate value of mapping coordinates each in three-dimensional modeling data to be compressed, Y axis coordinate value are carried out by the preset order
Arrangement;
The step S1 further include:
The mapping coordinates of floating type each in three-dimensional modeling data to be compressed are split as high eight-bit data and 24 low
Data, wherein the high eight-bit data include the sign bit and exponent bits of the mapping coordinates, the low 20 four figures evidence includes
The mantissa part of the mapping coordinates.
Preferably, the step S2 is specifically included:
The high eight-bit data of each apex coordinate and low 20 four figures are arranged and stored according to by preset order respectively
High eight-bit data and low 20 four figures evidence after sequence;Respectively by high eight-bit data of each normal vector coordinate and 24 low
Data arrange by preset order and high eight-bit data and low 20 four figures evidence after memory sequencing;Each textures are sat respectively
Target high eight-bit data and low 20 four figures are according to arrange by preset order and high eight-bit data after memory sequencing and low
20 four figures evidences;
The preset order specifically: the high eight-bit data of each apex coordinate, the high eight-bit data of each normal vector coordinate, each
High eight-bit data, low 20 four figures evidence, the low 20 four figures evidence of each normal vector coordinate of each apex coordinate of mapping coordinates
The low 20 four figures evidence with each mapping coordinates.
A kind of three-dimensional modeling data compressibility, comprising:
Split cells, for the apex coordinate of floating type each in three-dimensional modeling data to be compressed to be split as high eight-bit data
With low 20 four figures evidence, wherein the high eight-bit data include eight exponent bits of the apex coordinate, described low 24
Data include the apex coordinate a bit sign position and 23 mantissa parts;
Sequencing unit, for respectively being arranged the high eight-bit data and low 20 four figures simultaneously according to by preset order
High eight-bit data and low 20 four figures evidence after memory sequencing;
Computing unit, for calculating and removing N using first index value in three-dimensional modeling data to be compressed as a reference value
The outer offset relative to the N-1 index value of a index value, wherein the index value is integer type, and n-th index value is opposite
In offset=N-1 index value of n-th index value-the of the N-1 index value, N >=2;
Coding unit, for by the split cells, sequencing unit and computing unit treated three-dimensional to be compressed
Model data carries out LZMA coding.
Preferably, the sequencing unit is also used to:
By the X-coordinate value, Y axis coordinate value and Z axis coordinate value of apex coordinate each in three-dimensional modeling data to be compressed by described
Preset order is arranged.
Preferably, the step sequencing unit is also used to:
The X-coordinate value, Y axis coordinate value and Z axis coordinate value of normal vector coordinate each in three-dimensional modeling data to be compressed are pressed into institute
Preset order is stated to be arranged;
The split cells is also used to:
The normal vector coordinate of floating type each in three-dimensional modeling data to be compressed is split as high eight-bit data and low 24
Position data, wherein the high eight-bit data include the sign bit and exponent bits of the normal vector coordinate, the low 20 four figures evidence
Mantissa part including the normal vector coordinate.
Preferably, the sequencing unit is also used to:
The X-coordinate value of mapping coordinates each in three-dimensional modeling data to be compressed, Y axis coordinate value are carried out by the preset order
Arrangement;
The split cells is also used to:
The mapping coordinates of floating type each in three-dimensional modeling data to be compressed are split as high eight-bit data and 24 low
Data, wherein the high eight-bit data include the sign bit and exponent bits of the mapping coordinates, the low 20 four figures evidence includes
The mantissa part of the mapping coordinates.
Preferably, the sequencing unit is specifically used for:
The high eight-bit data of each apex coordinate and low 20 four figures are arranged and stored according to by preset order respectively
High eight-bit data and low 20 four figures evidence after sequence;Respectively by high eight-bit data of each normal vector coordinate and 24 low
Data arrange by preset order and high eight-bit data and low 20 four figures evidence after memory sequencing;Each textures are sat respectively
Target high eight-bit data and low 20 four figures are according to arrange by preset order and high eight-bit data after memory sequencing and low
20 four figures evidences;
The preset order specifically: the high eight-bit data of each apex coordinate, the high eight-bit data of each normal vector coordinate, each
High eight-bit data, low 20 four figures evidence, the low 20 four figures evidence of each normal vector coordinate of each apex coordinate of mapping coordinates
The low 20 four figures evidence with each mapping coordinates.
The invention adopts the above technical scheme, at least have it is following the utility model has the advantages that
1, because LZMA coding is a kind of lossless compression algorithm based on dictionary, " sliding window ", LZMA algorithm includes one
A dynamic window and a pre-read buffer are found and most matched character string in pre-read buffer, record in dynamic window
Distance and the length of character string that is matched to of this character string being matched to current character, and with its character late one
It rises and exports as a result.And this three-dimensional modeling data compression method provided by the invention and system, by by three-dimensional to be compressed
Each coordinate data in model data splits into high eight-bit data and low 20 four figures evidence, high eight-bit data include sign bit and
Exponent bits, low 20 four figures according to including mantissa part, and the high eight-bit data of each coordinate be all much it is identical, each coordinate
Low 20 four figures evidence is much and identical, therefore, after coordinate data is split, equivalent to increase threedimensional model number to be compressed
The similar proportion of each data in improves the compression factor of LZMA coding.
2, due to this three-dimensional modeling data compression method provided by the invention and system, respectively by high eight-bit data and low
20 four figures are the equal of coming approximate data as far as possible together, improve LZMA according to being arranged by preset order
The compression speed of coding.
Detailed description of the invention
Fig. 1 is a kind of flow diagram for three-dimensional modeling data compression method that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides a kind of three-dimensional modeling data compressibility schematic block diagram.
Specific embodiment
Below by drawings and examples, technical scheme of the present invention will be described in further detail.
Referring to Fig. 1, a kind of three-dimensional modeling data compression method of one embodiment of the invention offer, comprising:
Step S1, the apex coordinate of floating type each in three-dimensional modeling data to be compressed is split as high eight-bit data and low two
Ten four figures evidences, wherein the high eight-bit data include eight exponent bits of the apex coordinate, low 20 four figures is according to packet
Include the apex coordinate a bit sign position and 23 mantissa parts;
Step S2, respectively by the high eight-bit data and low 20 four figures according to being arranged by preset order and the row of storage
High eight-bit data and low 20 four figures evidence after sequence;
Step S3, it using first index value in three-dimensional modeling data to be compressed as a reference value, calculates except n-th indexes
The outer offset relative to the N-1 index value of value, wherein the index value is integer type, and n-th index value is relative to N-
The offset of the 1 index value=N-1 index value of n-th index value-the, N >=2;
Step S4, to by step S1~S3, treated that three-dimensional modeling data to be compressed carries out LZMA coding.
Wherein step S1 specifically: the apex coordinate of floating type each in three-dimensional modeling data to be compressed is split as X-axis and is sat
The high eight-bit data of scale value, the low 20 four figures evidence of X axis coordinate value, the high eight-bit data of Y axis coordinate value, Y axis coordinate value
Low 20 four figures evidence, the low 20 four figures evidence of the high eight-bit data of Z axis coordinate value and Z axis coordinate value, wherein described high by eight
Position data include sign bit and exponent bits, and low 20 four figures is according to including mantissa part;
Step S2 specifically: by preset order (such as: the high eight-bit of the high eight-bit data of X axis coordinate value, Y axis coordinate value
Low 20 four figures of data, the high eight-bit data of Z axis coordinate value, the low 20 four figures evidence of X axis coordinate value, Y axis coordinate value
According to 20 four figures evidence low with Z axis coordinate value), by the high eight-bit data of each apex coordinate and low 20 four figures according to respectively into
High eight-bit data and low 20 four figures evidence after row arrangement and memory sequencing.
This three-dimensional modeling data compression method provided to facilitate the understanding of the present invention, is now exemplified below:
Assuming that each apex coordinate puts in order in former three-dimensional modeling data are as follows:
x1、y1、z1、x2、y2、z2……xn、yn、zn, wherein xnIndicate the X axis coordinate value of n-th of apex coordinate, ynIt indicates
The Y axis coordinate value of n-th of apex coordinate, znIndicate the Z axis coordinate value of n-th of apex coordinate, n >=3.
It is provided by the invention that each apex coordinate is split as the row of high eight-bit data and low 20 four figures after
Column sequence includes but is not limited to five kinds of situations set forth below:
The first:
x1High eight-bit data, x2High eight-bit data, x3High eight-bit data ... xnHigh eight-bit data,
y1High eight-bit data, y2High eight-bit data, y3High eight-bit data ... ynHigh eight-bit data,
z1High eight-bit data, z2High eight-bit data, z3High eight-bit data ... znHigh eight-bit data;
x1Low 20 four figures according to, x2Low 20 four figures according to, x3Low 20 four figures evidence ... xnLow 20
Four figures evidence,
y1Low 20 four figures according to, y2Low 20 four figures according to, y3Low 20 four figures evidence ... ynLow 20
Four figures evidence,
z1Low 20 four figures according to, z2Low 20 four figures according to, z3Low 20 four figures evidence ... znLow 20
Four figures evidence.
Second:
y1High eight-bit data, y2High eight-bit data, y3High eight-bit data ... ynHigh eight-bit data,
x1High eight-bit data, x2High eight-bit data, x3High eight-bit data ... xnHigh eight-bit data,
z1High eight-bit data, z2High eight-bit data, z3High eight-bit data ... znHigh eight-bit data;
y1Low 20 four figures according to, y2Low 20 four figures according to, y3Low 20 four figures evidence ... ynLow 20
Four figures evidence,
x1Low 20 four figures according to, x2Low 20 four figures according to, x3Low 20 four figures evidence ... xnLow 20
Four figures evidence,
z1Low 20 four figures according to, z2Low 20 four figures according to, z3Low 20 four figures evidence ... znLow 20
Four figures evidence.
The third:
z1High eight-bit data, z2High eight-bit data, z3High eight-bit data ... znHigh eight-bit data;
y1High eight-bit data, y2High eight-bit data, y3High eight-bit data ... ynHigh eight-bit data,
x1High eight-bit data, x2High eight-bit data, x3High eight-bit data ... xnHigh eight-bit data,
z1Low 20 four figures according to, z2Low 20 four figures according to, z3Low 20 four figures evidence ... znLow 20
Four figures evidence,
y1Low 20 four figures according to, y2Low 20 four figures according to, y3Low 20 four figures evidence ... ynLow 20
Four figures evidence,
x1Low 20 four figures according to, x2Low 20 four figures according to, x3Low 20 four figures evidence ... xnLow 20
Four figures evidence.
4th kind:
x1High eight-bit data, y1High eight-bit data, z1High eight-bit data,
x2High eight-bit data, y2High eight-bit data, z2High eight-bit data,
x3High eight-bit data, y3High eight-bit data, z3High eight-bit data,
………………
xnHigh eight-bit data, ynHigh eight-bit data, znHigh eight-bit data;
x1Low 20 four figures according to, y1Low 20 four figures according to, z1Low 20 four figures according to,
x2Low 20 four figures according to, y2Low 20 four figures according to, z2Low 20 four figures according to,
x3Low 20 four figures according to, y3Low 20 four figures according to, z3Low 20 four figures according to,
………………
xnLow 20 four figures according to, ynLow 20 four figures according to, znLow 20 four figures evidence.
5th kind:
z1High eight-bit data, x1High eight-bit data, y1High eight-bit data,
z2High eight-bit data, x2High eight-bit data, y2High eight-bit data,
z3High eight-bit data, x3High eight-bit data, y3High eight-bit data,
………………
znHigh eight-bit data, xnHigh eight-bit data, ynHigh eight-bit data;
z1Low 20 four figures according to, x1Low 20 four figures according to, y1Low 20 four figures according to,
z2Low 20 four figures according to, x2Low 20 four figures according to, y2Low 20 four figures according to,
z3Low 20 four figures according to, x3Low 20 four figures according to, y3Low 20 four figures according to,
………………
znLow 20 four figures according to, xnLow 20 four figures according to, ynLow 20 four figures evidence.
It should be noted that five kinds of arranging situations of above listed apex coordinate are only to facilitate understand that the present invention mentions
This three-dimensional data compression method that supplies and a kind of specific example for providing, do not limit apex coordinate of the invention only have it is above-mentioned
Five kinds of arranging situations, together, low 20 four figures is according to arrangement for any apex coordinate high eight-bit data arrangement by after fractionation
Arrangement mode together belongs to protection scope of the present invention.
After each apex coordinate is split, stored by the mode as listed by following table one:
Data type | Data name length | Name data section | Data content length | Pieces of content data |
Table one
Wherein, " data type " accounts for 4, the data type of the data content for identifying storage, such as mark storage
It is real-coded GA that data type, which is 32,;
" name data section " is used to identify the data name of storage, for example mark storage is the most-significant byte number of apex coordinate
According to;
" data name length " accounts for 4, the length of " name data section " for identifying storage, value range 0~128;
" pieces of content data " is used to identify the data content of storage, for example mark storage is the most-significant byte number of apex coordinate
According to -24;
" data content length " is used to store the length of " pieces of content data ", if the content stored in " pieces of content data "
Data are real-coded GA, then with 4 byte representations " data content length ", " data content length " is equal to " pieces of content data " institute
Occupy-place number * 4.
Wherein, " data content length " specific representation method is as follows:
Each byte takes last 1 to be used as end of identification position, and end of identification position is 1, and expression takes latter one byte again, directly
It is 0 to end of identification position, the accumulative length for being expressed as " pieces of content data " of the number obtained before.
Citing: 1,111 1111,1,011 1110
First last position of number is 1, and end of identification position is that 1 expression takes latter one byte again, and 10111110 terminate mark
Knowing position is 0, indicates to terminate, then the actual value of " data content length " is exactly:
Several high 7 1111111+1011111 of first several high 7+the second, it may be assumed that 11111111011111.
It is understood that because LZMA coding is a kind of lossless compression algorithm based on dictionary, " sliding window ", LZMA
Algorithm includes a dynamic window and a pre-read buffer, is found in dynamic window and most matched word in pre-read buffer
Symbol string, record character string that this is matched to the distance of current character and the character string being matched to length, and under it
One character is exported together as result.And this three-dimensional modeling data compression method provided by the invention, by will be to be compressed
Each coordinate data in three-dimensional modeling data splits into high eight-bit data and low 20 four figures evidence, and high eight-bit data include symbol
Position and exponent bits, low 20 four figures evidence includes mantissa part, and the high eight-bit data of each coordinate are all much identical, each seats
The low 20 four figures evidence of target is much and identical, therefore, after coordinate data is split, equivalent to increase three-dimensional mould to be compressed
The similar proportion of each data in type data improves the compression factor of LZMA coding.
In addition, due to this three-dimensional modeling data compression method provided by the invention, respectively by high eight-bit data and low two
Ten four figures are the equal of coming approximate data together as far as possible according to being arranged by preset order, improve LZMA volume
The compression speed of code.
It preferably, further include step S0 before the step S1: by the X of apex coordinate each in three-dimensional modeling data to be compressed
Coordinate value, Y axis coordinate value and Z axis coordinate value are arranged by the preset order.
It is understood that this three-dimensional modeling data compression method provided by the invention, split again using first sorting
The subsequent high eight-bit data by after fractionation and low 20 four figures can be improved according to arranging respectively by preset order in method
Speed.For example, if split after expect it is above-mentioned the first put in order, can before fractionation, first by each apex coordinate press x1、
y1、z1、x2、y2、z2……xn、yn、znSequence arranged;It, can be with if expecting above-mentioned second and putting in order after splitting
Before fractionation, each apex coordinate is first pressed into y1、x1、z1、y2、x2、z2……yn、xn、znSequence arranged;If after splitting
Expect that above-mentioned the third puts in order, each apex coordinate first can be pressed into z before fractionation1、y1、x1、z2、y2、x2……zn、
yn、xnSequence arranged.
Preferably, the step S0 further includes attached not shown in the figure:
The X-coordinate value, Y axis coordinate value and Z axis coordinate value of normal vector coordinate each in three-dimensional modeling data to be compressed are pressed into institute
Preset order is stated to be arranged;
The step S1 further includes attached not shown in the figure:
The normal vector coordinate of floating type each in three-dimensional modeling data to be compressed is split as high eight-bit data and low 24
Position data, wherein the high eight-bit data include the sign bit and exponent bits of the normal vector coordinate, the low 20 four figures evidence
Mantissa part including the normal vector coordinate.
It is understood that by each apex coordinate be split as high eight-bit data and low 20 four figures according to while, will be each
Normal vector coordinate is split as high eight-bit data and low 20 four figures evidence, is equivalent to and further increases threedimensional model number to be compressed
The similar proportion of each data in further improves the compression factor of LZMA coding.
Preferably, the step S0 further includes attached not shown in the figure:
The X-coordinate value of mapping coordinates each in three-dimensional modeling data to be compressed, Y axis coordinate value are carried out by the preset order
Arrangement;
The step S1 further includes attached not shown in the figure:
The mapping coordinates of floating type each in three-dimensional modeling data to be compressed are split as high eight-bit data and 24 low
Data, wherein the high eight-bit data include the sign bit and exponent bits of the mapping coordinates, the low 20 four figures evidence includes
The mantissa part of the mapping coordinates.
It is understood that each apex coordinate, normal vector coordinate are split as high eight-bit data and low 20 four figures evidence
While, each mapping coordinates are split as high eight-bit data and low 20 four figures evidence, be equivalent to further increase it is to be compressed
The similar proportion of each data in three-dimensional modeling data further improves the compression factor of LZMA coding.
Preferably, the step S2 is specifically included:
The high eight-bit data of each apex coordinate and low 20 four figures are arranged and stored according to by preset order respectively
High eight-bit data and low 20 four figures evidence after sequence;Respectively by high eight-bit data of each normal vector coordinate and 24 low
Data arrange by preset order and high eight-bit data and low 20 four figures evidence after memory sequencing;Each textures are sat respectively
Target high eight-bit data and low 20 four figures are according to arrange by preset order and high eight-bit data after memory sequencing and low
20 four figures evidences;
The preset order specifically: the high eight-bit data of each apex coordinate, the high eight-bit data of each normal vector coordinate, each
High eight-bit data, low 20 four figures evidence, the low 20 four figures evidence of each normal vector coordinate of each apex coordinate of mapping coordinates
The low 20 four figures evidence with each mapping coordinates.
For example, it is assumed that each apex coordinate puts in order in former three-dimensional modeling data are as follows:
x1、y1、z1、x2、y2、z2……xn、yn、zn;Wherein, xnIndicate the X axis coordinate value of n-th of apex coordinate, ynIt indicates
The Y axis coordinate value of n-th of apex coordinate, znIndicate the Z axis coordinate value of n-th of apex coordinate.
Each normal vector coordinate puts in order in former three-dimensional modeling data are as follows:
vx1、vy1、vz1、vx2、vy2、vz2、vx3、vy3、vz3……vxn、vyn、vzn;Wherein, vxnIndicate n-th of normal vector coordinate
X axis coordinate value, vynIndicate the Y axis coordinate value of n-th of normal vector coordinate, vznIndicate the Z axis coordinate of n-th of normal vector coordinate
Value.
Mapping coordinates puts in order in former three-dimensional modeling data are as follows:
Tx1、Ty1、Tx2、Ty2、Tx3、Ty3……Txn、Tyn;Wherein, TxnIndicate the X axis coordinate value of n-th of mapping coordinates, Tyn
Indicate the Y axis coordinate value of n-th of mapping coordinates.
The preset order specifically: the high eight-bit data of each apex coordinate, the high eight-bit data of each normal vector coordinate, each
High eight-bit data, low 20 four figures evidence, the low 20 four figures evidence of each normal vector coordinate of each apex coordinate of mapping coordinates
The low 20 four figures evidence with each mapping coordinates, including but not limited to set forth below this to put in order:
x1High eight-bit data, x2High eight-bit data, x3High eight-bit data ... xnHigh eight-bit data,
y1High eight-bit data, y2High eight-bit data, y3High eight-bit data ... ynHigh eight-bit data,
z1High eight-bit data, z2High eight-bit data, z3High eight-bit data ... znHigh eight-bit data;
vx1High eight-bit data, vx2High eight-bit data, vx3High eight-bit data ... vxnHigh eight-bit data,
vy1High eight-bit data, vy2High eight-bit data, vy3High eight-bit data ... vynHigh eight-bit data,
vz1High eight-bit data, vz2High eight-bit data, vz3High eight-bit data ... vznHigh eight-bit data;
Tx1High eight-bit data, Tx2High eight-bit data, Tx3High eight-bit data ... TxnHigh eight-bit data,
Ty1High eight-bit data, Ty2High eight-bit data, Ty3High eight-bit data ... TynHigh eight-bit data;
x1Low 20 four figures according to, x2Low 20 four figures according to, x3Low 20 four figures evidence ... xnLow 20
Four figures evidence,
y1Low 20 four figures according to, y2Low 20 four figures according to, y3Low 20 four figures evidence ... ynLow 20
Four figures evidence,
z1Low 20 four figures according to, z2Low 20 four figures according to, z3Low 20 four figures evidence ... znLow 20
Four figures evidence;
vx1Low 20 four figures according to, vx2Low 20 four figures according to, vx3Low 20 four figures evidence ... vxnLow two
Ten four figures evidences,
vy1Low 20 four figures according to, vy2Low 20 four figures according to, vy3Low 20 four figures evidence ... vynLow two
Ten four figures evidences,
vz1Low 20 four figures according to, vz2Low 20 four figures according to, vz3Low 20 four figures evidence ... vznLow two
Ten four figures evidences;
Tx1Low 20 four figures according to, Tx2Low 20 four figures according to, Tx3Low 20 four figures evidence ... TxnLow two
Ten four figures evidences,
Ty1Low 20 four figures according to, Ty2Low 20 four figures according to, Ty3Low 20 four figures evidence ... TynLow two
Ten four figures evidences.
In addition, a kind of three-dimensional modeling data compressibility 100, comprising:
Split cells 101, for the apex coordinate of floating type each in three-dimensional modeling data to be compressed to be split as high eight-bit
Data and low 20 four figures evidence, wherein the high eight-bit data include eight exponent bits of the apex coordinate, described low 20
Four figures is according to the bit sign position and 23 mantissa parts for including the apex coordinate;
Sequencing unit 102, for respectively arranging the high eight-bit data and low 20 four figures according to by preset order
High eight-bit data and low 20 four figures evidence after arranging simultaneously memory sequencing;
Computing unit 103, for using first index value in three-dimensional modeling data to be compressed as a reference value, calculating to be removed
The outer offset relative to the N-1 index value of n-th index value, wherein the index value is integer type, n-th index value
Relative to offset=N-1 index value of n-th index value-the of the N-1 index value, N >=2;
Coding unit 104, for treated to be compressed three by the split cells, sequencing unit and computing unit
Dimension module data carry out LZMA coding.
As shown from the above technical solution, this three-dimensional modeling data compressibility provided by the invention, split cells pass through
Each coordinate data in three-dimensional modeling data to be compressed is split into high eight-bit data and low 20 four figures evidence, high eight-bit data
Including sign bit and exponent bits, low 20 four figures evidence includes mantissa part, and the high eight-bit data of each coordinate are all much phases
With, low 20 four figures of each coordinate according to be much also it is identical, therefore, after coordinate data is split, equivalent to increase to
The similar proportion of each data in compress three-dimensional model data improves the compression factor of LZMA coding.
In addition, due to this three-dimensional modeling data compressibility provided by the invention, sequencing unit is respectively by high eight-bit number
, according to being arranged by preset order, be the equal of coming approximate data as far as possible together, improve according to low 20 four figures
The compression speed of LZMA coding.
Preferably, the sequencing unit 102 is also used to:
By the X-coordinate value, Y axis coordinate value and Z axis coordinate value of apex coordinate each in three-dimensional modeling data to be compressed by described
Preset order is arranged.
Preferably, the sequencing unit 102 is also used to:
The X-coordinate value, Y axis coordinate value and Z axis coordinate value of normal vector coordinate each in three-dimensional modeling data to be compressed are pressed into institute
Preset order is stated to be arranged;
The split cells 101 is also used to:
The normal vector coordinate of floating type each in three-dimensional modeling data to be compressed is split as high eight-bit data and low 24
Position data, wherein the high eight-bit data include the sign bit and exponent bits of the normal vector coordinate, the low 20 four figures evidence
Mantissa part including the normal vector coordinate.
Preferably, the sequencing unit 102 is also used to:
The X-coordinate value of mapping coordinates each in three-dimensional modeling data to be compressed, Y axis coordinate value are carried out by the preset order
Arrangement;
The split cells 101 is also used to:
The mapping coordinates of floating type each in three-dimensional modeling data to be compressed are split as high eight-bit data and 24 low
Data, wherein the high eight-bit data include the sign bit and exponent bits of the mapping coordinates, the low 20 four figures evidence includes
The mantissa part of the mapping coordinates.
Preferably, the sequencing unit 102 is specifically used for:
The high eight-bit data of each apex coordinate and low 20 four figures are arranged and stored according to by preset order respectively
High eight-bit data and low 20 four figures evidence after sequence;Respectively by high eight-bit data of each normal vector coordinate and 24 low
Data arrange by preset order and high eight-bit data and low 20 four figures evidence after memory sequencing;Each textures are sat respectively
Target high eight-bit data and low 20 four figures are according to arrange by preset order and high eight-bit data after memory sequencing and low
20 four figures evidences;
The preset order specifically: the high eight-bit data of each apex coordinate, the high eight-bit data of each normal vector coordinate, each
High eight-bit data, low 20 four figures evidence, the low 20 four figures evidence of each normal vector coordinate of each apex coordinate of mapping coordinates
The low 20 four figures evidence with each mapping coordinates.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects
It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention
Protection scope, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should all include
Within protection scope of the present invention.Term " first ", " second " are used for description purposes only, and are not understood to indicate or imply
Relative importance.
Claims (10)
1. a kind of three-dimensional modeling data compression method characterized by comprising
Step S1, the apex coordinate of floating type each in three-dimensional modeling data to be compressed is split as high eight-bit data and low 24
Position data, wherein the high eight-bit data include eight exponent bits of the apex coordinate, low 20 four figures is according to including being somebody's turn to do
First sign bit and 23 mantissa parts for apex coordinate;
Step S2, after respectively by the high eight-bit data and low 20 four figures according to simultaneously memory sequencing arrange by preset order
High eight-bit data and low 20 four figures evidence;
Step S3, it using first index value in three-dimensional modeling data to be compressed as a reference value, calculates in addition to n-th index value
Offset relative to the N-1 index value, wherein the index value is integer type, and n-th index value is relative to N-1
The offset of the index value=N-1 index value of n-th index value-the, N >=2;
Step S4, to by step S1~S3, treated that three-dimensional modeling data to be compressed carries out LZMA coding.
2. three-dimensional modeling data compression method according to claim 1, which is characterized in that further include before the step S1
Step S0: by the X-coordinate value, Y axis coordinate value and Z axis coordinate value of apex coordinate each in three-dimensional modeling data to be compressed by described pre-
If sequence is arranged.
3. three-dimensional modeling data compression method according to claim 2, which is characterized in that the step S0 further include:
By the X-coordinate value, Y axis coordinate value and Z axis coordinate value of normal vector coordinate each in three-dimensional modeling data to be compressed by described pre-
If sequence is arranged;
The step S1 further include:
The normal vector coordinate of floating type each in three-dimensional modeling data to be compressed is split as high eight-bit data and low 20 four figures
According to wherein the high eight-bit data include the second sign bit and exponent bits of the normal vector coordinate, the low 20 four figures evidence
Mantissa part including the normal vector coordinate.
4. three-dimensional modeling data compression method according to claim 3, which is characterized in that the step S0 further include:
The X-coordinate value of mapping coordinates each in three-dimensional modeling data to be compressed, Y axis coordinate value are arranged by the preset order
Column;
The step S1 further include:
The mapping coordinates of floating type each in three-dimensional modeling data to be compressed are split as high eight-bit data and low 20 four figures evidence,
Wherein the high eight-bit data include the third sign bit and exponent bits of the mapping coordinates, and low 20 four figures is according to including being somebody's turn to do
The mantissa part of mapping coordinates.
5. three-dimensional modeling data compression method according to claim 4, which is characterized in that the step S2 is specifically included:
The high eight-bit data of each apex coordinate and low 20 four figures arrange simultaneously memory sequencing according to by preset order respectively
High eight-bit data and low 20 four figures evidence afterwards;Respectively by the high eight-bit data of each normal vector coordinate and low 20 four figures evidence
High eight-bit data and low 20 four figures evidence after arrange by preset order simultaneously memory sequencing;Respectively by each mapping coordinates
High eight-bit data and low 20 four figures are according to the high eight-bit data and low 20 for arrange by preset order and after memory sequencing
Four figures evidence;
The preset order specifically: the high eight-bit data of each apex coordinate, the high eight-bit data of each normal vector coordinate, each textures
The high eight-bit data of coordinate, each apex coordinate low 20 four figures according to the low 20 four figures evidence of, each normal vector coordinate and each
The low 20 four figures evidence of mapping coordinates.
6. a kind of three-dimensional modeling data compressibility characterized by comprising
Split cells, for the apex coordinate of floating type each in three-dimensional modeling data to be compressed to be split as high eight-bit data and low
20 four figures evidences, wherein the high eight-bit data include eight exponent bits of the apex coordinate, the low 20 four figures evidence
First sign bit and 23 mantissa parts including the apex coordinate;
Sequencing unit, for the high eight-bit data and low 20 four figures to be arranged and stored according to by preset order respectively
High eight-bit data and low 20 four figures evidence after sequence;
Computing unit, for calculating and removing n-th rope using first index value in three-dimensional modeling data to be compressed as a reference value
Draw the outer offset relative to the N-1 index value of value, wherein the index value is integer type, and n-th index value is relative to the
The offset of the N-1 index value=N-1 index value of n-th index value-the, N >=2;
Coding unit, for by the split cells, sequencing unit and computing unit treated threedimensional model to be compressed
Data carry out LZMA coding.
7. three-dimensional modeling data compressibility according to claim 6, which is characterized in that the sequencing unit is also used to:
By the X-coordinate value, Y axis coordinate value and Z axis coordinate value of apex coordinate each in three-dimensional modeling data to be compressed by described default
Sequence is arranged.
8. three-dimensional modeling data compressibility according to claim 7, which is characterized in that the sequencing unit is also used to:
By the X-coordinate value, Y axis coordinate value and Z axis coordinate value of normal vector coordinate each in three-dimensional modeling data to be compressed by described pre-
If sequence is arranged;
The split cells is also used to:
The normal vector coordinate of floating type each in three-dimensional modeling data to be compressed is split as high eight-bit data and low 20 four figures
According to wherein the high eight-bit data include the second sign bit and exponent bits of the normal vector coordinate, the low 20 four figures evidence
Mantissa part including the normal vector coordinate.
9. three-dimensional modeling data compressibility according to claim 8, which is characterized in that the sequencing unit is also used to:
The X-coordinate value of mapping coordinates each in three-dimensional modeling data to be compressed, Y axis coordinate value are arranged by the preset order
Column;
The split cells is also used to:
The mapping coordinates of floating type each in three-dimensional modeling data to be compressed are split as high eight-bit data and low 20 four figures evidence,
Wherein the high eight-bit data include the third sign bit and exponent bits of the mapping coordinates, and low 20 four figures is according to including being somebody's turn to do
The mantissa part of mapping coordinates.
10. three-dimensional modeling data compressibility according to claim 9, which is characterized in that the sequencing unit is specifically used
In:
The high eight-bit data of each apex coordinate and low 20 four figures arrange simultaneously memory sequencing according to by preset order respectively
High eight-bit data and low 20 four figures evidence afterwards;Respectively by the high eight-bit data of each normal vector coordinate and low 20 four figures evidence
High eight-bit data and low 20 four figures evidence after arrange by preset order simultaneously memory sequencing;Respectively by each mapping coordinates
High eight-bit data and low 20 four figures are according to the high eight-bit data and low 20 for arrange by preset order and after memory sequencing
Four figures evidence;
The preset order specifically: the high eight-bit data of each apex coordinate, the high eight-bit data of each normal vector coordinate, each textures
The high eight-bit data of coordinate, each apex coordinate low 20 four figures according to the low 20 four figures evidence of, each normal vector coordinate and each
The low 20 four figures evidence of mapping coordinates.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610240410.2A CN105931279B (en) | 2016-04-18 | 2016-04-18 | A kind of three-dimensional modeling data compression method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610240410.2A CN105931279B (en) | 2016-04-18 | 2016-04-18 | A kind of three-dimensional modeling data compression method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105931279A CN105931279A (en) | 2016-09-07 |
CN105931279B true CN105931279B (en) | 2019-01-29 |
Family
ID=56838394
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610240410.2A Active CN105931279B (en) | 2016-04-18 | 2016-04-18 | A kind of three-dimensional modeling data compression method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105931279B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108122189B (en) * | 2016-11-29 | 2021-11-30 | 三星电子株式会社 | Vertex attribute compression and decompression in hardware |
CN111324678B (en) * | 2018-12-14 | 2024-05-17 | 北京京东尚科信息技术有限公司 | Data processing method, apparatus and computer readable storage medium |
CN111324587A (en) * | 2018-12-14 | 2020-06-23 | 北京京东尚科信息技术有限公司 | Compression method, analysis method and system for data of OBJ file |
CN115222930B (en) * | 2022-09-02 | 2022-11-29 | 四川蜀天信息技术有限公司 | WebGL-based 3D model arrangement and combination method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102255873A (en) * | 2010-05-21 | 2011-11-23 | 南京师范大学 | Method for high efficient transmission of vector data on the basis of pixel non-destructive compression of ordered point set |
WO2015087217A1 (en) * | 2013-12-12 | 2015-06-18 | Koninklijke Philips N.V. | Real-time fusion of anatomical ultrasound information and radiation delivery information for radiation therapies |
-
2016
- 2016-04-18 CN CN201610240410.2A patent/CN105931279B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102255873A (en) * | 2010-05-21 | 2011-11-23 | 南京师范大学 | Method for high efficient transmission of vector data on the basis of pixel non-destructive compression of ordered point set |
WO2015087217A1 (en) * | 2013-12-12 | 2015-06-18 | Koninklijke Philips N.V. | Real-time fusion of anatomical ultrasound information and radiation delivery information for radiation therapies |
Non-Patent Citations (1)
Title |
---|
结合压缩编码的图像选择加密研究;屈晋宇;《中国优秀硕士学位论文全文数据库 信息科技辑》;20150115;第I138-81页 |
Also Published As
Publication number | Publication date |
---|---|
CN105931279A (en) | 2016-09-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105931279B (en) | A kind of three-dimensional modeling data compression method and system | |
US20230245372A1 (en) | Random Accessible Lossless Parameter Data Compression for Tile Based 3D Computer Graphics Systems | |
CN102457283B (en) | A kind of data compression, decompression method and equipment | |
CN103345496B (en) | multimedia information retrieval method and system | |
WO2011007956A4 (en) | Data compression method | |
CN111339599B (en) | Conversion method from BIM model to GIS model | |
CN104869397B (en) | A kind of adaptive Interval Coding method and coding/decoding method based on SLWE probability Estimation models | |
CN102521299B (en) | Method for processing data of resource description framework | |
CN109190759A (en) | Neural network model compression and accelerated method of the one kind based on { -1 ,+1 } coding | |
CN103746705A (en) | Method for compressing vector data | |
CN105528345A (en) | Terminal, server and character complementing method | |
CN103455434B (en) | A kind of method and system setting up CACHE DIRECTORY | |
CN107911570A (en) | A kind of method for being compressed and decompressing to picture feature | |
CN103975593B (en) | The method and apparatus for being compressed based on threedimensional model and generating the bit stream of repetitive structure discovery | |
CN105320609A (en) | Mobile terminal based data storage method and system | |
CN103489268B (en) | A kind of Arabic display packing for POS platform | |
CN104424163B (en) | Literal processing method and system | |
CN105023021A (en) | Characteristic matching method based on principal direction template | |
CN105653506A (en) | Method and device for processing texts in GPU on basis of character encoding conversion | |
CN103729864A (en) | Compression storage method and system for three-dimensional model | |
CN101957837B (en) | Method for accessing stroke vector font | |
CN111130554B (en) | File compression method and device, electronic equipment and readable storage medium | |
CN110021349B (en) | Method for encoding gene data | |
Li et al. | A human-computer interactive dynamic description method for Jiaguwen Characters | |
CN111428509B (en) | Latin letter-based Uygur language processing method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |