This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2016-205371 filed Oct. 19, 2016.
The present invention relates to a data processing apparatus, a three-dimensional object creating system, and a non-transitory computer readable medium.
Conventionally, three-dimensional object creating apparatuses, so-called 3D printers have been proposed. In three-dimensional object creation using a 3D printer, a technique of accepting, as input data, data (e.g., polygon data) defining, for each specific surface region, a shape of a created object and a color of a surface of the created object, converting the accepted data into voxel data that is a data format processable in the object creating apparatus, and then creating the object on the basis of the voxel data is generally known.
In cases where an object creating apparatus that is capable of outputting plural coloring materials is used, a color three-dimensional object can be created on the basis of color voxel data in which color information is allocated to each voxel.
In generation of color voxel data from input data, halftoning processing is sometimes performed on an object surface. This means that the strength of a color of the input data is expressed by the size of a colored region on an object surface (a ratio of voxels to which a chromatic color is allocated to surface voxels). In this case, as for inner voxels that are not located on the object surface, the same color information as corresponding surface voxels is allocated to inner voxels located within a certain distance (depth) from the surface voxels toward the inner side of the object irrespective of the strength of the color of the input data.
However, in generation of color voxel data from input data indicative of a color three-dimensional object, in cases where the same color information as surface voxels is uniformly allocated to inner voxels located within a certain depth from the surface voxels irrespective of the strength of the color of the input data, the strength of the color of the input data can be expressed only by a ratio of colored voxels to the surface voxels. This limits color reproducibility of an obtained three-dimensional object.
According to an aspect of the invention, there is provided a data processing apparatus including an accepting unit that accepts first data defining, for each specific surface region, a shape of a three-dimensional object and a color of a surface of the three-dimensional object; and a generating unit that generates color voxel data from polygon data that constitute the accepted first data, the generating unit generating the color voxel data so that color information indicative of presence of a color is given to inner voxels within a larger depth from a surface voxel in a region of the first data where a density of the color of the surface is higher than in a region of the first data where the density of the color of the surface is lower.
An exemplary embodiment of the present invention will be described in detail based on the following figures, wherein:
An exemplary embodiment of the present invention is described below with reference to the drawings. Terms used herein are defined as follows.
A “voxel” refers to a small cube that is a minimum unit in expression of a three-dimensional object. A voxel corresponds to a pixel of a two-dimensional image. A three-dimensional object can be visualized by combining voxels. Therefore, when a three-dimensional object is created by an object creating apparatus, the three-dimensional object is generally created on the basis of data describing the object to be created as a group of voxels. As in the case of pixels of a two-dimensional image, an object can be colored for each voxel by allocating color information to each voxel.
“Voxel data” refers to data describing an object to be created as a group of voxels.
“Color voxel data” refers to voxel data in which color information is allocated to each voxel.
A “surface voxel” refers to a voxel that is located on a surface of a three-dimensional object among all voxels that constitute the three-dimensional object.
An “inner voxel” refers to a voxel that is not located on a surface of a created object among all voxels that constitute the created object.
“Color” refers to a chromatic color and an achromatic color of low brightness (e.g., other than white and transparent).
“Colorless” refers to an achromatic color of high brightness (e.g., white and transparent).
Some full-color 3D printers can eject ink of only a single color to a single pixel or voxel (a regular grid unit in a three-dimensional space) only in a constant amount. Although a full-color 2D printer can express Blue 100% by outputting Cyan 100% and Magenta 100%, for example, when Blue 100% is input, such a full-color 3D printer outputs Cyan 50% and Magenta 50% at a volume ratio and therefore obtains substantially Blue 50%.
When the input data is Cyan 100%, both of the full-color 2D printer and the full-color 3D printer can achieve Cyan 100% as output data. The same applies to a case where the input data is, for example, magenta.
Meanwhile, in cases where the input data is Blue 100%, the full-color 2D printer can output Blue 100%, but the full-color 3D printer outputs substantially 50%, which is paler than in the cases where a single-color is used.
Although a multi-color can be made stronger by increasing the number of colored layers, a single-color is also made stronger, and therefore a difference in color strength between the single-color and the multi-color is not addressed. The present exemplary embodiment addresses especially such a problem.
The data processing apparatus 10 receives three-dimensional object data (3D data), performs predetermined processing on the three-dimensional object data, and then supplies the three-dimensional object data to the three-dimensional object creating apparatus 12 over the communication network 14. The data processing apparatus 10 includes an accepting unit and a generating unit. Specifically, the data processing apparatus 10 includes a CPU 101, a program memory 102 such as a ROM, an SSD, or an HDD, a working memory 103 such as a RAM, an input/output interface (I/F) 104 for input to and output from a keyboard, a mouse, an optical disc such as a CD-ROM, a semiconductor memory such as a USB memory or an SD card, a display, and the like, a communication interface (I/F) 105 for communication with external apparatuses including the three-dimensional object creating apparatus 12, and a storage unit 106 such as an HDD. The accepting unit is the input/output I/F 104 and the communication I/F 105, and the generating unit is the CPU 101. The data processing apparatus 10 can be, for example, a computer or a tablet terminal.
The CPU 101 performs processing on three-dimensional object data by reading out and executing a processing program stored in the program memory 102 and then supplies the three-dimensional object data to the three-dimensional object creating apparatus 12 through the communication I/F 105 and the communication network 14. Processing mainly executed by the CPU 101 is processing for determining, for each voxel, whether the voxel becomes a color voxel or an achromatic color voxel. More specifically, the CPU 101 executes the following processing:
(i) Processing for converting polygons that constitute three-dimensional object data (3D data) into voxels
(ii) Processing for determining, for each voxel, whether the voxel becomes a color voxel or an achromatic color voxel
(iii) Processing for determining color data of a color voxel
(iv) Processing for converting color data of each voxel into a data format processable by the three-dimensional object creating apparatus 12.
The processing for determining whether a voxel becomes a color voxel or an achromatic color voxel includes processing for calculating a distance to a polygon closest to the voxel to be processed and processing for calculating a color density of the closest polygon. In the processing for determining color data of a color voxel, the color density of the closest polygon is used, and the distance to the closest polygon is also used as needed. The processing for converting color data of each voxel into a data format processable by the three-dimensional object creating apparatus 12 includes processing for converting the color data of the color voxel into CMYK, halftoning processing, and slicing processing that will be described later.
The three-dimensional object creating apparatus 12 functions as a 3D printer. The three-dimensional object creating apparatus 12 includes a CPU 121, a program memory 122 such as a ROM, a working memory 123, a communication interface (I/F) 124, an operating unit 125, a motor driving unit 126, a head driving unit 127, a color head 128, and a clear head 129.
The CPU 121 drives motors and heads by supplying control signals to the motor driving unit 126 and the head driving unit 127 by using the three-dimensional object data supplied from the data processing apparatus 10 through the communication I/F 124 on the basis of an operation command from the operating unit 125 in accordance with a processing program stored in the program memory 122.
The motor driving unit 126 drives motors including a supporting table (stage) moving motor for moving a supporting table that supports a created object and a head moving motor.
The head driving unit 127 controls ejection of ink (liquid for object creation) of the color head 128 and the clear head 129. The color head 128 is made up of a cyan (C) head, a magenta (M) head, a yellow (Y) head, and a black (K) head. The clear head 129 ejects transparent ink (liquid for object creation) that is not colored. The head driving unit 127 controls ejection, for example, by driving a piezoelectric element provided in an ejection channel of each head. However, a driving method is not limited to this. The clear head 129 may eject white ink instead of transparent ink. White or transparent is defined as an achromatic color relative to colors such as cyan, magenta, yellow, and black.
The three-dimensional object creating apparatus 12 creates a desired three-dimensional object by ejecting ink from the color head 128 and the clear head 129 by using slice data of the three-dimensional object supplied from the data processing apparatus 10 and sequentially stacking slices in a height direction. Specifically, the three-dimensional object creating apparatus 12 creates a three-dimensional object by ejecting ink (liquid for object creation) while sequentially moving the color head 128 and the clear head 129 in directions of three axes, i.e., X, Y, and Z axes. Alternatively, the three-dimensional object creating apparatus 12 may sequentially move a stage provided below the color head 128 and the clear head 129 in the directions of three axes, i.e., X, Y, and Z axes while fixing the color head 128 and the clear head 129.
The color head 128 may be made up of a cyan (C) head, a magenta (M) head, and a yellow (Y) head or may be made up of not only a cyan (C) head, a magenta (M) head, a yellow (Y) head, and a black (K) head, but also a head of another color.
The communication network 14 is, for example, the Internet, a local area network (LAN), Wi-Fi, or Bluetooth (Registered Trademark).
First, the CPU 101 of the data processing apparatus 10 acquires three-dimensional object data (3D data) (S101). The 3D data may be acquired from a keyboard, an optical disc such as a CD-ROM, a USB memory, or the like through the input/output I/F 104 or may be acquired from another computer connected to the communication network 14 through the communication I/F 105. The 3D data is data indicative of a three-dimensional shape of an object and indicates an external shape and a color of a surface of the object. The 3D data is constituted, for example, by polygons and includes color data (e.g., RGB data) of a surface of the object. The polygons are elements used to express an object by a combination of triangles and rectangles. The format of the 3D data is not limited in particular and may be a data format created by CAD software or may be a data format created by CG software.
Next, the CPU 101 of the data processing apparatus 10 converts the 3D data into voxel data in accordance with the processing program stored in the program memory 102 and determines color data of the voxel data (S102). The voxel data includes depth data D concerning a depth from the object surface and color data (r, g, and b).
The depth data D is a distance between a voxel center and a polygon closest to the voxel center. The depth data D is, for example, an average of distances from the voxel center to points of the closest polygon (vertexes of a triangle if the polygon is a triangle).
The color data is set by determining, for each voxel, whether the voxel becomes a color voxel or an achromatic color (white or transparent) voxel on the basis of a color density of the closest polygon and the depth data D. The color density of the closest polygon is calculated from the color data of the polygon. The CPU 101 basically generates color voxels so that voxels within a larger depth in the three-dimensional object become color voxels as the color density of the closest polygon becomes larger.
Next, the CPU 101 of the data processing apparatus 10 converts color data (r, g, and b) allocated to each voxel into CMYK data in accordance with the processing program (S103). Conversion from RGB into CMYK is known, and complementary color conversion, a look-up table (LUT), or the like can be used as in the case of a 2D printer. In cases where the clear head 129 of the three-dimensional object creating apparatus 12 ejects colorless transparent ink (liquid for object creation) and where a color indicated by the color data (r, g, and b) is white (all of R, G, and B values are maximum), the CPU 101 of the data processing apparatus 10 converts the color data (r, g, and b) into an achromatic color.
Next, the CPU 101 of the data processing apparatus 10 determines an output color of each voxel by halftoning processing in accordance with the processing program (S104). The halftoning processing is known, and error diffusion, a threshold dither matrix, or the like can be used as in the case of a 2D printer. For example, in halftoning processing using a threshold dither matrix, a three-dimensional threshold dither matrix corresponding to each of C, M, Y, and K is stored in the program memory 102 in advance, and color data of each color is compared with a value of the threshold dither matrix. In cases where the color data is equal to or larger than a threshold value, the color data is determined to be ON, and in cases where the color data is smaller than the threshold value, the color data is determined to be OFF. Only color data that has been determined to be ON is left.
As a result of the halftoning processing, the color data of the voxel is turned into data indicative of any one of cyan (C), magenta (M), yellow (Y), black (K), and an achromatic color (white or transparent).
Next, the CPU 101 of the data processing apparatus 10 extracts data of a single slice from the voxels for which color data has been determined in accordance with the processing program (S105). The single slice corresponds to an amount that can be ejected per movement of the color head 128 and the clear head 129 of the three-dimensional object creating apparatus 12. The CPU 101 that has extracted slice data from the voxels transmits the extracted slice data to the three-dimensional object creating apparatus 12 through the communication I/F 105 and the communication network 14.
The CPU 121 of the three-dimensional object creating apparatus 12 receives the slice data through the communication I/F 124 and creates a three-dimensional object by ejecting ink (liquid for object creation) from the color head 128 and the clear head 129 by controlling the motor driving unit 126 and the head driving unit 127 by using the slice data (S106). The CPU 121 of the three-dimensional object creating apparatus 12 creates the three-dimensional object by stacking slices in a height direction by repetition of slice extraction and ink ejection from the color head 128 and the clear head 129.
Next, a method for determining color data of each voxel is described.
First, the CPU 101 initially sets a radius R for a voxel to be processed and determines whether or not there is a polygon within the radius R (S201). In cases where there is no polygon within the radius R (NO in S201), the CPU 101 updates the radius R to a larger one according to the following formula (S202):
R=a
b
*R
where a and b are coefficients and are larger than 0. For example, assume that a is 1.5 and b is 1, R=1.5R. This means that the radius R is increased 1.5 times.
In cases where there is a polygon within the radius R or in cases where there is a polygon within the increased radius R (YES in S201), a distance between the voxel to be processed and all polygons that are located within the radius R is calculated (S203). As a distance between a voxel and a polygon, a normal may be calculated or an average of distances from a voxel center to points of the polygon may be calculated. After distances to all of the polygons located within the radius R are calculated, a polygon closest to the voxel to be processed is determined by comparing these distances, and a distance to this closest polygon is determined as depth data D (S204).
Assume that a central position of the voxel 1 is (s, t, u), positions of vertexes of the polygon 1 are (x1, y1, z1), (x2, y2, z2), and (x3, y3, z3), and positions of vertexes of the polygon 2 are (x2, y2, z2), (x3, y3, z3), and (x4, y4, z4) (the polygon 1 and the polygon 2 share two vertexes), a distance between the voxel 1 and the polygon 1 is calculated, for example, as follows:
(((s−x1)2+(t−y1)2−(u−z1)2)1/2+((s−x2)2+(t−y2)2−(u−z2)2)1/2+((s−x3)2+(t−y3)2−(u−z3)2)1/2)/3.
Meanwhile, a distance between the voxel 1 and the polygon 2 is calculated as follows:
(((s−x2)2+(t−y2)2−(u−z2)2)1/2+((s−x3)2+(t−y3)2−(u−z3)2)1/2+((s−x4)2+(t−y4)2−(u−z4)2)1/2)/3.
In cases where the distance between the voxel 1 and the polygon 1 is shorter than the distance between the voxel 1 and the polygon 2, the distance between the voxel 1 and the polygon 1 is determined as depth data D. The CPU 101 performs the processing for all of the voxels and stores a result of computation in the working memory 103. Assume that the voxels are a voxel 1, a voxel 2, a voxel 3, . . . , a closest polygon and depth data are stored, for each voxel, in the working memory 103 so as to be associated with each other as follows:
voxel 1: depth data D1, closest polygon 1
voxel 2: depth data D2, closest polygon 2
voxel 3: depth data D3, closest polygon 3.
As for a closest polygon, color data may be stored in association with the closest polygon.
First, the CPU 101 determines a total color amount T as a color density of a closest polygon determined for each voxel in S204 of
C(%)=100(%)−r
M(%)=100(%)−g
Y(%)=100(%)−b
The total color density T is a sum of the CMY densities and is expressed as follows:
T=C(%)+M(%)+Y(%)=300(%)−(r+g+b)
Next, the CPU 101 determines color data of the voxel to be processed on the basis of the calculated total color amount T1 and the depth data D calculated in S204 of
According to this color voxel condition, among voxels of the same total color amount T, a voxel that has small depth data D, specifically depth data D that is smaller than a threshold value becomes a color voxel, and a voxel that has large depth data D, specifically depth data D that is equal to or larger than the threshold value becomes an achromatic color voxel. Among voxels having the same depth data D, a voxel of a larger total color amount T is more likely to become color voxel since a threshold value becomes larger as the total color amount T becomes larger.
The CPU 101 performs, for all of the voxels, the processing of determining whether the voxel becomes a color voxel or an achromatic color voxel and causes a result of the processing to be stored in the working memory 103. Assume that the voxels are a voxel 1, a voxel 2, a voxel 3, . . . , depth data and color data are stored, for each voxel, in the working memory 103 so as to be associated with each other as follows:
voxel 1: depth data D1, color data (r1, g1, b1)
voxel 2: depth data D2, color data (r2, g2, b2)
voxel 3: depth data D3, color data (achromatic color).
The “color data (achromatic color)” of the voxel 3 indicates that the voxel 3 is an achromatic color voxel. In this example, an achromatic color is handled as one kind of color data in terms of a data format, but a parameter or a flag different from color data may be set for an achromatic color. For example, achromatic color data may be added in addition to the color data as follows:
voxel 1: depth data D1, color data (r1, g1, b1), achromatic color=0
voxel 2: depth data D2, color data (r2, g2, b2), achromatic color=0
voxel 3: depth data D3, color data (0, 0, 0), achromatic color=1.
The “achromatic color=0” indicates that a voxel is a color voxel, and the “achromatic color=1” indicates that a voxel is an achromatic color voxel.
In S303 of
First, the CPU 101 determines a total color amount T of a closest polygon determined in S204 of
C(%)=100(%)−r
M(%)=100(%)−g
Y(%)=100(%)−b
The total color density T is a sum of the CMY densities and expressed as follows:
T=C(%)+M(%)+Y(%)=300(%)−(r+g+b)
Next, the CPU 101 determines color data of a voxel to be processed on the basis of the calculated total color amount T and the depth data D calculated in S204 of
The color voxel condition expression is defined by using the depth data D and the total color amount T as follows:
D≤T
e
*f
where e and f are coefficients and larger than 0.
The color voxel condition expression is stored in advance in the program memory 102 as part of the processing program. The above color voxel condition expression indicates that among voxels having the same depth data D, a voxel is more likely to become a color voxel as the total color amount T becomes larger and that among voxels of the same total color amount T, a voxel having smaller depth data D is more likely to become a color voxel.
It is determined that a voxel that satisfies D≤T becomes a color voxel and a voxel that satisfies D>T becomes an achromatic color voxel.
This is an example, and any combination of (e, f) can be set. In particular, the combination of (e, f) may be changed in accordance with input 3D data.
Also in the case of
r2=(100-(100−r1)*(1−D/(Te*f)))
g2=(100-(100−g1)*(1−D/(Te*f)))
b2=(100-(100−b1)*(1−D/(Te*f)))
The expression “the color becomes paler as the depth data D becomes larger” means that the color becomes paler toward an inner side of a three-dimensional object.
As described above, in the present exemplary embodiment, color data of a voxel to be processed is determined on the basis of a distance (depth data D) from a polygon closest to the voxel and a color density (total color amount) of the closest polygon. This achieves a color strength equivalent to a single-color even in cases where a multi-color is used. Specifically, when a case where Cyan 100% is input and a case where Blue 100% is input are compared, voxels within the same depth become color voxels in these cases according to the conventional art. Meanwhile, in the present exemplary embodiment, a total color amount of Blue 100% is 200%, and voxels within a larger depth are determined as color voxels accordingly. As a result, the color of Blue 100% is stronger than the conventional one and approximates to that of Cyan 100%. In the present exemplary embodiment, there is a positive correlation between a thickness within which voxels become color voxels and a color density, and voxels within a larger thickness become color voxels as the color density becomes larger, and a stronger color is expressed accordingly.
The exemplary embodiment of the present invention has been described above, but the present invention is not limited to this and can be modified in various ways. These modifications are described below.
In the exemplary embodiment, when 3D data is acquired (S101), the 3D data is converted into voxel data and it is determined whether or not a voxel becomes a color voxel (S102), and then RGB data is converted into CMYK data (S103), as illustrated in
In the exemplary embodiment, color data of 3D data supplied to the data processing apparatus 10 is RGB. However, the color data of the 3D data may be CMYK from the beginning.
In the exemplary embodiment, a polygon that is located within a radius R from a voxel to be processed is searched for, and if no polygon is found, a polygon is searched for by increasing the radius R, and a distance to the polygon located within the radius R is calculated, as illustrated in
In the exemplary embodiment, color data of a voxel to be processed is determined by using a distance (depth data D) to a closest polygon and color data (total color amount T) of the closest polygon. This can be generally expressed as follows:
color data of voxel to be processed=F(D,T)
The function F takes two values, i.e., a color voxel value and an achromatic color voxel value. A specific expression of the function F may be fixed or may be adjusted by a user of the data processing apparatus 10 and the three-dimensional object creating apparatus 12 as appropriate. The same applies to the coefficients a, b, e, and f in the exemplary embodiment, and these coefficients may be fixed or may be adjusted by a user as appropriate.
Furthermore, the above expression (color data of voxel to be processed=F (D, T)) means that color data of a voxel to be processed is determined on the basis of depth data D and a total color amount T and does not intend to exclude variables other than D and T, and the following expression using a variable X may be used:
color data of voxel to be processed=F(D,T,X)
The variable X may be, for example, a total color amount of a polygon adjacent to a closest polygon or a total color amount of a second closest polygon.
In the exemplary embodiment, the data processing apparatus 10 and the three-dimensional object creating apparatus 12 are separately provided and are connected so as to be capable of exchanging data over the communication network 14. However, the data processing apparatus 10 and the three-dimensional object creating apparatus 12 may be physically united so as to constitute a three-dimensional object creating system.
Furthermore, it is also possible to employ a configuration in which the data processing apparatus 10 and a network server are connected over the communication network 14, 3D data acquired by the data processing apparatus 10 as a client is transmitted to the network server, the processes in S101 to S105 of
In the exemplary embodiment, a voxel to be processed is classified into a color voxel or an achromatic color voxel. This is functionally equivalent to processing for extracting only color voxels. This is because voxels that are not extracted are achromatic color voxels and therefore this processing is equivalent to classifying voxels into color voxels and achromatic color voxels.
In the exemplary embodiment, it is determined, for all voxels, whether or not the voxel becomes a color voxel or an achromatic color voxel by using the processing of
In the exemplary embodiment, the steps S101 to S105 of
The foregoing description of the exemplary embodiment of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiment was chosen and described in order to best explain the principles of the invention and its practical applications, thereby enabling others skilled in the art to understand the invention for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2016-205371 | Oct 2016 | JP | national |