ArticlePDF Available

Embedding QR Code onto Triangulated Meshes using Horizon Based Ambient Occlusion

Wiley
Computer Graphics Forum
Authors:

Abstract and Figures

QR code is a widely used format to encode information through images that can be easily decoded using a smartphone. These devices play a significant role in most people's everyday lives, making the encoded information widely accessible. However, decoding the QR code becomes challenging when significant deformations occur in the label. An easy and quick solution to keep the deformation on a minimum level is to affix the label that contains the QR code onto a developable surface patch of a 3D model. The perspective distortion that can appear is efficiently dealt with during the decoding process. In recent years an alternative method has emerged. In the work of Kikuchi et al., the QR code is embedded onto B‐spline surfaces of CAD models to give more freedom in providing additional information. This method was further improved and extended by Peng et al. embed QR codes onto the surface of general meshes. This paper introduces a solution to embed QR codes onto the surface of general meshes without densely triangulating the selected area of the QR code. It uses the deferred shading technique to extract the surface normals and the depth values around the QR code's user‐given centre. We propose two methods for automatically finding the projection direction even when highly curved areas are selected based on the retrieved information while rendering the model. Besides, we introduce two methods needing a projection direction and a QR code centre to determine a size for automatically embedding the QR code. We propose patterns for decreasing the carving depth of the embedded QR codes, and we use the Horizon‐Based Ambient Occlusion to speed up the engraving process. We validate our method by comparing our results to the outcomes of Peng et al.
This content is subject to copyright. Terms and conditions apply.
DOI: 10.1111/cgf.14394 COMPUTER GRAPHICS forum
Volume 41 (2022), number 1 pp. 29–45
Embedding QR Code onto Triangulated Meshes using Horizon Based
Ambient Occlusion
György Papp,1,2 Miklós Hoffmann2,3 and Ildikó Papp2
1Doctoral School of Informatics, University of Debrecen, Debrecen, Hungary
papp.gyorgy@inf.unideb.hu
2Faculty of Informatics, University of Debrecen, Debrecen, Hungary
papp.ildiko@inf.unideb.hu
3Institute of Mathematics and Informatics, Eszterházy Károly University, Eger, Hungary
Abstract
QR code is a widely used format to encode information through images that can be easily decoded using a smartphone. These
devices play a signicant role in most people’s everyday lives, making the encoded information widely accessible. However,
decoding the QR code becomes challenging when signicant deformations occur in the label. An easy and quick solution to keep
the deformation on a minimum level is to afx the label that contains the QR code onto a developable surface patch of a 3D model.
The perspective distortion that can appear is efciently dealt with during the decoding process. In recent years an alternative
method has emerged. In the work of Kikuchi et al., the QR code is embedded onto B-spline surfaces of CAD models to give more
freedom in providing additional information. This method was further improved and extended by Peng et al. embed QR codes onto
the surface of general meshes. This paper introduces a solution to embed QR codes onto the surface of general meshes without
densely triangulating the selected area of the QR code. It uses the deferred shading technique to extract the surface normals
and the depth values around the QR code’s user-given centre. We propose two methods for automatically nding the projection
direction even when highly curved areas are selected based on the retrieved information while rendering the model. Besides, we
introduce two methods needing a projection direction and a QR code centre to determine a size for automatically embedding
the QR code. We propose patterns for decreasing the carving depth of the embedded QR codes, and we use the Horizon-Based
Ambient Occlusion to speed up the engraving process. We validate our method by comparing our results to the outcomes of Peng
et al.
Keywords: rendering, CAD, modeling
ACM CCS: Computing methodologies Mesh models; rasterization;
1. Introduction
Providing information along with an item is essential for the user
in terms of describing the proper usage of the product or how to as-
semble its parts. In most cases, this supplementary information is
enclosed as a printed document along with the product. However,
recently it often contains references to the manufacturer’s website
in the form of a QR code to register the product or get more informa-
tion. Moreover, the QR code can even be printed on a label afxed
to the item’s surface.
Due to fundamental theoretical restrictions of differential geom-
etry, smooth (i.e. isometric) label placement is limited only for de-
velopable surface patches of the product to avoid signicant defor-
mation of the QR code, which could negatively affect its readability.
However, when an item does not have this kind of surface patch, or
it has, but it is not suitable (e.g. too small) to place a large enough
and readable QR code on it, the additive manufacturing techniques
can help. The essence of this technique is that instead of applying
labels of the generated QR code onto the surface, the QR code mod-
ules are projected onto the surface, and the dark ones are engraved
into the surface to generate shadow and create the required contrast
between the QR code’s white and black parts for the decoding.
In recent years, this groundbreaking new method, the engraving
of QR codes into the surface, has been introduced and improved by
several authors. Kikuchi et al. [KYJ*18] embedded QR codes onto
CAD models constructed by B-spline surfaces. Additionally, Peng
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium,
provided the original work is properly cited.
29
30 G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion
et al. [PLL*19] engraved QR code onto general meshes by opti-
mizing its modules and carving depth. An embedding solution of
the QR code that uses directed light to make the engraved QR code
readable is presented by Peng et al. [PLL*20]. However, these so-
lutions have some limitations and require preprocessing steps, typ-
ically modication and recomputation of the surface before the QR
code can be embedded. In our previous work [PHP21], we presented
an improved method to embed QR codes onto even problematic,
highly curved free-form surfaces, but it works specically for free-
form surfaces.
In this paper, we propose a method that does not require any pre-
processing step before the QR code is engraved onto a triangulated
mesh. The previous works [PLL*19, PLL*20] that embed the QR
code onto the surface meshes do not provide exact algorithms on
how the surface normals are used to nd a projection direction for
engraving a QR code. Therefore, we present two methods in detail
for nding the direction that can be used to project the QR code
onto the surface. These methods are also based on using the surface
normals to get the projection direction like in our previous work to
[PHP21]. However, our second method additionally uses depth in-
formation along with the surface normals. Besides, our engraving
solution can automatically determine the size of the QR code for
a user-given centre and projection direction. The resulting size fur-
ther depends on the user’s decision about whether the QR code plane
created with the current size of the search should be freely rotated
inside the mesh boundaries dened by the used projection or not.
An alternative scenario is when the user has no specic prefer-
ence on the position of the QR code, but a suitable (practically a
minimum) size of the code is given. The task is to nd the area(s)
on the surface which the user can choose as a potential centre for
that size of a QR code. This case will also be discussed.
The surfaces patches where a QR code can be embedded are lim-
ited by the carving depth required for successfully decoding the re-
sulting engraved QR code. In order to embed QR codes onto even
thinner parts of a mesh, we propose to apply patterns on the dark
modules of the QR code. Our patterns change the module’s carving
shape and decrease the carving depth of the QR code.
A model’s lighting can be calculated using one of the many ray-
tracing techniques, and even real-time results can be achieved with
the hardware-accelerated ray-tracing capabilities of the latest GPUs.
However, our aim was to show that the SSAO techniques, which
produce less precise lighting results, are good enough for measuring
the amount of shadow in the engraved QR code areas. Therefore, in
this work, we propose to use the Horizon Based Ambient Occlusion
technique to speed up nding the carving depth of the QR code with
the GPU’s help.
The remaining of our paper is structured in the following way.
Section 2 discusses the related work, while in Section 3, our pro-
jection direction search method is introduced in detail. Section 4
proposes a method to nd the QR code’s size or potential positions
automatically, and the next section introduces how to embed the QR
code. In Section 6, we present our patterns for reducing the carving
depth of the QR code with a method to speed up nding this depth
discussed in Section 7. Section 8 shows the measurements of our
methods and comparisons to previous solutions. Conclusions close
the paper.
2. Previous Work
The topic of how the QR code can be visually more appealing to the
user is an actively researched area. The proposed works varies from
changing the colour of the QR modules to modifying their posi-
tion and shapes for enhancing the QR code with images and gures
[CCLM13, LLC13, GALV14, GS15, WYL*15, LWLJ17, XSL*19].
However, having an attractive and informative QR code itself is
not enough if the QR code is afxed on curved surfaces, and it suf-
fers from deformation that makes it harder or impossible to decode.
QR code readers are very sensitive in this manner. Reading a QR
code from a cylindrical surface is a common problem [LSGH13,
LWHL15, LWH16, LZ17, LMHW19]. A solution to tackle down
the deformation in the QR code and successfully decode it by using
perspective projection is proposed in the work of Lay et al. [LZ17].
As in other QR code engraving solutions [PLL*19, PLL*20], we
also use the perspective projection during our QR code embed-
ding process.
Besides afxing a QR code as a label on a surface, one can also
embed it into the object. In the work of Wei et al. [WSHL18], the
QR code is a safety feature, and it is embedded into metallic compo-
nents to ght against illegal counterfeits. The selective laser melting
(SLM) technology is used to embed the QR code, and the result is
decoded with the help of X-ray imaging. Another reason for embed-
ding a QR code inside the components can be to track them through
the additive manufacturing chain. Chen et al. [CLT*19] proposed a
solution to prevent 3D printing attacks by obfuscating the QR code
before embedding it.
A 3D printed QR code can also be beautied based on the work
of Yang et al. [YPLL19]. They propose a method that automatically
generates perforated artistic QR codes and embeds them onto sur-
faces using a 3D printer. The generated perforated QR code’s white
components are connected and optimized to ensure the embedded
QR code’s readability.
Besides, objects can also be tagged with a QR code to describe
and provide useful information. For example, AirCode method
[LNNZ17] embeds the user-dened information by placing struc-
tured air pockets under the surface of the item. The resulting code
of the method is only readable by computers, and the process takes
minutes to provide results.
QR codes can also be embedded onto CAD models, as Kikuchi
et al. [KYJ*18] proposed in their work. The models they worked
with are constructed from B-spline surfaces, and the QR code is
created by rening the surface with knot insertion. Then, the black
modules of the QR code are grooved to reach the required contrast in
the QR code for readability. Finally, the control points correspond-
ing to the black modules are adjusted in an iterative process that
automatically grooves the QR code.
The embedded QR code carving depth has been further optimized
in the work of Peng et al. [PLL*19]. Before embedding the QR
code, the number of connected black modules should be decreased
by modifying the QR code’s modules to reach higher contrast in the
engraved QR code. Although the method of projecting the QR code
onto the surface is only briey sketched in their paper, they pre-
sented an iterative method to nd a minimal non-uniform carving
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion 31
depth for the embedding. The method determines the carving depths
for each sample vertex point of the engraved modules separately. A
method similar to our technique is used in [PLL*19] for embedding
the QR code. However, the paper does not detail the embedding pro-
cess; only the shared source code showed the implemented QR code
embedding. The mentioned preprocessing of remeshing the selected
QR code area to achieve a densely triangulated area is done by tri-
angulating the 2D QR code image pixels forming a densely trian-
gulated 2D QR code mesh, which vertices are projected onto the
mesh. A densely triangulated zone is formed around the QR code
after the projection. The selected region for the QR code embed-
ding is removed, and the resulting densely triangulated surface is
merged with the boundaries of the mesh’s remaining part using a
Delaunay triangulation.
A novel QR code 3D fabrication framework has been presented
in [PLL*20] to embed QR codes unobtrusively with minimal shape
modication. The method also carves the model’s surface, like the
previous ones, but the created QR code pattern is only visible for
decoding when it is lit from a specic direction. The white mod-
ules of the pattern are illuminated, while the directional light shades
the black ones. The average of the surface normal vectors is used
to determine the projection direction. However, the surface nor-
mal vectors’ sampling process is insufciently detailed in the pa-
per. The method simulates the light to compute the black and white
modules’ carvings. The resulting average carving depth is approxi-
mately 50% less than in the work of [PLL*19]. The proposed solu-
tion has evident limitations in terms of embedding a QR code onto
highly curved shapes because of the appearing self-occlusion and
non-continuous projection phenomena.
The Screen Space Ambient Occlusion (SSAO) was rst pre-
sented in the work of Mittring [Mit07] for CryEngine2. During
the years, other techniques were created to generate more realis-
tic lighting faster. Few of the many techniques are [BSD08, Tim13,
NAM*17, ZXL*20]. Nowadays, most computer games use one of
the many available SSAO techniques to quickly calculate lighting
and give a natural feeling to the graphics. Moreover, the SSAO tech-
niques can quickly produce a visually pleasant and convincing ap-
proximation of the shadow for a given camera view. One of the
many available techniques is the Horizon-Based Ambient Occlu-
sion [BSD08] (HBAO), which we have applied in our carving depth
search method.
In our previous work [PHP21] we introduced a method for em-
bedding QR codes, but it works only for free-form surfaces dened
over a rectangular area of the [x,y] plane in a z=f(x,y) form. This
previous method uses the surface normal to nd a projection direc-
tion that eliminates deformations in the engraved QR code. Based on
[PHP21], here we overview our previous method to help the com-
parison between our new and former methods. First, the user has
to provide inputs for embedding the QR code: the QR code centre
on the surface (point O) and a QR code size (s). Then, our iterative
method creates an initial hplane with QR code size scentred at point
Oand orthogonal to surface normal at O. Next, plane his projected
onto the surface to form a rectangular area Rin the surface parame-
ter space. After, rectangle Ris shifted until its Rcentre is at point Ouv,
which is the QR code’s centre in the parameter space. We denote
the shifted rectangle with R. The resulting rectangles can be par-
tially outside of the surface parameter boundaries. In order to avoid
problems during the sampling, we need to modify the rectangles by
clamping them to the surface parameter boundaries. The sampling
of the surface normals is performed using the Halton sequence in
the surface patch selected by rectangle R.
The unit normal vector
nof the new plane his simply calculated
by summarizing the sampled surface unit normals
ni,
n=m
0
ni
m
0
ni
.
The resulting projection direction of the rst or second iteration is
used in the later steps, because in our practice it resulted an appro-
priate embedded QR code. However, it is not guaranteed that it will
always provide deformation-free embedding.
The projected points of plane hare searched in a similar way
to the [PLL*19, KYJ*18] methods in a Pkl =C+t·d(k,l) form,
where Cis the new centre of the projection, and d(k,l) gives the
directions to project each point of the QR code. Then, we used the
Newton method to calculate parameter tand get the projected point
of the QR code plane.
In our previous method, we proposed patterns that dened sur-
faces with different normals vectors to increase the amount of
shadow in the engraved areas. The presented surfaces were used at
the bottom of the engraved black modules. Our rst pattern consists
of one surface applied uniformly for each black module, while our
second pattern was created from two surfaces that are used alter-
nately for the black modules to create a wavy pattern. The compari-
son of our introduced patterns showed that applying our patterns to
the QR code increases the shadow in the engraved modules without
carving the QR code further into the surface. However, the intro-
duced patterns work only with sufciently large QR code module
size or high 3D printing quality for ensuring that the applied sur-
faces at the bottom of the engraved black modules remain visible
after the 3D printing.
3. Finding the Direction of Projection of the QR Code
In the works of Peng et al. [PLL*19, PLL*20], the projection di-
rection calculation is based on the assumption that QR codes are
usually decoded perpendicularly from a top view. They use the nor-
mal direction to the surface in [PLL*19] and the surface normals’
average in [PLL*20] for projecting a QR code. However, they do not
dene how to nd the normal direction to the surface or sample the
surface normals to average them. In the work of Kikuchi et al., the
direction to project the QR code was found by using the Principal
Component Analysis (PCA) with B-spline surfaces.
We propose two methods to sample the surface normals and depth
values for determining the projection direction. These methods au-
tomatically nd a normal vector to form a plane, which can be used
to project the QR code’s modules on the triangulated mesh’s surface.
Our methods’ only required input parameter is the QR code centre,
which the user needs to provide as a point on the mesh. The QR code
size is an optional parameter of our method because we can nd a
size to embed the QR code around the previously given centre using
the result of our projection direction search method (see Section 4).
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
32 G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion
Figure 1: The left image shows the initial plane, and the right one
shows the central projection dened by the plane. Our method’s cen-
tral projection distance parameter was chosen to be 25 cm for a
0.12 mm QR code module size.
The crucial difference between our new projection direction
search method and the one proposed in [PHP21] is the way how
we select the area on the mesh’s surface and how we sample the
surface normals in the selected area. Our previous method selected
the sampling area in the surface parameter space and used the sur-
face’s equation to nd its normal vectors at a given point. However,
we always use the area selected by the current projection direction
for sampling in our new methods. Also, we changed how our new
method handles those cases when the selected sampling area is out-
side the mesh boundaries viewed from the projection direction.
The surface of the mesh is not directly sampled since we render
the sampling area to create a map that contains surface normals for
each pixel of the rendered area. Then, the mesh normals are interpo-
lated using the smooth interpolation qualier to sample the surface
normals over the selected area. Besides, our second method’s sam-
pling process uses an additional sampling step, where the previously
created map is resampled based on the distance between the mesh
and the QR code plane. Our rst method determines the new normal
vector of the QR code plane similarly to our previous solution.
Both of our methods project an initial plane to the triangulated
mesh to dene the area where the mesh normals are sampled (see
Figure 1). We dene this initial plane through the selected centre,
orthogonally to the surface normal at the user-selected point.
The QR code plane may be partially outside of the mesh silhou-
ette viewed from the projection direction. As a result, there are ar-
eas in the texture containing the rendered normal vectors that do not
contain any information about the mesh. Continuing the QR code
embedding using this texture might result in a deformed embed-
ded QR code. Therefore, we replace all of those normal vectors in
the texture based on the given projection direction, which point is
outside the mesh silhouette. For example, let Bij be the points that
are outside of the mesh silhouette. Its value is replaced with the
Bnij =Bij C
nvector in the texture, where Cis the selected
centre of the QR code and
nis the normal vector of the QR code
plane. The resulting Bnij vector is used in our method for sampling
the normal vectors. The replaced normal vectors can help modify the
QR plane position to be inside the mesh’s silhouette again. However,
Figure 2: The image shows how the surface is sampled in the sec-
ond method using the normal and depth textures.
it is not guaranteed that the resulting plane of our iterative methods
remains inside of the mesh’s silhouette in every case.
Our rst method samples the area dened by projecting the ini-
tial plane onto the mesh’s surface and calculates the sampled nor-
mal vectors’ average like in our previous work [PHP21]. However,
instead of directly sampling the surface, our method renders the se-
lected area’s normals into a texture using the central projection de-
ned by the initial plane and our central projection distance parame-
ter, as seen in Figure 1. As the next step, our method takes msamples
from the texture using the Halton sequence similarly to [PHP21]
by substituting the surface parameters with the texture coordinates.
The initial plane’s normal vector is replaced with the average vec-
tor calculated from the samples. The updated plane is used later for
embedding the QR codes.
The second method uses an iterative method to nd a projection
direction that minimizes the variance of the distance between the
sampled area and the projection centre. The method starts with the
same initial plane and renders the same area as the rst method.
However, the depth values are also stored in a texture besides the
surface normals during the rendering process. An n×ngrid is tted
on the resulting textures, and the average depth value is calculated
for each grid. The new normal vector for the plane is calculated in
two steps, where the rst one calculates the normal textures’ sam-
pled average like in the rst method. In the second step, only those
grids of the normal texture are used in the sampling and average
calculation (
depthnj) where the average depth value of the depth
texture’s grids was the two largest and lowest (see Figure 2).
An additional third step is required when the projected QR code
plane is partially outside the QR code’s silhouette using the actual
projection direction. This step determines those areas in the normal
texture that are far from the camera and are outside of the mesh’s sil-
houette. We similarly sample the modied normal vectors in those
areas which are entirely out of the silhouette. Let kdenote the num-
ber of areas entirely out of the silhouette, then we take the average
unit normal vector
outnkof each those area. This step is similar to
the previous one, but other areas of the normal vector texture are
sampled.
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion 33
A single vector is created from the average vectors of the selected
areas by retaking their average, and it is performed for both the sec-
ond and third steps. The nal normal vector
nffor updating the plane
is calculated as the average of each steps’ resulting vector,
nf=m
i=1
ni+4
j=1
depthnj
2.
Before the iteration starts again, it updates the normal vector of the
plane used for selecting the sampling area with
nf. The later itera-
tions use the previously found plane for selecting the sampling area
on the surface. Figure 2 shows the texture sampling and how the
new normal vector of the QR code plane is calculated without the
additional third step. The method stops when the distance’s variance
between the surface and the centre of projection is small enough or
it reaches the maximum number of iterations. We used 0.05 as a
threshold value and 5 as a limit for the number of iterations in our
implementation. When the threshold value was not reached, the pro-
jection direction with the smallest variance is used. The applied val-
ues are determined based on working with 5 ×5 cm large QR codes.
4. Automatically Determine the Size/Position of the QR Code
When the user species the centre Cof the future QR code on the
surface, the size of the future code can only be roughly guessed.
In this subsection, we propose two methods to nd a size that ts
the QR code into the model’s silhouette determined using the given
projection, either with or without a preferred orientation of the QR
code. The user needs to provide a QR code centre along with a pro-
jection for nding the QR code’s size, or the resulting projection di-
rection of our previously proposed search method can be used with
the QR code’s centre. The rst step of both methods is nding the
model’s silhouette viewed from the given projection direction. To do
this, we select all the facets that are visible using the given projec-
tion. Then, the silhouette of these facets is determined by creating a
half-edge structure from them.
In our rst method, the centre of the QR code is given by the user,
but no orientation preference is provided. Therefore, we search the
closest point of the silhouette (point S) to the centre of the QR code
(point C). Point Scan be easily determined as the touching point of
a circle, which is centred in point C(see Figure 4a). The size of the
QR code’s edge can be calculated from the SC distance, half of the
QR code’s diagonal. Every QR code with an equal or smaller size
can denitely be embedded onto the surface, so this is a guaranteed
size. Also, the user can choose any rotation for embedding the QR
code since the QR code is always inside the mesh’s silhouette. Fig-
ure 3 shows nding the mesh’s silhouette, the closest point to the
QR code centre, and the created QR code with the calculated size.
However, our method’s resulting guaranteed size is not necessarily
the absolute upper limit for the QR code.
In our second method, the user denes the orientation (the direc-
tion of the side) of the QR code by providing a
vvector besides
the centre of the QR code. We decided to use a direction for set-
ting the QR code rotation because the edges of the QR code are
very frequently planned to be parallel to a given
vdirection. After
our method similarly found the model’s silhouette to the rst one, it
places a small square with edges parallel to the user-given
vdirec-
Figure 3: It shows the mesh silhouette for a given QR code plane
and the silhouette’s closest point to the QR code centre. Every QR
code smaller than this size can denitely be embedded to the surface
using any rotation.
Figure 4: Two examples of how the maximum size of the QR code is
calculated using the centre C of the code and the silhouette’s point
S, In the rst example, there is no preferred direction of the code (a),
while a preferred direction was given by vector
v(b) in the second
one.
tion at point C, which is the centre of the QR code. Then the square
is enlarged by a central similarity from Cuntil one of its vertices
reaches the silhouette (see Figure 4b). The size of the QR code can
be calculated analogously to the rst method from the SC distance.
Figure 5 shows that the plane of the QR code can be freely rotated
around the user-selected Ccentre of the QR code when their guaran-
teed size is determined by our rst method. For example, Figure 5a
shows that the QR code is rotated in a way that one of its projected
corners is on the silhouette. In the other case, we have selected a
v
vector to embed a QR code with sides parallel to this vector, which
is rotated around the normal of the plane with 45(see Figure 5b).
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
34 G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion
Figure 5: Two rotated QR codes with the same centre. The left im-
age shows when one of the QR code’s plane vertices is on the sil-
houette of the shape (from the viewpoint of the projection centre).
In the two scenarios discussed above, the user has dened the po-
sition of the centre of the QR code. An alternative scenario is when
the user has no specic preference on the position of the centre of the
QR code, but a suitable (practically a minimum) size of the code is
given. In this case, the task is to nd the area(s) on the entire surface
where a potential centre for that size of a QR code can be chosen.
Although this aspect is not at the forefront of our research and ev-
idently needs further elaboration, here we provide a brief sketch of
this scenario.
From a technical point of view, we have to determine those view-
points from where the projected QR code of a given size is entirely
inside the surface’s silhouette. In the case of convex surfaces or sur-
faces with no sharp concave parts, a good guess could be the com-
parison of the projected area of the surface and the given area of the
square of the code. If the area of the code is larger than the area of
the surface from a particular viewpoint, then there is no chance to
nd a suitable position for the QR code. On the other hand, if the
measure of the surface area from a given viewpoint is larger than the
QR code, there is a good chance that we can place the code onto that
part of the mesh. Recent studies provide a way of nding all view-
points in the space around the given surface from where the actual
visible area of the surface is of constant measure (here we suppose
that the surface is given as a polyhedral mesh) [NKH18, CS16]. The
set of these points are called an isoptic surface (of a given measure)
of the mesh since this is somewhat similar to the well-known ele-
mentary planar case of isoptic circular arcs from where a given line
segment can be seen under a certain angle. To nd this surface, the
authors apply heuristic spatial search methods (for the details, see
[NKH18]).
Now we can determine the isoptic surface of the given mesh from
where the silhouette measure is larger than the area of the square of
the QR code. The next step, choosing any of the points of this isoptic
surface, is to nd the potential centres of the code from this specic
viewpoint. To this step, we can compute the internal offset curve of
the silhouette with half of the diagonal of the square of the code.
The image of this offset curve on the mesh will roughly bound the
suitable area of the centre from this viewpoint. Calculating these ar-
eas from the points of the isoptic surface, the union of these areas
on the mesh provides all the potential positions of the centre of the
QR code of that given size. Here we note again that this scenario
evidently needs further study in terms of the details of the compu-
tation.
5. Embedding the QR Code
In both works of Peng et al., the selected area of the QR code is
remeshed to achieve dense triangulation for the QR code and its
surrounding area. Also, Kikuchi et al. use a preprocessing step to
generate and insert the required knot lines and values for B-spline
surfaces. These are all computationally expensive steps. We want
to embed the QR code onto the triangulated mesh by signicantly
decreasing the preprocessing computational cost, remeshing only
the facets on the borderline of the QR code to connect it with the
rest of the mesh.
In our solution, we embed the QR code by projecting it onto the
original mesh’s surface. Our engraving method also uses the central
projection dened by the QR code’s plane for nding the projected
points of the QR code’s modules with ray-tracing. The modules are
divided into submodules using an n×ngrid. Similarly to [PLL*19],
we applied a 5 ×5 grids for submodules. However, our proposed
method differs from [PLL*19, PLL*20] in that we do not form a
densely triangulated area for the QR code. Instead, we just project
the submodules to the selected area on the surface for the next step,
where the QR code is triangulated from the projected points. There-
fore, there is no densely triangulated area around our embedded QR
code, and we can directly connect the mesh with the triangulated
code. The plane and its projection are used to nd the model’s facets
affected by the embedding to achieve this direct connection. All
those facets entirely inside the projection are discarded to replace
with the triangulated QR code’s modules. However, the projected
points of the black modules and their submodules are shifted to cre-
ate a small initial engraving before they are triangulated to form the
embedded QR code. The borderline facets are modied to triangu-
late them with the projected points of the QR code’s sides using
constrained Delaunay triangulation. This way, our method can pre-
serve most parts of the original mesh triangulation by connecting
the border triangles directly to the QR code instead of the remeshed
surroundings of the QR code. Figure 6 shows steps of the entire
process. Our introduced method for merging the QR code with the
rest of the mesh is similar to the one implemented by Peng et al. for
connecting the remeshed QR code with the rest of the mesh. We pre-
sented the steps of our method since the QR code embedding was
not described in detail in [PLL*19, PLL*20] for the readers.
6. Reducing Carving Depth: Patterns for the Black Modules
We propose replacing the rectangle shape of the black modules with
different ones to decrease the carving depth of the embedded QR
code. In the case of the 2D QR codes, the black modules are often
modied to have a more artistic and pleasing look. Even the QR
codes are beautied by using images. However, we want to shape
our black modules to achieve a more shallow carving depth. Using
different shapes for the module, we can control the number of con-
nected black modules, and their areas.
Our module patterns were created using two different approaches.
In the rst one, each black module is replaced with a shape that stays
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion 35
Figure 6: First, the facets affected by the QR code are detected by
embedding the QR code onto the surface. Next, the facets are sepa-
rated into border and inner facets (inside the projected area). Then,
the inner facets are removed and replaced with the triangulated QR
code modules, while the border ones are modied and triangulated
using the points from the projected sides of the QR code. Finally,
combining the newly triangulated border, the embedded QR code,
and the model’s remaining facets results in the nal mesh.
Figure 7: The black squares show which submodule is enabled for
engraving by the module patterns in the grids.
inside the module’s original rectangular shape. Therefore, it breaks
the connected black areas in the QR code. In the second one, the
shapes replacing the modules are designed to keep the connection
between the neighbouring black modules but decrease their areas.
Figure 7 shows all our proposed shapes for the modules. All of the
embedded QR code from Figure 8 are created by carving only those
submodules that are selected by the used patterns.
Our rst two patterns separate the modules from each other and
eliminate the large areas of the connected modules, which increase
the carving depth (see Figure 7a and 7b). In the rst one, only the
inner submodules are enabled for embedding. Our second pattern re-
duces the number of the used submodules by removing the previous
pattern’s corners, leaving only a thin plus sign in the module’s cen-
tre.
However, our next two patterns approach is the opposite because
those keep the modules connected (see Figure 7c and d). The sub-
modules in the corners are left out from the embedding to form ob-
stacles in the large connected areas. Therefore, our third pattern is
a more extensive 45rotated square. The last one is similar to the
second one because it is also a plus sign but larger. It uses the grid’s
inner horizontal and vertical lines.
The QR code’s position detection markers play an important part
in recognizing a QR code. Therefore, we propose different patterns
for engraving them in our solution. Their engraving patterns com-
bine two patterns used for the black modules. The position detection
marker modules use the patterns from Figure 7c and 7d. The remain-
ing four corner modules have a different, slightly shifted square pat-
tern. Figure 9 shows the combination of these patterns in a position
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
36 G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion
Figure 8: Embedded QR codes using our proposed patterns. Only
the enabled submodules by the applied pattern are engraved in the
QR code.
detection marker. Besides, it shows an example engraved QR code
for each of them.
7. Carving Depth Search Method with Horizon-Based
Ambient Occlusion
In the work of Kikuchi et al., the obscurance is evaluated at each
grooving point to determine whether the engraved areas are dark
Figure 9: The black squares in the grids indicate which of the sub-
modules are enabled in an engraving pattern for the location detec-
tion marker.
enough to identify them as the black modules of the QR code. On
the other hand, Peng et al. used a different solution to nd a carv-
ing depth that generates enough self shadow for the black modules.
They calculate the amount of self shadow by using simulation, and
the carving depth is decided by using the “symbol contrast (sc)”
[fS15].
The methods of Peng et al. and Kikuchi et al. for nding the carv-
ing depth are time-consuming because it needs minutes to provides
results. Comparing the running time of the carving depth search al-
gorithms with 3D printing the embedded QR codes, we can see that
nding the carving depth requires only a fraction of the time the 3D
printer needs for making the model. Therefore it is essential to en-
sure a quick design process for embedding a QR code and viewing
the resulting mesh, so the user can iteratively modify the embedded
QR code until the result is satisfying. Our proposed algorithm aims
to speed up the carving depth search phase of the design process
while ensuring a good contrast between the mesh’s surface and the
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion 37
QR code’s embedded modules. This way, the user can modify the
embedded QR code more quickly to reach a satisfying result, a good
candidate for 3D printing.
We created an iterative method like the ones from Kikuchi’s and
Peng’s work for nding the carving depth. In our proposed method,
we focused on improving the calculation of the self shadow inside
the engraved modules. The QR code’s projection direction and the
direction to decode the QR code are usually the same or very sim-
ilar. Therefore, we propose to use a Screen Space Ambient Occlu-
sion (SSAO) technique to evaluate the self shadow instead of using
simulation. The benet of using an SSAO technique is that we can
harness the GPU’s computation capacity, along with the CPU. Our
solution uses the Horizon-Base Ambient Occlusion (HBAO) tech-
nique to render the engraved QR code using the same projection
used as the embedding. The rendered embedded QR code is stored in
a texture and used to evaluate each engraved modules’ illumination.
In our iterative depth search method, the QR’s submodules are en-
graved in each iteration until the modules’ darkness is not enough.
The resulting texture of our rendering process, which stores the
lighting information for each submodule of the QR code, is used
to decide whether the darkness of the module is sufcient. The av-
erage luminance value of a submodule can be calculated using its
corresponding pixels from this texture. In our implementation, the
resulting pixels are from a 32-bit oat texture with only a red chan-
nel. The texture is lled with the luminance value of the deferred
shading’s resulted RGBA colour. We use contrast criteria similar to
[PLL*19].
We designed our method to handle those cases when the selected
area for embedding a QR code is self-shadowed either because
of self-occlusion or directed light sources. Therefore, our carving
depth search method uses the average luminance value of a carved
module’s surrounding areas to decide when to stop. First, the sub-
modules luminance value LSk,l,i,jis calculated using the resulting
texture from the HBAO rendering pass. Then the modules’ lumi-
nance value Li,jis dened by calculating the average of their sub-
modules’ value. These values are calculated at the beginning of each
iteration to use these later in our objective function. In the next step,
our method calculates the average luminance value ALi,jof a given
module’s surrounding areas by taking the average of the four dark-
est neighbour modules of the selected module, where the modules
neighbourhood relation is dened with eight-connectivity. The re-
sulting luminance value of the modules is used in our objective func-
tion to decide when to stop increasing the carving depth of a sub-
module. The objective function for a given module and its submod-
ule is
G(k,l,i,j)=ALi,j·(1+c)+LSk,l,i,j,
where cis our threshold value parameter to have enough contrast in
the resulting QR code and LSk,l,i,jis the luminance value of sub-
module SMk,lin module Mi,j. The carving depth of a given Mi,j
module SMk,lsubmodule is only increased during an iteration when
G(k,l,i,j)>0. We use the G(k,l,i,j) function in the stopping cri-
teria of our carving depth search method
m
i=1
m
j=1
n
k=1
n
l=1
H(G(k,l,i,j)) 0,
Figure 10: The rst column shows the output of our rendering pro-
cess that is used during the carving depth search. In the following
two columns, the engraved QR code can be seen in the actual state
of the carving optimization.
where mis the number of modules in the QR code’s rows or
columns, and nis the size of the n×ngrid used for dening the
submodules. Figure 10 shows the process of embedding QR codes
using our method.
Instead of increasing the submodules carving depth with a con-
stant value in each iteration, we propose a carving depth increase
function. It is evaluated in each iteration and provides a dynamically
changing value based on the number of iterations since the submod-
ule’s luminance value is not changed signicantly. We use the tanh()
function to manage the amount used to increase a submodule’s carv-
ing depth in the actual iteration. Our function to manage the carving
depth increase is
O(x)=cc·etanh 1
df+tanh fx
d,
where xis the number of iterations since the luminance value of the
submodule is not changed signicantly. We use constant values to
control how aggressively the engraving process is performed, which
needs to be dened before the carving depth search process. The c
constant value is the default carving depth increase value, the d,e,
and fvalues are used to transform the tanh() function. The used
values are chosen to limit our function values around the minimum
layer height available with the 0.4 nozzle’s diameter value for 3D
printing the QR-codes. Our parameters c=0.1, d=2, e=3and
f=2.5.
The HBAO technique only approximates the real shadow. How-
ever, we can estimate the modules’ carving depth adequately with
its result. Using the HBAO technique to calculate the amount of
light in the embedded QR code, we can produce a result in 5–10 s
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
38 G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion
instead of minutes. However, the HBAO technique’s parameters
need to be chosen before the engraving so that a reasonable esti-
mation of the realistic lighting can be achieved in the rendered re-
sult. The following section provides more results about how well
our carving depth search method works with different lighting con-
ditions and differently embedded QR codes.
8. Results
We implemented our proposed methods as a web application us-
ing Dart programming language with WebGL, and we tested it on
a laptop with an Intel Core i7-8550U Processor (8M Cache, up to
4.00 GHz), 16GB memory, and an NVIDIA Geforce MX150 graph-
ics card. The resulting models of our solution were printed out us-
ing a Prusa Mini 3D printer with a 0.4 and 0.25 mm nozzle diame-
ter. Most of the models in the images were made using the 0.4 mm
nozzle diameter, and we used a 1.2 mm QR code module size for
embedding the code like in [PLL*19]. We provide the nozzle di-
ameter and QR code module size for those created using different
ones than the abovementioned models. The models were printed us-
ing PLA material since this is one of the most commonly used and
cost-effective materials.
All of our embedded QR codes can be viewed on a web page1
using the included obj viewer. Also, we placed a video there about
decoding 3D printed embedded QR codes created using our pro-
posed methods on the bunny and the knight model.
First, we tested how robust our proposed patterns are for changing
the QR-code module size. We used the same module size in our test
than Peng et al. in [PLL*19], and the results are shown in Figure 11.
Replacing the shape of the black modules to decrease the carving
depth affected how small module size can be chosen for the QR
code that still results in a decodable 3D printed embedded QR code.
Figure 11 shows that the further we decrease the shape sizes in
our pattern, the larger the QR code module is required to 3D print a
readable QR code. This effect is also present in the case of our pro-
posed location detection marker patterns because the smallest QR
code module sizes were reached by not using our location detection
marker pattern. Embedding a QR code using our thick plus mod-
ule pattern has the smallest QR code module size (0.6 mm) in our
test, while the largest module size was measured using our thin plus
module pattern. Using our other two module patterns (square and ro-
tated square) with our proposed location detection marker patterns
for the embedding resulted in a 0.9 mm small QR code module size.
However, the small module size for these patterns caused stringing
in the embedded QR code, which we needed to remove for success-
ful decoding. Figure 12 shows a few of our embedded QR codes
with different patterns and QR code sizes.
Using the module patterns for the whole QR code resulted in the
largest QR code module size. Changing the 0.4 mm diameter nozzle
in the 3D printer to a nozzle with 0.25 mm diameter let us print the
embedded QR code with more details and further decrease the QR
code module size for some of our patterns as Figure 11 shows. Based
on our test’s results, we need to decide which one is more important,
1https://arato.inf.unideb.hu/papp.gyorgy/qr_in_mesh/
Square Rotated
square
Thick
plus
Thin
plus
0.5
1
1.5
2
1.51.51.5
1.8
0.90.90.9
1.8
0.90.90.9
1.8
0.60.60.6
1.8
Module size, 0.4 mm noozle
Square Rotated
square
Thick
plus
Thin
plus
0.5
1
1.5
2
1.21.21.2
1.5
0.90.9
0.6
1.5
0.90.9
0.6
1.5
0.60.60.6
1.5
Module size, 0.25 mm noozle
Module pattern is used for location detection marker
Rotated square location detection marker pattern
Thick plus location detection marker pattern
Without location detection marker pattern
Figure 11: The diagrams show the minimal QR code module size
for each proposed pattern, which results in a decodable embedded
QR code. We used a nozzle with 0.4 mm diameter for the rst di-
agram, while we used a nozzle with a 0.25 mm diameter for the
second one. The module sizes for testing our pattern are used from
[PLL*19].
Figure 12: QR codes embedded using our square module pattern
with the rotated square and thick plus location detection marker
patterns. The QR codes are 3D printed in different QR code module
sizes (rst row: 1.2 mm, 0.9 mm, 0.6 mm, and second row: 1.8 mm,
1.5 mm).
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion 39
Bunny Vase
DavidKitten Bumpy
sphere
Knight
0.5
1
1.5
1.23
0.45
1.39
0.89
1.2
1.04
1.26
0.96
1.43
0.89
1.76
1.05
QR code size (mm)
Surface normals
Sampling surface normals and depth values
Figure 13: It shows the guaranteed size of the QR code found using
our two different methods for searching the projection direction.
the size of the QR code or its carving depth. Then we can choose
the most suitable pattern based on our decision for the embedding.
We proposed two projection direction search methods to automat-
ically determine the direction for embedding a QR code at the given
centre. We also presented a method that can automatically determine
the QR code’s size using a projection direction and a selected point
on the mesh for the centre of the QR code. Our rst method provides
the largest size that does not exceed the mesh from the given pro-
jection direction and lets the user freely rotate the QR code before
embedding it without any problem. Our second solution needs an
additional
vvector that denes the orientation of the QR code for
searching a similarly large size than in our rst method. We searched
the QR code’s guaranteed size in our next test using both our pro-
posed projection direction search methods. The results are used to
show the projection direction search methods’ resulting QR code
plane and compare which one provides a larger potential QR code
size. Figure 13 shows the results of our test.
The embedded QR code and the QR code planes of the search
methods are shown in Figure 14. Additional images for this com-
parison is added to the appendix in Figure A.1. Most of the shown
models and QR code centres from Figure 14 and A.1 are used in our
later tests for embedding QR codes.
The gures show that a larger guaranteed QR code size can be
achieved when the surface is highly curved, and we include the
depth values in the projection direction search. However, the dif-
ference between our two proposed methods becomes insignicant
when the selected surface for the QR code is not highly curved or it
is wavy. Therefore, we used our second projection direction search
method to embed the QR code in the following test.
Our patterns for engraving a QR code were proposed to decrease
the embedded QR code’s carving depth. Therefore, we measured the
carving depth of QR codes embedded with or without using our pat-
terns (see Figure 15). Furthermore, we measured the carving depth
of embedded QR codes engraved by combing the location detection
marker patterns with the module patterns. These measurements are
shown in Figure 16.
Figure 14: Results are shown on the Bunny, David’s head, and Vase
model. The QR code size search was performed with two rotations.
First, we compare the QR code plane found in each row, using only
the surface normal for the projection direction search (rst and third
column), then additionally using depth values in the search (second
and fourth column).
Our results show that replacing the black modules’ shape with our
patterns decreases the needed carving depth to reach the required
contrast between the QR code’s black and white modules. The not
connecting patterns (small thin, and square) produced the shallowest
carving depth in all models. The best performing pattern was the thin
plus, while the least performing was the thick plus pattern in our test.
The square and rotated square patterns are close to each other, and
the gap between their carving depth decreases as the selected area
is a more curved surface.
Figure 16 shows the carving depth measurements of QR codes
embedded using module and location detection marker patterns as
well. The chart shows that not using location detection marker pat-
tern results in a deeper carving depth for each module pattern. Also,
it shows that our proposed patterns for the location detection marker
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
40 G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion
00.511.52
Bunny
Vase
David
Kitten
0.66
0.71
0.96
0.51
0.83
0.8
0.97
0.7
1.4
1.2
1.4
1.13
0.12
0.58
0.72
0.18
1.83
1.49
1.78
1.67
Square
Rotated square
Thick plus
Thin plus
No pattern
Figure 15: Carving depth of embedding a QR code with different
patterns.
Square Thin plus Rotated square Thick plus
0.5
1
1.5
0.69
0.53
0.78
1.27
0.72
0.62
0.82
1.28
1.67 1.69 1.72 1.75
carving depth (mm)
Rotated square location detection marker
Thick plus location detection marker
No pattern
Figure 16: It compares the resulting carving depth of embedding a
QR code by combining the module patterns with the location detec-
tion marker patterns.
Figure 17: 3D printed embedded QR codes on different models us-
ing our module and location detection marker patterns together.
decrease the carving depth, and the difference between our two pat-
terns’ carving depth is small.
We compared the readability of the embedded QR codes, which
are created with our projection direction search method and pat-
terns, using an Android smartphone with the QRbot application.
Figure 17 shows 3D printed embedded QR codes combining the
square module and rotated location detection marker patterns on dif-
ferent models. More images of embedded QR codes onto the surface
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion 41
Figure 18: 3D printed embedded QR codes in different colours.
of David’s head model using our patterns are shown in the appendix
(Figure A.2). We usedthe same models from the [PLL*19, PLL*20]
works to compare our projection direction method to the previous
works. Our test also shows how our pattern for position detection
marker performs in QR code decoding compared to not using any
pattern or using one of our previously mentioned patterns for mod-
ules in the whole QR code.
We tested our proposed projection direction method and patterns
using different colours like the previous works. We show the 3D
printed embedded QR codes in Figure 18. The images show that
changing the colour does not affect the readability of our embedded
QR code signicantly.
We also tested our introduced method on new models. We choose
the knight chess gure with a pyramid and a star mesh to embed a
QR code onto their surface. The resulting 3D printed models and
QR codes are shown in Figure 19. We created the last embedded
QR code without using any pattern to show the robustness of our
proposed methods.
Replacing the location detection markers with the module pat-
terns results in an unreadable embedded QR code. However, in-
creasing the module size solves the problem in exchange for having
a more considerable carving depth. Our proposed location detection
marker has better results than using the module patterns. It reduced
the carving depth while the QR code remained readable.
Two of our module patterns, the square, and the rotated patterns,
performed well during the readability test. The thick pattern pro-
duced a readable embedded QR code only when the selected sur-
face was not highly curved or wavy. On the other hand, our thin
plus module pattern resulted in too small shapes with the 1.2 mm
module size, and the embedded QR code was not readable. The test
Figure 19: 3D printed embedded QR codes on different models.
The rst three QR codes were embedded using our proposed pat-
terns, while the last one was created without a pattern to show our
proposed method’s robustness.
also showed that the readability of QR codes embedded using our
patterns are strongly depends on the quality of the resulted 3D print.
Therefore, our patterns need to be printed with higher detail settings
to have a readable QR code. Based on our test results, the best com-
bination of our patterns considering their carving depth and read-
ability are the square and rotated module pattern used with one of
our proposed location detection marker patterns.
We also tested the robustness of decoding the embedded QR code
created using our proposed patterns. We used a 1.2 mm QR code
module size, which limited the test to the square, rotated square,
thick plus module pattern with both our location detection marker
patterns because only these can produce decodable results with the
chosen QR code module size. The robustness of the embedded QR
code decreases by selecting a pattern that contains fewer submod-
ules enabled for engraving. However, this decrease in the robustness
is not signicant. The app can still successfully decode the embed-
ded QR code, but it requires an additional 1 or 2 s.
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
42 G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion
Bunny Vase David Kitten
0
1
2
0.61
0.95
0.68 0.61
0.52
0.70
n/a
0.75
1.67 1.78
1.49
1.83
1.86 1.75 1.73 1.75
carving depth (mm)
Our method with pattern
Peng’s unobtrusive embedding
Our method without pattern
Peng’s non-uniform carving
Figure 20: Comparison of our methods with the two embedding
methods of Peng et al.
0.811.21.41.61.8
With pattern
Without pattern
0.78
1.81
0.81
1.72
0.75
1.69
carving depth (mm)
One dir. light
Two dir. light
Without dir. light
Figure 21: It shows the comparison of the carving depth of embed-
ding a QR code in different lighting environments with directional
lights.
Figure 20 shows the result of comparing embedded QR code’s
carving depth created using our method with [PLL*20] and
[PLL*19]. In our method we used our best performing pattern for
this comparison.
Engraving a QR code using our module patterns and our HBAO
based carving depth search method produces an embedded QR code
with a smaller carving depth than in [PLL*19]. The embedded QR
code from [PLL*20] has the smallest carving depth in most of our
test cases. Our HBAO carving depth search method nds similar
carving depth for the engraving when the QR code is embedded
without patterns as in [PLL*19]. However, it only needs a fraction
of the time required to [PLL*20] and [PLL*19].
We tested how our carving depth search method works when di-
rectional light sources are used. The QR code was embedded using
one or two directional lights, and their results were compared to the
case where no directional light was used (see Figure 21).
Figure 22: The rst column shows the embedded QR code without
any directional light. The second one shows it with the directional
light used during the engraving. For the last two columns, the di-
rection’s light is above and below the engraving light direction. The
enclosing angle of the engraving light’s direction and the QR code
plane’s normal is different for the embedded QR codes in the rst
and second row. First, this angle is small, then in the next row, it is
set to large for both cases, either using our pattern or not.
As our measurements show, engraving QR codes with additional
directional light sources results in larger carving depth. Using addi-
tional directional light for the engraving increases the carving depth
when patterns are used for the embedding. However, when the QR
code is embedded without a pattern, the carving depth decreases by
adding further directed light to the engraving.
We also tested how robust is our carving depth search method to
the changes in the lights’ direction. Figure 22 shows examples of
using different light direction for decoding than the one used in the
carving depth search method.
Figure 22 shows that the chosen light direction determines how
robust the QR code is against changes in the lighting environment
where the QR code is decoded. Using directional light and our pat-
terns together resulted in unreadable QR codes. However, when no
patterns were used, the larger the angle between the QR code plane’s
normal and the light’s direction of the engraving process we choose,
the more robust the embedded QR code becomes to changes in the
light’s direction during the decoding. Unfortunately, increasing this
angle also increases the embedded QR code carving depth. There-
fore, we need to sacrice the small carving depth in exchange for
having a more robust QR code in an environment with directional
lights. In our test, the QR code engraved using a directional light
with a larger angle (123) tolerated increasing the engraving incom-
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion 43
ing light angle for the decoding test with 30. The other QR code
engraved with a smaller direction light angle (98) only tolerated 15
larger angle for the incoming light. Further increase of the incoming
light enclosed angle with the QR plane normal resulted in an unread-
able QR code. Decreasing the incoming light direction angle does
not affect the readability of the QR codes engraved without a pattern.
9. Conclusion
This paper introduces improved methods for embedding a QR code
onto triangulated meshes’ surfaces. First, we proposed a solution
that automatically nds the projection direction for engraving a QR
code with a given centre and a guaranteed size. Then, we compared
our two methods for nding a projection direction for the QR code
embedding using models from previous works. We also used new
models to show the robustness of our proposed methods. Our results
show that decodable, deformation-free embedded QR codes can be
achieved using our proposed projection direction search methods.
It also shows that using the depth information of the model with
its surface normals for nding a projection direction can result in
a larger QR code size when the selected region is highly curved.
In Our embedding solution, we also subdivide the modules as in
[PLL*19] for the carving depth search process.
To further decrease the embedded QR code’s carving depth, we
propose using patterns for the black modules that dene which sub-
modules in a black module must be included in the carving depth
search and embedding process. Using these patterns for the embed-
ding, we can reach smaller carving depths than in [PLL*19], and
we are close to the carving depth introduced in [PLL*20]. Our test
showed that we reached the best result when our proposed mod-
ule pattern and the location detection marker were used together.
The best performing combinations of our proposed patterns are the
square or rotated square module pattern with one of our location
detection marker patterns because there is no signicant difference
between them.
We use a Screen-Space Ambient Occlusion technique in our carv-
ing depth search solution, the Horizontal Based Ambient Occlusion,
to estimate the embedded QR code’s self shadow. The luminance
value is calculated from the resulting texture of rendering the QR
code from the projection direction, and it is used for the objective
function of our iterative search method to decide when to stop the it-
eration. We also dened a dynamic carving depth increase function
to decrease our method’s running time. As a result, our method can
nd an embedded QR code’s carving depth only in seconds, while
the previous methods needed minutes.
Furthermore, we can dene directional light to include in the
carving depth search process, so the resulting embedded QR code
can be decoded even with directional light. However, our test result
shows that the engraved QR code robustness depends on the cho-
sen light direction. Also, using direction light in our carving depth
search process increases the embedded QR code’s carving depth.
Besides these, our solution depends on the parameters of HBAO to
adequately estimate the shadow in the modules.
In the future, we plan to use the ray-tracing support of the newest
graphic cards to provide a more accurate and faster result for the
QR code embedding. Also, our QR code size search algorithms can
only nd a guaranteed size, which is, in most of the case, not the
largest possible size for embedding the QR code. A search algo-
rithm to nd a rotation for the QR code placement can be imple-
mented to increase the QR code size as future work. Our iterative
projection direction search methods can also be improved using a
search method. For example, the simulated annealing can be used
to reduce the difference between the depth values during the projec-
tion direction search. Besides, our normal vector sampling methods
may be further improved by using more sophisticated algorithms to
interpolate the normal vectors between the mesh vertices.
Acknowledgements
This work was supported by the construction EFOP-3.6.3-VEKOP-
16-2017-00002. The project was supported by the European Union,
co-nanced by the European Social Fund.
Appendix A: Additional 3D printed embedded QR codes
Figure A.1: Additional models tested with our projection direction
search method: the Kitten, Knight, and the Bumpy sphere. For fur-
ther explanation see Figure 14.
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
44 G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion
Figure A.2: 3D printed QR code embedded onto the surface of
David’s head model. Each column shows a different module pat-
tern, while each row shows a different location detection marker
pattern.
References
[BSD08] B L., S M., D R.: Image-space
horizon-based ambient occlusion. In ACM SIGGRAPH 2008
Talks (New York, NY, USA, 2008), SIGGRAPH ’08, Associa-
tion for Computing Machinery.
[CCLM13] C H.-K., C C.-S., L R.-R., M N. J.:
Halftone qr codes. ACM Transactions on Graphics 32, 6 (2013),
217:1–217:8.
[CLT*19] C F., L Y., T N. G., M M.,
S K., G N.: Embedding tracking codes in additive
manufactured parts for product authentication. Advanced En-
gineering Materials 21, 4 (2019), 1800495. https://doi.org/10.
1002/adem.201800495.
[CS16] C G., S J.: Isoptic surfaces of polyhedra. Com-
puter Aided Geometric Design 47 (2016), 55–60. SI: New Devel-
opments Geometry.
[fS15]  S I. O.: Information technology
Automatic identication and data capture techniques QR
Code bar code symbology specication. Standard ISO/IEC
18004:2015, International Organization for Standardization,
2015.
[GALV14] G G. J., A G. R., L D. L., V-
 O. P.: Qr images: optimized image embedding in QR codes.
IEEE Transactions on Image Processing 23, 7 (2014), 2842–
2853.
[GS15] G A. M., S K. R.: Embedding qr code in color
images using halftoning technique. In 2015 International Con-
ference on Innovations in Information, Embedded and Commu-
nication Systems (ICIIECS) (2015), IEEE, pp. 1–6.
[KYJ*18] K R., Y S., J P. K., Z
J., M T.: Embedding QR codes onto b-spline surfaces
for 3d printing. Computer-Aided Design 102 (2018), 215–223.
ID: 271502.
[LLC13] L Y.-S., L S.-J., C B.-Y.: Artistic qr code em-
bellishment. Computer Graphics Forum 32, 7 (2013), 137–146.
https://doi.org/10.1111/cgf.12221.
[LMHW19] L K., M F., H Z., W Q.: A correc-
tion algorithm of qr code on cylindrical surface. In Journal of
Physics: Conference Series (Jun 2019), vol. 1237, IOP Publish-
ing, p. 022006.
[LNNZ17] L D., N A. S., N S. K., Z C.: Aircode:
Unobtrusive physical tags for digital fabrication. In Proceedings
of the 30th Annual ACM Symposium on User Interface Software
and Technology (New York, NY, USA, 2017), UIST ’17, ACM,
pp. 449–460.
[LSGH13] L X., S Z., G D., H S.: Reconstruct argorithm
of 2d barcode for reading the QR code on cylindrical surface. In
2013 International Conference on Anti-Counterfeiting, Security
and Identication (ASID) (2013), IEEE, pp. 1–5.
[LWH16] L K.-T., W L.-J., H P.-L.: Decoding of qr codes
printed on spheres. In 2016 5th International Symposium on
Next-Generation Electronics (ISNE) (2016), IEEE, pp. 1–3.
[LWHL15] L K.-T., W L.-J., H P.-L., L Y.-S.: Recti-
cation of images of qr codes posted on cylinders by conic seg-
mentation. In 2015 IEEE International Conference on Signal and
Image Processing Applications (ICSIPA) (2015), IEEE, pp. 389–
393.
[LWLJ17] L L., W S., L S., J B.: Interactive QR code
beautication with full background image embedding. In Second
International Workshop on Pattern Recognition (2017), Jiang X.,
Arai M., Chen G., (Eds.), vol. 10443, International Society for
Optics and Photonics, SPIE, pp. 211–215.
[LZ17] L K.-T., Z M.-H.: Perspective projection for decod-
ing of qr codes posted on cylinders. In 2017 IEEE International
Conference on Signal and Image Processing Applications (IC-
SIPA) (2017), IEEE, pp. 39–42.
[Mit07] M M.: Finding next gen: Cryengine 2. In ACM
SIGGRAPH 2007 Courses (New York, NY, USA, 2007), SIG-
GRAPH ’07, Association for Computing Machinery, p. 97–121.
[NAM*17] N O., A E., M D., S-
 H. P., R T.: Deep shading: convolutional neural net-
works for screen space shading. Computer Graphics Forum 36,
4 (2017), 65–78. https://doi.org/10.1111/cgf.13225; 20.
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
G. Papp et al. / Embedding QR Code onto triangulated Meshes using Horizon Based Ambient Occlusion 45
[NKH18] N F., K R., H M.: New algorithm
to nd isoptic surfaces of polyhedral meshes. Computer Aided
Geometric Design 64 (2018), 90–99.
[PHP21] P G., H M., P I.: Improved embedding of
QR codes onto surfaces to be 3d printed. Computer-Aided Design
131 (2021), 102961.
[PLL*19] P H., L L., L L., S A., C B.: Fabricat-
ing qr codes on 3d objects using self-shadows. Computer-Aided
Design 114 (2019), 91–100.
[PLL*20] P H., L P., L L., S A., L L., L-
 D., C B.: Fabricable unobtrusive 3d-qr-codes with direc-
tional light. Computer Graphics Forum 39, 5 (2020), 15–27.
[Tim13] T V.: Line-sweep ambient obscurance. Computer
Graphics Forum 32, 4 (2013), 97–105. https://doi.org/10.1111/
cgf.12155.
[WSHL18] W C., S Z., H Y., L L.: Embedding anti-
counterfeiting features in metallic components via multiple ma-
terial additive manufacturing. Additive Manufacturing 24 (2018),
1–12. ID: 306190.
[WYL*15] W S., Y T., L J., Y B., Z Y.: Does a qr
code must be black and white? In 2015 International Conference
on Orange Technologies (ICOT) (2015), IEEE, pp. 161–164.
[XSL*19] X M., S H., L Y., L X., L J., N J., L P., Z
B.: Stylized aesthetic qr code. IEEE Transactions on Multimedia
21, 8 (2019), 1960–1970.
[YPLL19] Y J., P H., L L., L L.: 3d printed perforated qr
codes. Computers & Graphics 81 (2019), 117–124. ID: 271576.
[ZXL*20] Z D., X C., L G., X Y., H C.:
Deepao: Efcient screen space ambient occlusion generation via
deep network. IEEE Access 8 (2020), 64434–64441.
© 2021 The Authors. Computer Graphics Forum published by Eurographics - The European Association for Computer Graphics and John Wiley & Sons Ltd
... Ref. Description Programmability [**] Embedding a program in a QR code to make it executable Anti-counterfeiting [36] Placing hidden information within the QR code to prevent its copy/falsification [37] Use of visual features combined with QR codes to guarantee the authenticity of a product Improving beauty [38] Generation of artistic QR codes, which are embedded in a picture [39] Embedding a QR code within a micrography image [40] Embedding a QR code within a picture [41] Inserting a QR code in a picture by using deep learning technology Improving other technologies [42] Integrating QR codes and RFID technologies to decrease the complexity of RFID circuitry Improving recognition [43] Using an adaptive method based on binarization to improve recognition quality [44] Improving recognition quality when QR codes are placed in an uneven surface [45] Reducing the size of information in a QR code to improve recognition performance [46] A deblurring method is used to improve acquisition quality of QR codes [47] Improving recognition quality of QR code by fastly restoring out-of-focus blurred images [48] Removing perspective by identifying the vertex of a QR code [49] Improve the performance in recognizing multiple QR codes in a picture Increasing capacity [50] Increasing the capacity of a QR code by means of lossless compression [51] Using colored QR codes to improve the storage capacity [52] Improving the encoding efficiency of Chinese characters based on the use frequency Multiple information [53] Embedding three layers of information within one QR code [54] Embedding two layers of information within one QR code [55] Placing a QR code inside another QR code and reading both with different angles Printing type [56] QR codes printed with ink sensitive to pH for quality monitoring of food freshness [57] QR code is printed on a sand core surface for traceability [58] Printing the QR code by caving it on the surface of an object Security [59] Embedding a secret within the QR code by using colors [60] Embedding a secret within the QR code [61] Embedding a secret within the QR code for authentication [62] Using QR codes and singular value decomposition to encrypt images [63] Embedding privacy information by using two layers in the QR code [64] Protection for potential adversarial learning attacks using QR codes tree inside the eQR code. In this work, it is described and analyzed starting from Section IV. ...
Article
Full-text available
QR codes are increasingly used in a plurality of scenarios, and research activities are being successfully carried out to improve this technology and widen its contexts of applicability. After an extensive survey of the state-of-the-art on the subject, this work presents the new, promising possibility to embed a programming language in a QR code. This new kind of executable QR codes, we named eQR codes, enable interaction with end users even in the absence of an Internet connection, and provide a sort of IoT paradigm where intelligence is embedded in the object tag in the form of a program. Among all the possible languages that can be embedded, this work focuses on a powerful but compact (in terms of QR code storage occupation) dialect, termed QRtree, which is aimed at implementing decision trees. The eQR code technology makes a new class of applications possible, e.g., providing hints for navigation or instructions for using rescue devices in places with no network coverage like mountains and caves. Smart interactive user manuals are enabled as well. Besides defining the QRtree language and eQR code structure, this paper describes all the steps needed to generate eQR codes and to manage their execution in end-user devices. A simple yet realistic example and the related code are also presented, to practically show how this technology can be used to solve real-world problems. For the example, the QRtree version of the code takes 234B, less than one-half the size of an equivalent program in Python bytecode (634B).
... Refs. 24,27 also introduced some methods to address issues related to deformation and readability. In addition, Ref. 31 proposed an algorithm for QR images, trying to address out-of-focus problems, which has an impact on QR readability. ...
Article
Full-text available
Compared to image-based quick response (QR) codes, acoustic QR codes have some advantages. However, an acoustic QR scanner cannot recognize an acoustic QR code at a distance of more than two meters from an acoustic QR announcer. To this end, we propose a new sort of acoustic QR code, called an audible acoustic QR code (AAQRC), which employs humanly audible sound to carry users’ information directly. First, a user’s string of characters is translated into a string of pitches. Then, the related algorithms convert the string of pitches into a playable audio file. As a result, an AAQRC is generated, consisting of the audio itself. AAQRC recognition is the opposite process of AAQRC generation. Compared with the existing approach for acoustic QR codes, the new method can recognize acoustic QR codes at a longer distance, even if there are obstacles between the AAQRC announcer and AAQRC scanner.
Article
Full-text available
Providing additional information for parts or items usually means to enclose it next to the object or affix it on the component when that is possible. However, another solution is available by gaining the benefits of an additive manufacturing technology, 3D printing. This technology makes it possible to embed the additional information onto the surface of the items, for example, in the forms of QR codes. In the work of Kikuchi et al. (2018), the QR code is embedded into CAD models that consist of B-spline surfaces by grooving its dark regions to shadow them. The method proposed by Peng et al. (2019) optimized the modules of the QR code and the depth to carve its dark modules into any general mesh. However, embedding the QR code with these methods, in some cases, especially in case of highly curved surfaces, the QR code is deformed during the process of projection onto the surface. This deformation can highly restrict the readability of the QR code. In this paper, we propose an improved method to embed QR codes onto free-form surfaces by using a low-end consumer-level 3D printer. Our aim is to provide a robust method to project the QR code onto surfaces even with high curvature. We discuss the problematic cases for the works mentioned above, and we present a process to find an optimal position and direction of projection for the QR code to avoid deformations on highly curved surfaces. To validate our method, we compare our results with the outcomes of Kikuchi et al. (2018) and Peng et al. (2019). Keywords QR code3D printingProjectionEmbeddingFree-form surfaceAmbient occlusion
Article
Full-text available
QR code is a 2D matrix barcode widely used for product tracking, identification, document management and general marketing. Recently, there have been various attempts to utilize QR codes in 3D manufacturing by carving QR codes on the surface of the printed 3D shape. Nevertheless, significant shape editing and modulation may be required to allow readability of the embedded 3D‐QR‐codes with good decoding accuracy. In this paper, we introduce a novel QR code 3D fabrication framework aimed at unobtrusive embedding of 3D‐QR‐codes in the shape hence introducing minimal shape modulation. Essentially, our method computes bi‐directional carvings in the 3D shape surface to obtain the black‐and‐white QR pattern. By using a directional light source, the black‐and‐white QR pattern emerges as lighted and shadow casted blocks on the shape respectively. To account for minimal modulation and elusiveness, we optimize the QR code carving w.r.t. shape geometry, visual disparity and light source position. Our technique employs a simulation of lighting phenomena through carved modules on the shape to ensure adequate contrast of the printed 3D‐QR‐code.
Article
Full-text available
Ambient occlusion (abbr. AO) plays an important role in realistic rendering applications because AO produces more realistic ambient lighting, which is achieved by calculating the brightness of certain screen parts based on objects’ geometry. However, the baseline computation of AO algorithm is time-consuming, which limits its application for real-time rendering. Currently, most AO algorithms are based on screen space to reduce the computational consumption, which leads to unrealistic results due to the usage of artificial features. To overcome these challenges, in this paper, we first create a well-crafted dataset with the pair of deferred shading buffer data and ground-truth AO shaded images. Then, we design an efficient deep neural network for the screen space AO image generation, based on which we further design a Compute Shader Library to compute the shaded AO images. Our extensive experimental results show that our method achieves competent performance than existing screen space ambient or volumetric ambient based AO methods both in visual quality and efficiency.
Article
Full-text available
When capturing a QR code on a cylinder, there may be geometric distortions due to the angle of the camera and the cylindrical deformation, which makes the QR code difficult to recognize. To solve this problem, a correction algorithm for QR codes is proposed in this paper. First, the boundary of the QR code on the cylinder is extracted by a morphological algorithm and geometry calculations. Then, the feature points on the image are accurately located. Next, the standard size of the QR code is determined by using the cross-ratio method in descriptive geometry. Finally, the image is corrected by perspective projection. It is proven that the algorithm can correct the distortion of the cylinder image effectively, and it has the ability to properly identify cylindrical QR codes.
Article
Full-text available
QR codes are machine-readable optical 2D matrix barcodes which can be easily displayed physically on printed media or digitally on a screen. In recent years, artists and researchers have paid much attention to beautify and enhance QR codes with visual features beyond their plain standard format. We propose a novel method for carving a QR code on a surface in a perforated manner and fabricating it with single material via ordinary 3D printing techniques. However, it is nontrivial to directly fabricate such artistic QR codes because there are a large amount of disconnected components and small details that are difficult to be fully realized. To this end, the embedded information must be consistent and the 3D printed QR code should be readable with standard decoders, like mobile phones. With the original code, we introduce a QR evaluator to estimate its readability and then optimize the code in terms of the printability and robustness. We demonstrate the effectiveness of our techniques with a wide range of examples printed with homogeneous materials via consumer-level 3D printers.
Article
Full-text available
Additive manufacturing (AM) process chain relies heavily on cloud resources and software programs. Cybersecurity has become a major concern for such resources. AM produces physical components, which can be compromised for quality by many other means and can be reverse engineered for unauthorized reproduction. This work is focused on taking advantage of layer‐by‐layer manufacturing process of AM to embed codes inside the components and reading them using image acquisition methods. The example of a widely used QR code format is used, but the same scheme can be used for other formats or alphanumeric strings. The code is segmented in a large number of parts for obfuscation. The results show that segmentation and embedding the code in numerous layers help in eliminating the effect of embedded features on the mechanical properties of the part. Such embedded codes can be used for parts produced by fused filament fabrication, inkjet printing, and selective laser sintering technologies for product authentication and identification of counterfeits. Post processing methods such as heat treatments and hot isostatic pressing may remove or distort these codes; therefore, analysis of AM method and threat level is required to determine if the proposed strategy can be useful for a particular product.
Article
With the continued proliferation of smart mobile devices, Quick Response (QR) code has become one of the most-used types of two-dimensional code in the world. Aiming at beautifying the visual-unpleasant appearance of QR codes, existing works have developed a series of techniques. However, these works still leave much to be desired, such as personalization, artistry, and robustness. To address these issues, in this paper, we propose a novel type of aesthetic QR codes, SEE (Stylize aEsthEtic) QR code, and a three-stage approach to automatically produce such robust style-oriented codes. Specifically, in the first stage, we propose a method to generate an optimized baseline aesthetic QR code, which reduces the visual contrast between the noise-like black/white modules and the blended image. In the second stage, to obtain art style QR code, we tailor an appropriate neural style transformation network to endow the baseline aesthetic QR code with artistic elements. In the third stage, we design an error-correction mechanism by balancing two competing terms, visual quality and readability, to ensure the performance robust. Extensive experiments demonstrate that SEE QR code has high quality in terms of both visual appearance and robustness, and also offers a greater variety of personalized choices to users.
Article
The aerospace, automotive and medical industries are suffering from significant number of counterfeited metallic products that not only have caused financial losses but also endanger lives. The rapid development of additive manufacturing technologies makes such a situation even worse. In this investigation, we successfully applied a novel hybrid powder delivery selective laser melting (SLM) approach to embed dissimilar tagging material (Cu10Sn copper alloy) safety features (e.g. QR code) into metallic components made of 316 L stainless steel. X-ray imaging was found to be a suitable method for the identification of the embedded safety features up to 15 mm in depth. X-ray fluorescence was used for the chemical composition identification of the imbedded security tagging material. A criterion for the selection of tagging material, its dimensions and imbedding depth is proposed. The multiple material SLM technology was shown to offer the potential to be integrated into metallic component production for embedding anti-counterfeiting features.
Article
Recent advance of Additive Manufacturing technologies allows us to manufacture various parts used in real-world products. Consequently, product tracking of such 3D printed parts is an important issue. Quick Response (QR) code which is a two-dimensional matrix barcode invented by Denso, a Japanese automotive industry, in 1994, can be used for this purpose. It can store more data than the 1D barcode in a smaller space, and using a smartphone as a scanner, one can directly visit a website where all the information of the parts is stored. However, QR codes require secondary procedures to add them to products and are also vulnerable to wear and tear. Moreover, QR codes cannot be added to freeform surfaces, but only to developable surfaces. In this paper we propose a novel technique to embed QR codes onto CAD models consisting of freeform surfaces represented by B-spline surfaces, which produces 3D QR codes. 3D QR codes work similar to 2D QR codes and can be read by existing QR scanners, but are designed by grooving the surface to obtain light and dark regions caused by ambient occlusion. Unlike conventional QR codes, 3D QR codes do not fall off from the part and can even be painted if necessary. Furthermore, we do not need to prepare dark-colored and light-colored materials for 3D printing as the dark color is provided by the grooving. We demonstrate the effectiveness of our technique with various examples.