**Dyeing in Computer Graphics**

Yuki Morimoto1,3, Kenji Ono1,2 and Daisaku Arita3 <sup>1</sup>*RIKEN* <sup>2</sup>*The University of Tokyo* <sup>3</sup>*ISIT (Institute of Systems, Information Technologies and Nanotechnologies) Japan*

#### **1. Introduction**

In this chapter, we introduce a physically-based framework for visual simulation of dyeing. Since ancient times, dyeing has been employed to color fabrics in both industry and arts and crafts. Various dyeing techniques are practiced throughout the world, such as wax-resist dyeing (*batik dyeing*), hand drawing with dye and paste (*Yuzen dyeing*), and many other techniques Polakoff (1971); Yoshiko (2002). Tie-dyeing produces beautiful and unique dyed patterns. The tie-dyeing process involves performing various geometric operations (folding, stitching, tying, clamping, pressing, etc.) on a support medium, then dipping the medium into a dyebath. The process of dipping a cloth into a dyebath is called dip dyeing.

The design of dye patterns is complicated by factors such as dye transfer and cloth deformation. Professional dyers predict final dye patterns based on heuristics; they tap into years of experience and intimate knowledge of traditional dyeing techniques. Furthermore, the real dyeing process is time-consuming. For example, clamp resist dyeing requires the dyer to fashion wooden templates to press the cloth during dyeing. Templates used in this technique can be very complex. Hand dyed patterns require the dyer's experience, skill, and effort, which are combined with the chemical and physical properties of the materials. This allows the dyer to generate interesting and unique patterns. There are no other painting techniques that are associated with the deformation of the support medium. In contrast to hand dyeing, dyeing simulation allow for an inexpensive, fast, and accessible way to create dyed patterns. We focus on dye transfer phenomenon and woven folded cloth geometry as important factors to model dyed patterns. Some characteristic features of liquid diffusion on cloth that are influenced by weave patterns, such as thin spots and mottles are shown in Figure 1. Also, we adopted some typical models of adsorption isotherms to simply show adsorption. Figure 2 shows the simulated results obtained using our physics-based dyeing framework and a real dyed pattern. Figure 3 depicts the framework with a corresponding dyeing process.

#### **2. Related work**

Non-photorealistic rendering (NPR) methods for painting and transferring pigments on paper have been developed for watercolor and Chinese ink paintings Bruce (2001); Chu & Tai (2005); Curtis et al. (1997); Kunii et al. (2001); Wilson (2004). These methods are often based on fluid

includes adsorption to reproduce the details of dyeing characteristics such as thin colored

Dyeing in Computer Graphics 17

However, the above methods are insufficient for simulating advanced dyeing techniques, such as tie-dyeing. Previous methods are strictly 2D, and are not designed to handle the folded 3D geometry of the support medium. There is no other simulation method that considers the folded 3D geometry of the support medium which clearly affects real dyeing results except for Morimoto et al. (2010). Morimoto et al. (2010) proposed a simulation framework that simulates dyed patterns produced by folding the cloth. In this chapter, we summerize

We represent the cloth by cells (see Figure 4). We define two kinds of cells, namely a cloth cell, and a diffusion cell. In cloth cells, parameters such as the weft or warp, the vertical position relative to the weave patterns, the size of threads and gaps, and other physical diffusion factors specific for each thread are defined. Each cloth cell is subdivided into several diffusion

Initially, cloth cells are defined by the size of the warps and wefts, which can be assigned arbitrarily. They are then arranged in the cloth at intervals equal to the spacing of gaps. Two layers are prepared as the weft and warp for cloth cells. Next, a defined weave pattern determines whether each cloth cell is orientated up or down. Diffusion cells are also arranged in the cloth size and two layers are formed. Their properties are defined in reference to the cloth cell in the layer that they are in. Each diffusion cell can have only one of two possible orientations (parallel to the x and y axes) as the fiber's orientation in its layer. Gravity is considered to be negligible in our dye transfer model since the dye is usually a colloidal liquid; this enables us to calculate the diffusion without considering the height in the cloth. There is thus no necessity to arrange diffusion cells in three-dimensional space, making it is easy to consider the connection between threads. The effect of height is considered in our model only

cloth cell = diffusion cells

side view side view

gap

warp

threads by considering the woven cloth, based on dye physics.

cells and these diffusion cells are then used to calculate the diffusion.

these studies.

**3. Cloth weave model**

for cloth rendering.

3D weave pattern

weft

warp

Fig. 4. The example of cloth cells with plain weave.

Fig. 1. Some characteristic features of dyeing. (a) thin spots, (b) bleeding ("nijimi" in Japanese), and (c) mottles.

Fig. 3. The general steps for a real dyeing process (top row Sakakibara (1999)) and our dyeing framework (bottom row) using the Chinese flower resist technique. (A) The woven cloth has a plain weave; the blue and yellow cells indicate the warp and the weft. (B) The unfolded cloth with user specified fold lines, the red and blue lines indicate ridges and valleys, and folds in the cloth. (C) The corresponding folded cloth in (B). (D, E) The interfaces representing user drawings on an unfolded and folded cloth. The gray lines indicate a user-specified boundary domain; these will be the dye resist regions. (F) The folded cloth with the red region indicating the exterior surfaces.

mechanics: Kunii et al. (2001) used Fick's second law of diffusion to describe water spreading on dry paper with pigments; Curtis et al. (1997) developed a technique for simulating watercolor effects; Chu & Tai (2005) presented a real-time drawing algorithm based on the lattice Boltzmann equation ; and Xu et al. (2007) proposed a generic pigment model based on rules and formulations derived from studies of adsorption and diffusion in surface chemistry and the textile industry.

Several studies have also investigated dyeing methods: Wyvill et al. (2004) proposed an algorithm for rendering cracks in *batik* that is capable of producing realistic crack patterns in wax; Shamey (2005) used a numerical simulation of the dyebath to study mass transfer in a fluid influenced by dispersion; and Morimoto et al. (2007) used a diffusion model that 2 Will-be-set-by-IN-TECH

Our simulated animation results Real pattern Magnified images

(a) Define weave (b) Specify cloth geometry (c) Supply dyes (Plain weave) Fold Press (Stitch) (Dip dyeing)

(A) (B) (C) (D) (E) (F)

mechanics: Kunii et al. (2001) used Fick's second law of diffusion to describe water spreading on dry paper with pigments; Curtis et al. (1997) developed a technique for simulating watercolor effects; Chu & Tai (2005) presented a real-time drawing algorithm based on the lattice Boltzmann equation ; and Xu et al. (2007) proposed a generic pigment model based on rules and formulations derived from studies of adsorption and diffusion in surface chemistry

Several studies have also investigated dyeing methods: Wyvill et al. (2004) proposed an algorithm for rendering cracks in *batik* that is capable of producing realistic crack patterns in wax; Shamey (2005) used a numerical simulation of the dyebath to study mass transfer in a fluid influenced by dispersion; and Morimoto et al. (2007) used a diffusion model that

Fig. 3. The general steps for a real dyeing process (top row Sakakibara (1999)) and our dyeing framework (bottom row) using the Chinese flower resist technique. (A) The woven cloth has a plain weave; the blue and yellow cells indicate the warp and the weft. (B) The unfolded cloth with user specified fold lines, the red and blue lines indicate ridges and valleys, and folds in the cloth. (C) The corresponding folded cloth in (B). (D, E) The interfaces representing user drawings on an unfolded and folded cloth. The gray lines indicate a user-specified boundary domain; these will be the dye resist regions. (F) The folded cloth

cloth

dyebath

dyer

Fig. 1. Some characteristic features of dyeing. (a) thin spots, (b) bleeding ("nijimi" in

Fig. 2. Comparisons of our simulated results with a real dyed pattern.

with the red region indicating the exterior surfaces.

and the textile industry.

Japanese), and (c) mottles.

includes adsorption to reproduce the details of dyeing characteristics such as thin colored threads by considering the woven cloth, based on dye physics.

However, the above methods are insufficient for simulating advanced dyeing techniques, such as tie-dyeing. Previous methods are strictly 2D, and are not designed to handle the folded 3D geometry of the support medium. There is no other simulation method that considers the folded 3D geometry of the support medium which clearly affects real dyeing results except for Morimoto et al. (2010). Morimoto et al. (2010) proposed a simulation framework that simulates dyed patterns produced by folding the cloth. In this chapter, we summerize these studies.

#### **3. Cloth weave model**

We represent the cloth by cells (see Figure 4). We define two kinds of cells, namely a cloth cell, and a diffusion cell. In cloth cells, parameters such as the weft or warp, the vertical position relative to the weave patterns, the size of threads and gaps, and other physical diffusion factors specific for each thread are defined. Each cloth cell is subdivided into several diffusion cells and these diffusion cells are then used to calculate the diffusion.

Initially, cloth cells are defined by the size of the warps and wefts, which can be assigned arbitrarily. They are then arranged in the cloth at intervals equal to the spacing of gaps. Two layers are prepared as the weft and warp for cloth cells. Next, a defined weave pattern determines whether each cloth cell is orientated up or down. Diffusion cells are also arranged in the cloth size and two layers are formed. Their properties are defined in reference to the cloth cell in the layer that they are in. Each diffusion cell can have only one of two possible orientations (parallel to the x and y axes) as the fiber's orientation in its layer. Gravity is considered to be negligible in our dye transfer model since the dye is usually a colloidal liquid; this enables us to calculate the diffusion without considering the height in the cloth. There is thus no necessity to arrange diffusion cells in three-dimensional space, making it is easy to consider the connection between threads. The effect of height is considered in our model only for cloth rendering.

Fig. 4. The example of cloth cells with plain weave.

• the position of the thread, including its orientation in the weave pattern (*τ*2(**x**)) determined by the connection between neighboring diffusion cells, whether they are in the same layer,

Dyeing in Computer Graphics 19

Each of these tortuosities has values in the range (0, 1]. There are five different conditions for *τ*3(**x**) which depend on factors such as the layers that neighboring diffusion cells are located in and their porosity. In Figure 5, colored lines indicate the conditions such as bellow list.

II (orange): Two fivers are in the same layer, and are connected to each other

In Figure 5, blue, yellow and white cells represent wefts, warps and gaps. Finally, the

The diffusion coefficient is calculated between diffusion cells using the following equation that is based on the Weisz-Zollinger modelS.-H. (August 1997) in accordance with our definition

where **p** is the porosity that can have any value in the range (0, 1], *f*<sup>0</sup> denotes the dye concentration in the external solution when equilibrium is achieved and is specified arbitrarily. *D*<sup>0</sup> is the diffusion coefficient in free water and is calculated according to the

(i,j,e)

(i,j+1,e)

(i,j,a)

Fig. 5. Connection between diffusion cells with tortuosity. The third factor in parentheses

(i-1,j,e) (i+1,j,e)

Δd

(i,j-1,e)

*T*(**x**) = *τ*1(**x**)*τ*2(**x**)*τ*3(**x**) (3)

*D*(**x**) = *D*0**p**(**x**)*T*(**x**)*f*<sup>0</sup> (4)

*<sup>D</sup>*<sup>0</sup> <sup>=</sup> 3.6√76/*<sup>M</sup>* (5)

whether they contain fibers, and whether their orientation is up or down.

• the different orientations of fibers in neighboring diffusion cells (*τ*3(**x**))

tortuosity of a cell *T*(**x**) between diffusion cells is defined as follows:

I (blue): Different layer

III (purple): Fiber and gap IV (green): gap and gap

V (red): fiver and fiver in the same layer

following equation: Van den (31 Deccember 1994)

where *M* denotes the molecular mass of the dye.

indicate the warp / weft layer (a / e).

Δd

Δd

perpendicularly

for *T*(**x**):

#### **4. Dye transfer model**

Our dye transfer model accounts for the diffusion, adsorption, and supply terms of the dye as described in an equation (1). The diffusion and adsorption terms describe the dye behavior based on the second law of Fick (1855) and dyeing physics, respectively. The supply term enables arbitrary dye distribution for dip dyeing and user drawings.

Let *<sup>f</sup>* <sup>=</sup> *<sup>f</sup>*(**x**, *<sup>t</sup>*) <sup>∈</sup> (0, 1] be a dye concentration function with position vector **<sup>x</sup>** ∈ �<sup>3</sup> and time parameter *t* ≥ 0, where *t* is independent of **x**. The dyeing model is formulated by the following evolutionary system of PDEs.

$$\frac{\partial f(\mathbf{x},t)}{\partial t} = \text{div}(D(\mathbf{x})\nabla f) + s(\mathbf{x},f) - a(\mathbf{x},f),\tag{1}$$

where *D*(**x**) is the diffusion coefficient function, div(·) and ∇(·) are the divergence and gradient operators respectively, and *s*(·, ·) and *a*(·, ·) are the source and sink terms that represent dye supply and adsorption, whereas div(*D*(**x**)∇ *f*) is the diffusion term. We model the functions *s*(·, ·) and *a*(·, ·) as follows.

$$s(\mathbf{x}, f) = \begin{cases} \alpha M\_s(\mathbf{x}) \text{ if } M\_s(\mathbf{x}) > f(\mathbf{x}, t) \text{ and } M\_{cd}(\mathbf{x}) > f(\mathbf{x}, t). \\ 0 & \text{Otherwise,} \end{cases}$$

$$a(\mathbf{x}, f) = \begin{cases} \beta f(\mathbf{x}, t) \text{ if } h(\mathbf{x}, t) < a\_d(\mathbf{x}, f) \text{ and } M\_{ca}(\mathbf{x}) > h(\mathbf{x}, t). \\ 0 & \text{Otherwise,} \end{cases}$$

where *α* is the user-specified dye concentration, *Ms*(**x**) ∈ [0, 1] is the dye supply map, *Mcd*(**x**) and *Mca*(**x**) are the diffusion and adsorption capacity maps, *β* ∈ [0, 1] is the user-specified adsorption rate, and *ad*(**x**, *f*) is the adsorption capacity according to adsorption isotherms. The adsorption isotherm depicts the amount of adsorbate on the adsorbent as a function of its concentration at constant temperature. In this model, we employ the Langmuir adsorption model Langmuir (1916), which is a saturation curve, to calculate *ad*(**x**, *f*) in our simulation based on the model developed by Morimoto et al. Morimoto et al. (2007). The adsorbed dye concentration *h*(**x**, *t*) ∈ [0, 1] is given by the equation bellow and the evolution of *f*(**x**, *t*) and *h*(**x**, *t*) as *t* → ∞ describes the dyeing process.

$$\frac{\partial h(\mathbf{x},t)}{\partial t} = a(\mathbf{x},f) \frac{M\_{cd}(\mathbf{x})}{M\_{cd}(\mathbf{x})} \tag{2}$$

Designing physically-based diffusion coefficient.

Each diffusion cell has various parameters including its weft layer or warp layer, fiber or gap (i.e., no fiber), orientation (either up or down), position, porosity, and tortuosity. Porosity is defined as the ratio of void volume in a thread fiber. Tortuosity denotes the degree of twist, so that the smaller the value of the tortuosity is, the larger the twist is. We define three kinds of tortuosities in our method:

• the twist of the thread (*τ*1(**x**)) defined in each thread

4 Will-be-set-by-IN-TECH

Our dye transfer model accounts for the diffusion, adsorption, and supply terms of the dye as described in an equation (1). The diffusion and adsorption terms describe the dye behavior based on the second law of Fick (1855) and dyeing physics, respectively. The supply term

Let *<sup>f</sup>* <sup>=</sup> *<sup>f</sup>*(**x**, *<sup>t</sup>*) <sup>∈</sup> (0, 1] be a dye concentration function with position vector **<sup>x</sup>** ∈ �<sup>3</sup> and time parameter *t* ≥ 0, where *t* is independent of **x**. The dyeing model is formulated by the

where *D*(**x**) is the diffusion coefficient function, div(·) and ∇(·) are the divergence and gradient operators respectively, and *s*(·, ·) and *a*(·, ·) are the source and sink terms that represent dye supply and adsorption, whereas div(*D*(**x**)∇ *f*) is the diffusion term. We model

0 Otherwise,

0 Otherwise,

where *α* is the user-specified dye concentration, *Ms*(**x**) ∈ [0, 1] is the dye supply map, *Mcd*(**x**) and *Mca*(**x**) are the diffusion and adsorption capacity maps, *β* ∈ [0, 1] is the user-specified adsorption rate, and *ad*(**x**, *f*) is the adsorption capacity according to adsorption isotherms. The adsorption isotherm depicts the amount of adsorbate on the adsorbent as a function of its concentration at constant temperature. In this model, we employ the Langmuir adsorption model Langmuir (1916), which is a saturation curve, to calculate *ad*(**x**, *f*) in our simulation based on the model developed by Morimoto et al. Morimoto et al. (2007). The adsorbed dye concentration *h*(**x**, *t*) ∈ [0, 1] is given by the equation bellow and the evolution of *f*(**x**, *t*) and

*αMs*(**x**) if *Ms*(**x**) *> f*(**x**, *t*) and *Mcd*(**x**) *> f*(**x**,*t*).

*β f*(**x**, *t*) if *h*(**x**, *t*) *< ad*(**x**, *f*) and *Mca*(**x**) *> h*(**x**, *t*).

*Mcd*(**x**) *Mca*(**x**)

, (2)

*<sup>∂</sup><sup>t</sup>* <sup>=</sup> div(*D*(**x**)<sup>∇</sup> *<sup>f</sup>*) + *<sup>s</sup>*(**x**, *<sup>f</sup>*) <sup>−</sup> *<sup>a</sup>*(**x**, *<sup>f</sup>*), (1)

enables arbitrary dye distribution for dip dyeing and user drawings.

*∂ f*(**x**, *t*)

**4. Dye transfer model**

following evolutionary system of PDEs.

the functions *s*(·, ·) and *a*(·, ·) as follows.

*s*(**x**, *f*) =

*a*(**x**, *f*) =

*h*(**x**, *t*) as *t* → ∞ describes the dyeing process.

Designing physically-based diffusion coefficient.

• the twist of the thread (*τ*1(**x**)) defined in each thread

tortuosities in our method:

*∂h*(**x**, *t*)

*<sup>∂</sup><sup>t</sup>* <sup>=</sup> *<sup>a</sup>*(**x**, *<sup>f</sup>*)

Each diffusion cell has various parameters including its weft layer or warp layer, fiber or gap (i.e., no fiber), orientation (either up or down), position, porosity, and tortuosity. Porosity is defined as the ratio of void volume in a thread fiber. Tortuosity denotes the degree of twist, so that the smaller the value of the tortuosity is, the larger the twist is. We define three kinds of


Each of these tortuosities has values in the range (0, 1]. There are five different conditions for *τ*3(**x**) which depend on factors such as the layers that neighboring diffusion cells are located in and their porosity. In Figure 5, colored lines indicate the conditions such as bellow list.

I (blue): Different layer

II (orange): Two fivers are in the same layer, and are connected to each other perpendicularly

III (purple): Fiber and gap

IV (green): gap and gap

V (red): fiver and fiver in the same layer

In Figure 5, blue, yellow and white cells represent wefts, warps and gaps. Finally, the tortuosity of a cell *T*(**x**) between diffusion cells is defined as follows:

$$T(\mathbf{x}) = \tau\_1(\mathbf{x})\tau\_2(\mathbf{x})\tau\_3(\mathbf{x})\tag{3}$$

The diffusion coefficient is calculated between diffusion cells using the following equation that is based on the Weisz-Zollinger modelS.-H. (August 1997) in accordance with our definition for *T*(**x**):

$$D(\mathbf{x}) = D\_0 \mathbf{p}(\mathbf{x}) T(\mathbf{x}) f\_0 \tag{4}$$

where **p** is the porosity that can have any value in the range (0, 1], *f*<sup>0</sup> denotes the dye concentration in the external solution when equilibrium is achieved and is specified arbitrarily. *D*<sup>0</sup> is the diffusion coefficient in free water and is calculated according to the following equation: Van den (31 Deccember 1994)

$$D\_0 = 3.6\sqrt{76/M} \tag{5}$$

where *M* denotes the molecular mass of the dye.

Fig. 5. Connection between diffusion cells with tortuosity. The third factor in parentheses indicate the warp / weft layer (a / e).

*dist*(**x**, B) ← *CalcDF*(B, Ω,L)

*P*(*i*, *c*) ← *dist*(*i*,B)/*c*

*dist*(*i*, Ω) ← (*distmax* − *dist*(*i*, Ω))

*dist*(*i*, <sup>Ω</sup>) ← *<sup>P</sup>*(*i*, *<sup>c</sup>*B<sup>1</sup> )*dist*(*i*, <sup>Ω</sup>)/*c*<sup>Ω</sup>

The capacity maps indicate the dye capacities in a cloth; they define the spaces that dyes can occupy. We first calculate the basic capacities from a fibre porosity parameter Morimoto et al. (2007). The cut-off constant *<sup>c</sup>*B<sup>2</sup> limits the press function *<sup>P</sup>*(**x**, *<sup>c</sup>*B<sup>2</sup> ) used here. We then multiply these capacities by the press function to obtain the capacity maps *Mcd*(**x**) and *Mca*(**x**) as

Dyeing in Computer Graphics 21

The basic capacity of the dye absorption in the diffusion cell *Va*(**x**) is determined by the ratio

Also, the maximum amount of dye adsorption (fixing dye) into fibers (*ad*(**x**, *f*)) is calculated each time step by adsorption isotherm based on the dyeing theories used in our model Langmuir (1916), Vickerstaff (1954). Figure 13 shows representative behavior of these typical adsorption isotherms. If we use the Freundlich equation (Figure 13 (b")) in our system, we can

where *k* is a constant, and B is a constant that lies in the range (0.1, 1). If *b* = 1, eq 8 become a linear equilibrium as shown in Figure 13 (a"). If we use the Langmuir equation (Figure 13 (c"))

of fiber in the diffusion cell according to the following expression:

*Mcd*(**x**) = *Vd*(**x**)*P*(**x**, *<sup>c</sup>*B<sup>2</sup> ), *Mca*(**x**) = *Va*(**x**)*P*(**x**, *<sup>c</sup>*B<sup>2</sup> ), (6)

*Va*(**x**) = 1 − **p**(**x**) (7)

*ad* = *k f <sup>b</sup>* (8)

**if** *dist*(*i*,B) *> c* **then** *P*(*i*, *c*) ← 1.0

**Pseudocode 1.** Press function. *dist*(**x**, Ω) ← *CalcDF*(Ω,B, L)

> **if** *dist*(*i*, Ω) *> c*<sup>Ω</sup> **then** *dist*(*i*, <sup>Ω</sup>) ← *<sup>P</sup>*(*i*, *<sup>c</sup>*B<sup>1</sup> )

*Ms*(**x**) ← *GaussFilter*(*dist*(**x**,Ω)) **Pseudocode 2.** Dye supply map.

**for** i=1 to m **do**

**else**

**end if end for**

**for** i=1 to m **do**

**else**

**end if end for**

Capacity maps.

followings (see Figure 9).

define *ad*(**x**, *f*) as:

Boundary condition.

Let **z** ∈ B be the boundary domain for dye transfer. We use the Neumann boundary condition *∂ f*(**z**,*t*) *<sup>∂</sup>***n**(**z**) = *b*(**z**) = 0, **z** ∈ B where **n**(**z**) is a unit normal vector of the boundary. In tie-dyeing, parts of the cloth are pressed together by folding and pressing. We assume that the pressed region is the boundary domain because no space exists between the pressed cloth parts for the dye to enter. In our framework, the user specifies B by drawing on both the unfolded and folded cloth, as shown in Figure 3 (D) and (E), respectively. In the case of the folded cloth, shown in Figure 3 (E), we project B to all overlapping faces of the folded cloth. Here, the faces are the polygons of the folded cloth, as shown in the paragraph, Diffusion graph construction.

Press function.

We introduce a press function *P*(**x**, *c*) ∈ [0, 1] as a press effect from dyeing technique. Here *c* is a user-specified cut-off constant describing the domain of influence of the dye supply and the capacity maps, and represents the physical parameters. The extent of the pressing effect and dye permeation depend on the both softness and elasticity of the cloth and on the tying strength. The press function serves to;


We approximate the magnitude of pressure using the distance field *dist*(**x**, B) obtained from the pressed boundary domain B. Note that the press effect only influences the interior surfaces of the cloth, as only interior surfaces can press each other.

We define Ω as the set of exterior surfaces of the tied cloth that are in contact with the dye and L as the fold lines that the user input to specify the folds. We define Ω, B, and L as fold features (Figure 6). We calculate the press function *P*(**x**, *c*) as described in Pseudocode 1. In Pseudocodes 1 and 2, *CalcDF*() calculates the distance field obtained from the fold feature indicated by the first argument, and returns infinity on the fold features indicated by the second and third arguments. We use *m* as the number of vertices in the diffusion graph described in the paragraph "Diffusion graph construction."

Dye supply map.

The dye supply map *Ms*(**x**) (Figure 7) describes the distribution of dye sources and sinks on the cloth, and is applied to the dye supply term in equation (1). In dip dyeing, the dye is supplied to both the exterior and interior surfaces of the folded cloth. The folded cloth opens naturally except in pressed regions, allowing liquid to enter the spaces between the folds (Figure 8). Thus, we assume that *Ms*(**x**) is inversely proportional to the distance from Ω, as it is easier to expose regions that are closer to the liquid dye. Also, the dye supply range depends on the movement of the cloth in the dyebath. We model this effect by limiting *dist*(**x**, Ω) to a cut-off constant *<sup>c</sup>*Ω. Another cut-off constant *<sup>c</sup>*B<sup>1</sup> limits the influence of the press function *<sup>P</sup>*(**x**, *<sup>c</sup>*B<sup>1</sup> ).

The method used to model the dye supply map *Ms*(**x**) is similar to the method used to model the press function, and is described in Pseudocode 2. In Pseudocode 2, *distmax* is the max value of *dist*(**x**, Ω) and *GaussFilter*() is a Gaussian function used to mimic rounded-edge folding (as opposed to sharp-edge folding) of the cloth.

6 Will-be-set-by-IN-TECH

Let **z** ∈ B be the boundary domain for dye transfer. We use the Neumann boundary condition

*<sup>∂</sup>***n**(**z**) = *b*(**z**) = 0, **z** ∈ B where **n**(**z**) is a unit normal vector of the boundary. In tie-dyeing, parts of the cloth are pressed together by folding and pressing. We assume that the pressed region is the boundary domain because no space exists between the pressed cloth parts for the dye to enter. In our framework, the user specifies B by drawing on both the unfolded and folded cloth, as shown in Figure 3 (D) and (E), respectively. In the case of the folded cloth, shown in Figure 3 (E), we project B to all overlapping faces of the folded cloth. Here, the faces are the polygons of the folded cloth, as shown in the paragraph, Diffusion graph construction.

We introduce a press function *P*(**x**, *c*) ∈ [0, 1] as a press effect from dyeing technique. Here *c* is a user-specified cut-off constant describing the domain of influence of the dye supply and the capacity maps, and represents the physical parameters. The extent of the pressing effect and dye permeation depend on the both softness and elasticity of the cloth and on the tying

We approximate the magnitude of pressure using the distance field *dist*(**x**, B) obtained from the pressed boundary domain B. Note that the press effect only influences the interior surfaces

We define Ω as the set of exterior surfaces of the tied cloth that are in contact with the dye and L as the fold lines that the user input to specify the folds. We define Ω, B, and L as fold features (Figure 6). We calculate the press function *P*(**x**, *c*) as described in Pseudocode 1. In Pseudocodes 1 and 2, *CalcDF*() calculates the distance field obtained from the fold feature indicated by the first argument, and returns infinity on the fold features indicated by the second and third arguments. We use *m* as the number of vertices in the diffusion graph

The dye supply map *Ms*(**x**) (Figure 7) describes the distribution of dye sources and sinks on the cloth, and is applied to the dye supply term in equation (1). In dip dyeing, the dye is supplied to both the exterior and interior surfaces of the folded cloth. The folded cloth opens naturally except in pressed regions, allowing liquid to enter the spaces between the folds (Figure 8). Thus, we assume that *Ms*(**x**) is inversely proportional to the distance from Ω, as it is easier to expose regions that are closer to the liquid dye. Also, the dye supply range depends on the movement of the cloth in the dyebath. We model this effect by limiting *dist*(**x**, Ω) to a cut-off constant *<sup>c</sup>*Ω. Another cut-off constant *<sup>c</sup>*B<sup>1</sup> limits the influence of the press function

The method used to model the dye supply map *Ms*(**x**) is similar to the method used to model the press function, and is described in Pseudocode 2. In Pseudocode 2, *distmax* is the max value of *dist*(**x**, Ω) and *GaussFilter*() is a Gaussian function used to mimic rounded-edge

Boundary condition.

Press function.

Dye supply map.

*<sup>P</sup>*(**x**, *<sup>c</sup>*B<sup>1</sup> ).

strength. The press function serves to;

• Limit dye supply (Pressed regions prevent dye diffusion). • Decrease the dye capacity (Pressed regions have low porosity).

of the cloth, as only interior surfaces can press each other.

described in the paragraph "Diffusion graph construction."

folding (as opposed to sharp-edge folding) of the cloth.

*∂ f*(**z**,*t*)

```
dist(x, B) ← CalcDF(B, Ω,L)
  for i=1 to m do
    if dist(i,B) > c then
       P(i, c) ← 1.0
    else
       P(i, c) ← dist(i,B)/c
    end if
  end for
Pseudocode 1. Press function.
  dist(x, Ω) ← CalcDF(Ω,B, L)
  for i=1 to m do
     dist(i, Ω) ← (distmax − dist(i, Ω))
    if dist(i, Ω) > cΩ then
       dist(i, Ω) ← P(i, cB1 )
    else
       dist(i, Ω) ← P(i, cB1 )dist(i, Ω)/cΩ
    end if
  end for
  Ms(x) ← GaussFilter(dist(x,Ω))
```
**Pseudocode 2.** Dye supply map.

Capacity maps.

The capacity maps indicate the dye capacities in a cloth; they define the spaces that dyes can occupy. We first calculate the basic capacities from a fibre porosity parameter Morimoto et al. (2007). The cut-off constant *<sup>c</sup>*B<sup>2</sup> limits the press function *<sup>P</sup>*(**x**, *<sup>c</sup>*B<sup>2</sup> ) used here. We then multiply these capacities by the press function to obtain the capacity maps *Mcd*(**x**) and *Mca*(**x**) as followings (see Figure 9).

$$M\_{\rm cd}(\mathbf{x}) = V\_{\rm d}(\mathbf{x}) P(\mathbf{x}, c\_{\mathcal{B}\_2}), \tag{6}$$
 
$$M\_{\rm cd}(\mathbf{x}) = V\_{\rm d}(\mathbf{x}) P(\mathbf{x}, c\_{\mathcal{B}\_2}), \tag{7}$$

The basic capacity of the dye absorption in the diffusion cell *Va*(**x**) is determined by the ratio of fiber in the diffusion cell according to the following expression:

$$V\_a(\mathbf{x}) = 1 - \mathbf{p}(\mathbf{x})\tag{7}$$

Also, the maximum amount of dye adsorption (fixing dye) into fibers (*ad*(**x**, *f*)) is calculated each time step by adsorption isotherm based on the dyeing theories used in our model Langmuir (1916), Vickerstaff (1954). Figure 13 shows representative behavior of these typical adsorption isotherms. If we use the Freundlich equation (Figure 13 (b")) in our system, we can define *ad*(**x**, *f*) as:

$$a\_d = kf^b \tag{8}$$

where *k* is a constant, and B is a constant that lies in the range (0.1, 1). If *b* = 1, eq 8 become a linear equilibrium as shown in Figure 13 (a"). If we use the Langmuir equation (Figure 13 (c"))

in our model, we can defined *ad*(**x**, *f*) as:

Diffusion graph construction.

illustrated in Figure 10.

(a) An illustration for the multiple two-layered cloth

model.

**v***i*.

cell center.

*ad*(**x**, *<sup>f</sup>*) = *Mcd*(**x**)*KL <sup>f</sup>*

Dyeing in Computer Graphics 23

where *KL* is the equilibrium constant. The resulting images are shown in Figure 12 and are calculated using these adsorption isotherms. The parameter *b*(**z**) prevents dyeing in the pressed area of the cloth and is used to represent the dyeing patterns of certain dyeing techniques. Curtis et al. (1997) used a similar method in which the paper affects fluid flow to some extent for watercolor and by doing so generates patterns. But the effect of this phenomenon is not as pronounced as that of dyeing patterns. In our method, we use the amount of dye that is not absorbed by the fiber to calculate the total amount of dye in the

We construct multiple two-layered cells from the two-layered cellular cloth model by cloth-folding operations. The diffusion graph G is a weighted 3D graph with vertices **v***i*, edges, and weights *wij* where *i*, *j* = 1, 2, .., *m*. The vertex **v***<sup>i</sup>* in the diffusion graph G is given by the

We apply the ORIPA algorithm Mitani (2008), which generates the folded paper geometry from the development diagram, to the user-specified fold lines on a rectangular cloth. The fold lines divide the cloth into a set of faces as shown in Figure 3 (B). The ORIPA algorithm generates the corresponding vertex positions of faces on the folded and unfolded cloths and the overlapping relation between every two faces as shown in Figure 3 (C). We apply ID rendering to the faces to obtain the overlapping relation for multiple two-layered cells. We then determine the contact areas between cells in the folded cloth, and construct the diffusion graph G by connecting all vertices **v***<sup>i</sup>* to vertices **v***<sup>j</sup>* in the adjacent contact cell by edges, as

diffusion cell. The basic diffusion capacity *Vd*(**x**) is calculated as bellow,

<sup>1</sup> <sup>+</sup> *KL <sup>f</sup>* (9)

*Vd*(**x**) = **p**(**x**)(1 − *b*(**z**)), (10)

Graph Vj Vi

(b) A graph in dot square in (a). (c) Contact cells.

Fig. 10. Graph construction from folded geometry of woven cloth. The bold line in (a) represents a fold line. The gray points in (c) are contact cell vertices **v***<sup>j</sup>* of the target cell vertex

Fig. 6. An example for calculating the press function *<sup>P</sup>*(**x**, *<sup>c</sup>*B<sup>1</sup> ) for the Chinese flower resist. In the fold features, the exterior surface Ω, pressed boundary domain B, and the fold lines L are shown by red, gray, and blue colors.

Fig. 7. An illustration of the dye supply map *Ms*(**x**) for the Chinese flower resist.

Fig. 8. Photographs of real dip dyeing. The left shows a folded cloth pressed between two wooden plates. The right shows folded cloths that have opened naturally in liquid.

Fig. 9. Illustration for our diffusion capacity map *Mcd*(**x**) calculated by taking the product of the basic capacity and *<sup>P</sup>*(**x**, *<sup>c</sup>*B<sup>2</sup> ).

8 Will-be-set-by-IN-TECH

Fig. 6. An example for calculating the press function *<sup>P</sup>*(**x**, *<sup>c</sup>*B<sup>1</sup> ) for the Chinese flower resist. In the fold features, the exterior surface Ω, pressed boundary domain B, and the fold lines L

> Multiply by *P*(**x**, *c*B<sup>1</sup> )

Fig. 7. An illustration of the dye supply map *Ms*(**x**) for the Chinese flower resist.

Fig. 8. Photographs of real dip dyeing. The left shows a folded cloth pressed between two

Press function *<sup>P</sup>*(**x**, *<sup>c</sup>*B<sup>2</sup> )

Fig. 9. Illustration for our diffusion capacity map *Mcd*(**x**) calculated by taking the product of

wooden plates. The right shows folded cloths that have opened naturally in liquid.

Basic capacity *Vd*

the basic capacity and *<sup>P</sup>*(**x**, *<sup>c</sup>*B<sup>2</sup> ).

Cut-off Normalize

Smoothing

Capacity map *Mcd*(**x**)

Press function *<sup>P</sup>*(**x**, *<sup>c</sup>*B<sup>1</sup> )

> Dye supply map *Ms*(**x**)

Fold features Distance field

are shown by red, gray, and blue colors.

Invert, cut-off by *c*Ω, normalize

Distance field *dist*(**x**, Ω)

*dist*(**x**, B)

in our model, we can defined *ad*(**x**, *f*) as:

$$a\_d(\mathbf{x}, f) = \frac{M\_{cd}(\mathbf{x}) K\_L f}{1 + K\_L f} \tag{9}$$

where *KL* is the equilibrium constant. The resulting images are shown in Figure 12 and are calculated using these adsorption isotherms. The parameter *b*(**z**) prevents dyeing in the pressed area of the cloth and is used to represent the dyeing patterns of certain dyeing techniques. Curtis et al. (1997) used a similar method in which the paper affects fluid flow to some extent for watercolor and by doing so generates patterns. But the effect of this phenomenon is not as pronounced as that of dyeing patterns. In our method, we use the amount of dye that is not absorbed by the fiber to calculate the total amount of dye in the diffusion cell. The basic diffusion capacity *Vd*(**x**) is calculated as bellow,

$$V\_d(\mathbf{x}) = \mathbf{p}(\mathbf{x})(1 - b(\mathbf{z})),\tag{10}$$

Diffusion graph construction.

We construct multiple two-layered cells from the two-layered cellular cloth model by cloth-folding operations. The diffusion graph G is a weighted 3D graph with vertices **v***i*, edges, and weights *wij* where *i*, *j* = 1, 2, .., *m*. The vertex **v***<sup>i</sup>* in the diffusion graph G is given by the cell center.

We apply the ORIPA algorithm Mitani (2008), which generates the folded paper geometry from the development diagram, to the user-specified fold lines on a rectangular cloth. The fold lines divide the cloth into a set of faces as shown in Figure 3 (B). The ORIPA algorithm generates the corresponding vertex positions of faces on the folded and unfolded cloths and the overlapping relation between every two faces as shown in Figure 3 (C). We apply ID rendering to the faces to obtain the overlapping relation for multiple two-layered cells. We then determine the contact areas between cells in the folded cloth, and construct the diffusion graph G by connecting all vertices **v***<sup>i</sup>* to vertices **v***<sup>j</sup>* in the adjacent contact cell by edges, as illustrated in Figure 10.

(a) An illustration for the multiple two-layered cloth model.

(b) A graph in dot square in (a). (c) Contact cells.

Fig. 10. Graph construction from folded geometry of woven cloth. The bold line in (a) represents a fold line. The gray points in (c) are contact cell vertices **v***<sup>j</sup>* of the target cell vertex **v***i*.

Fig. 12. Comparison of simulations with some adsorption isotherms. Total numbers of time

Dyeing in Computer Graphics 25

For visualizations of the dyed cloth, we render the images by taking the product of the sum

The results of our simulation are shown in Figs. 11, 12. Figure 11 (d) shows mottles similar to those in Figure 1 (c). This shows that mottles are formed with not just when the value of *τ*<sup>3</sup> *I*(**x**) is small but they are also produced by the two-layered model. Figures 11 (f) and (g) show the results for random **p**(**x**), while Figure 11 (e) shows the result for random *τ*1(**x**). Some thin colored threads can clearly be seen in Figure 11 (f). We find that **p**(**x**) has more effect on the final appearance than *τ*1(**x**). Figure 11 (b) shows the result obtained when a high absorption

Figure 12 shows results calculated using some adsorption isotherms as shown in Figure 13. (a) and (b) are the result obtained using the Freundlich model (eq 8) where *b* = 1, *k* = 1 and *b* = 0.3, *k* = 1. (c) is the result obtained using the Langmuir model (eq 9). (a'), (b') and (c') show only the absorbed dye densities of (a), (b) and (c), respectively. In this comparison, we

Figure 14 shows real dyed cloth and our simulated results for a selection of tie-dyeing techniques. The dyeing results are evaluated by examining the color gradation, which stems from cloth geometry. Our framework is capable of generating heterogeneous dyeing results by

of dye (transferred and adsorbed) and its corresponding weft and warp texture.

coefficient is used; in this result, the initial dyeing area seems to contain a lot of dye.

can observe the effect of the kind of adsorption isotherm has on the results obtained.

Fig. 13. Behavior of some typical adsorption isotherms.

steps is 50000.

**5. Result**

Physically-based model

Folded cloth geometry

Fig. 11. Computer generated dye stains with various parameters including *T*(**x**), **p**(**x**), weave, etc. Total number of time steps is 5000.

Discretization in diffusion graph.

The finite difference approximation of the diffusion term of equation (1) at vertex **v***<sup>i</sup>* of G is given by

$$\text{div}D(\mathbf{x})\nabla f \approx \sum\_{j \in \mathcal{N}(i)} w\_{ij} \frac{f(\mathbf{v}\_j, t) - f(\mathbf{v}\_i, t)}{|\mathbf{v}\_j - \mathbf{v}\_i|^2},\tag{11}$$

where *wij* = *DijAij*, *N*(*i*) is an index set of vertices adjacent to **v***<sup>i</sup>* in G, and *Dij* and *Aij* are the diffusion coefficient and the contact area ratio between vertices **v***<sup>i</sup>* and **v***j*, respectively (Figure 10). We calculate the distance between **v***<sup>i</sup>* and **v***<sup>j</sup>* from cell sizes, *δx*, *δy*, *δz*, and define *Dij* = (*D*(**v***i*) + *D*(**v***j*))/2 between vertices connected by folding.

The following semi-implicit scheme gives our discrete formulation of equation (1):

$$(I - (\delta t)L)\mathbf{f}^{n+1} = \mathbf{f}^n + \delta t(\mathbf{s}^n - \mathbf{a}^n),\tag{12}$$

which is solved using the SOR solver Press et al. (1992), where *I* is the identity matrix, *δt* is the discrete time-step parameter, *n* is the time step, and

$$\mathbf{f}^{n} = \{f(\mathbf{v}\_{1}, n), f(\mathbf{v}\_{2}, n), \dots, f(\mathbf{v}\_{m}, n)\}\_{\prime}$$

$$\mathbf{s}^{n} = \{s(\mathbf{v}\_{1}, f(\mathbf{v}\_{1}, n)), s(\mathbf{v}\_{2}, f(\mathbf{v}\_{2}, n)), \dots, s(\mathbf{v}\_{m}, f(\mathbf{v}\_{m}, n))\}\_{\prime}$$

$$\mathbf{a}^{n} = \{a(\mathbf{v}\_{1}, f(\mathbf{v}\_{1}, n)), a(\mathbf{v}\_{2}, f(\mathbf{v}\_{2}, n)), \dots, a(\mathbf{v}\_{m}, f(\mathbf{v}\_{m}, n))\}\_{\prime}$$

*L* is the *m*x*m* graph Laplacian matrix Chung (1997) of G. The element *lij* of *L* is given by

$$l\_{i\bar{j}} = \begin{cases} w\_{i\bar{j}} / |\mathbf{v}\_{\bar{j}} - \mathbf{v}\_{i}|^{2} & \text{if } i \neq j\_{\prime} \\ -\sum\_{j \in \mathcal{N}(i)} l\_{i\bar{j}} & \text{Otherwise.} \end{cases} \tag{13}$$

We then simply apply the forward Euler scheme to equation (2):

$$h(\mathbf{v}\_{i\prime}n+1) = h(\mathbf{v}\_{i\prime}n) + \delta t a(\mathbf{v}\_{i\prime}f(\mathbf{v}\_{i\prime}n)) \frac{M\_{cd}(\mathbf{v}\_{i})}{M\_{cd}(\mathbf{v}\_{i})} \tag{14}$$

The diffused and adsorbed dye amounts at **v***<sup>i</sup>* are given by *f*(**v***i*, *n*)*Mcd*(**v***i*) and *h*(**v***i*, *n*)*Mca*(**v***i*), respectively. The dye transfer calculation stops when the evolution of equation (1)converges to ∑*<sup>m</sup> <sup>i</sup>*=<sup>1</sup> <sup>|</sup> *<sup>f</sup>*(**v***i*, *<sup>n</sup>*)*<sup>n</sup>* <sup>−</sup> *<sup>f</sup>*(**v***i*, *<sup>n</sup>*)*n*−1|/*<sup>m</sup>* <sup>≤</sup> *�*.

10 Will-be-set-by-IN-TECH

Fig. 11. Computer generated dye stains with various parameters including *T*(**x**), **p**(**x**),

*j*∈*N*(*i*)

The following semi-implicit scheme gives our discrete formulation of equation (1):

div*D*(**x**)∇ *<sup>f</sup>* ≈ ∑

*Dij* = (*D*(**v***i*) + *D*(**v***j*))/2 between vertices connected by folding.

*lij* = 

We then simply apply the forward Euler scheme to equation (2):

equation (1)converges to ∑*<sup>m</sup>*

the discrete time-step parameter, *n* is the time step, and

(*I* − (*δt*)*L*)**f**

The finite difference approximation of the diffusion term of equation (1) at vertex **v***<sup>i</sup>* of G is

*wij*

where *wij* = *DijAij*, *N*(*i*) is an index set of vertices adjacent to **v***<sup>i</sup>* in G, and *Dij* and *Aij* are the diffusion coefficient and the contact area ratio between vertices **v***<sup>i</sup>* and **v***j*, respectively (Figure 10). We calculate the distance between **v***<sup>i</sup>* and **v***<sup>j</sup>* from cell sizes, *δx*, *δy*, *δz*, and define

which is solved using the SOR solver Press et al. (1992), where *I* is the identity matrix, *δt* is

**<sup>f</sup>***<sup>n</sup>* <sup>=</sup> { *<sup>f</sup>*(**v**1, *<sup>n</sup>*), *<sup>f</sup>*(**v**2, *<sup>n</sup>*), .., *<sup>f</sup>*(**v***m*, *<sup>n</sup>*)},

**<sup>s</sup>***<sup>n</sup>* <sup>=</sup> {*s*(**v**1, *<sup>f</sup>*(**v**1, *<sup>n</sup>*)),*s*(**v**2, *<sup>f</sup>*(**v**2, *<sup>n</sup>*)), ..,*s*(**v***m*, *<sup>f</sup>*(**v***m*, *<sup>n</sup>*))}, **<sup>a</sup>***<sup>n</sup>* <sup>=</sup> {*a*(**v**1, *<sup>f</sup>*(**v**1, *<sup>n</sup>*)), *<sup>a</sup>*(**v**2, *<sup>f</sup>*(**v**2, *<sup>n</sup>*)), .., *<sup>a</sup>*(**v***m*, *<sup>f</sup>*(**v***m*, *<sup>n</sup>*))},

*L* is the *m*x*m* graph Laplacian matrix Chung (1997) of G. The element *lij* of *L* is given by

*wij*/|**v***<sup>j</sup>* − **v***i*|

The diffused and adsorbed dye amounts at **v***<sup>i</sup>* are given by *f*(**v***i*, *n*)*Mcd*(**v***i*) and

*<sup>h</sup>*(**v***i*, *<sup>n</sup>* <sup>+</sup> <sup>1</sup>) = *<sup>h</sup>*(**v***i*, *<sup>n</sup>*) + *<sup>δ</sup>ta*(**v***i*, *<sup>f</sup>*(**v***i*, *<sup>n</sup>*)) *Mcd*(**v***i*)

*h*(**v***i*, *n*)*Mca*(**v***i*), respectively. The dye transfer calculation stops when the evolution of

*<sup>i</sup>*=<sup>1</sup> <sup>|</sup> *<sup>f</sup>*(**v***i*, *<sup>n</sup>*)*<sup>n</sup>* <sup>−</sup> *<sup>f</sup>*(**v***i*, *<sup>n</sup>*)*n*−1|/*<sup>m</sup>* <sup>≤</sup> *�*.

<sup>2</sup> if *<sup>i</sup>* �<sup>=</sup> *<sup>j</sup>*,

*f*(**v***j*, *t*) − *f*(**v***i*, *t*)

<sup>|</sup>**v***<sup>j</sup>* <sup>−</sup> **<sup>v</sup>***i*|<sup>2</sup> , (11)

*<sup>n</sup>*+<sup>1</sup> <sup>=</sup> **<sup>f</sup>***<sup>n</sup>* <sup>+</sup> *<sup>δ</sup>t*(**s***<sup>n</sup>* <sup>−</sup> **<sup>a</sup>***n*), (12)

<sup>−</sup> <sup>∑</sup>*j*∈*N*(*i*) *lij* Otherwise. (13)

*Mca*(**v***i*) (14)

weave, etc. Total number of time steps is 5000.

Discretization in diffusion graph.

given by

Fig. 12. Comparison of simulations with some adsorption isotherms. Total numbers of time steps is 50000.

Fig. 13. Behavior of some typical adsorption isotherms.

#### **5. Result**

For visualizations of the dyed cloth, we render the images by taking the product of the sum of dye (transferred and adsorbed) and its corresponding weft and warp texture.

#### Physically-based model

The results of our simulation are shown in Figs. 11, 12. Figure 11 (d) shows mottles similar to those in Figure 1 (c). This shows that mottles are formed with not just when the value of *τ*<sup>3</sup> *I*(**x**) is small but they are also produced by the two-layered model. Figures 11 (f) and (g) show the results for random **p**(**x**), while Figure 11 (e) shows the result for random *τ*1(**x**). Some thin colored threads can clearly be seen in Figure 11 (f). We find that **p**(**x**) has more effect on the final appearance than *τ*1(**x**). Figure 11 (b) shows the result obtained when a high absorption coefficient is used; in this result, the initial dyeing area seems to contain a lot of dye.

Figure 12 shows results calculated using some adsorption isotherms as shown in Figure 13. (a) and (b) are the result obtained using the Freundlich model (eq 8) where *b* = 1, *k* = 1 and *b* = 0.3, *k* = 1. (c) is the result obtained using the Langmuir model (eq 9). (a'), (b') and (c') show only the absorbed dye densities of (a), (b) and (c), respectively. In this comparison, we can observe the effect of the kind of adsorption isotherm has on the results obtained.

#### Folded cloth geometry

Figure 14 shows real dyed cloth and our simulated results for a selection of tie-dyeing techniques. The dyeing results are evaluated by examining the color gradation, which stems from cloth geometry. Our framework is capable of generating heterogeneous dyeing results by

**6. Conclusion**

more.

utilized widely.

**7. References**

pp. 57–64.

pages 707–718.

In this article, we introduced physically-based dyeing simulation frameworks. The framework is able to generate a wide range of dyed patterns produced using a folded woven

Dyeing in Computer Graphics 27

It is important to create real-world dyed stuffs using this system as an user study. However, these systems are not enough to simulate complex dyed patterns intuitively. For example, an interface for modeling dyeing techniques such as complex cloth geometries and coloring are important but they are not achieved. Other future work to simulate dyed patterns by PC is enriching physical simulation of dyeing. In the CG dyeing methods we introduced, there is no advection and color mixing. These factors make the dyeing system attractive and useful

After these future work achieved, practical problems of dyeing can be addressed. The problems include archiving and restoring traditional dyeing techniques, designing graphics of dyeing, education of the dyeing culture, etc. One of our important goal is that the real-world dyeing would be raised through these approaches. The dyeing frameworks in computer graphics should be used to enhance social interests in dyeing and enrich understanding but replace traditional real-world dyeing work. People can use the CG dyeing method for a wide range of aims. The methods include some factors of physics and design. In the future, visual simulation of dyeing would be able to develop as a theme between some scientic areas and be

Chu, N. S.-H. & Tai, C.-L. (2005). Moxi: real-time ink dispersion in absorbent paper, *ACM*

Chung, F. R. K. (1997). *Spectral Graph Theory*, American Mathematical Society. CBMS, Regional

Curtis, C. J., Anderson, S. E., Seims, J. E., Fleischer, K. W. & Salesin, D. H.

Series): 421–430. URL: *citeseer.ist.psu.edu/article/curtis97computergenerated.htm*

Kunii, T. L., Nosovskij, G. V. & Vecherinin, V. L. (2001). Two-dimensional diffusion model for

Langmuir, I. (1916). The constitution and fundamental properties of solids and liquids. part i.

Mitani, J. (2008). The folded shape restoration and the CG display of origami from the crease

Morimoto, Y., Tanaka, M., Tsuruno, R. & Tomimatsu, K. (2007). Visualization of dyeing based

Morimoto, Y., & Ono, K. (2010). Computer-Generated Tie-Dyeing Using a 3D Diffusion Graph,

on diffusion and adsorption theories, *Proc. of Pacific Graphics*, IEEE Computer Society,

*In Advances in VisualComputing (6th International Symposium on Computer Vision - ISVC 2010 (Oral presentation)), Lecture Notes in Computer Science*, Springer, volume 6453,

(1997). Computer-generated watercolor, *Computer Graphics* 31(Annual Conference

cloth, which are difficult to produce by conventional methods.

Bruce Gooch, A. G. (2001). *Non-Photorealistic Rendering*, A K Peters Ltd.

diffuse ink painting, *Int. J. of Shape Modeling* 7(1): 45–58.

solids., *Journal of the American Chemical Society* 38: 2221–2295.

pattern, *13th international Conference on Geometry and Graphics*.

Conference Series in Mathematics, Number 92.

Fick, A. (1855). On liquid diffusion, *Jour. Sci.* 10: 31–39.

*Trans. Graph.* 24(3): 504–511.

visualizing the dye transferring process. While we cannot perform a direct comparison of our simulated results to real results, as we are unable to precisely match the initial conditions or account for other detailed factors in the dyeing process, our simulated results (a, b) corrspond well with real dyeing results (c).

Fig. 14. Various tie-dyeing results and their corresponding conditions. (a) Our simulated results. (b) Our converged simulated results. (c) Real tie-dyeing results Sakakibara (1999). (d) Tie-dyeing techniques. (e) Folded cloths with user-specified boundary domains. (f) Fold features. (g) Dye supply maps *Ms*(**x**). (h) Dye capacity maps *Mcd*(**x**). In (f), (g), and (h), the top and bottom images indicate the top and bottom layers of the cloth model, respectively. The thin gray regions in the Seikaiha pattern (e) indicate regions that were covered with a plastic sheet to prevent dye supply on them; they are not the boundary domain. *n* is the number of time steps.

#### **6. Conclusion**

12 Will-be-set-by-IN-TECH

visualizing the dye transferring process. While we cannot perform a direct comparison of our simulated results to real results, as we are unable to precisely match the initial conditions or account for other detailed factors in the dyeing process, our simulated results (a, b) corrspond

(a) *<sup>n</sup>* <sup>=</sup> <sup>2700</sup> (b) *<sup>n</sup>* <sup>=</sup> <sup>7693</sup> (c) (d) (e) Seikaiha pattern

(a) *<sup>n</sup>* <sup>=</sup> <sup>300</sup> (b) *<sup>n</sup>* <sup>=</sup> <sup>3968</sup> (c) (d) (e) Kumo shibori

(a) *<sup>n</sup>* <sup>=</sup> <sup>500</sup> (b) *<sup>n</sup>* <sup>=</sup> <sup>1567</sup> (c) (d) (e) Itajime

> (f) (g) (h) Kumo shibori.

Fig. 14. Various tie-dyeing results and their corresponding conditions. (a) Our simulated results. (b) Our converged simulated results. (c) Real tie-dyeing results Sakakibara (1999). (d) Tie-dyeing techniques. (e) Folded cloths with user-specified boundary domains. (f) Fold features. (g) Dye supply maps *Ms*(**x**). (h) Dye capacity maps *Mcd*(**x**). In (f), (g), and (h), the top and bottom images indicate the top and bottom layers of the cloth model, respectively. The thin gray regions in the Seikaiha pattern (e) indicate regions that were covered with a plastic sheet to prevent dye supply on them; they are not the boundary domain. *n* is the

(f) (g) (h) Itajime

well with real dyeing results (c).

(f) (g) (h) Seikaiha pattern.

number of time steps.

In this article, we introduced physically-based dyeing simulation frameworks. The framework is able to generate a wide range of dyed patterns produced using a folded woven cloth, which are difficult to produce by conventional methods.

It is important to create real-world dyed stuffs using this system as an user study. However, these systems are not enough to simulate complex dyed patterns intuitively. For example, an interface for modeling dyeing techniques such as complex cloth geometries and coloring are important but they are not achieved. Other future work to simulate dyed patterns by PC is enriching physical simulation of dyeing. In the CG dyeing methods we introduced, there is no advection and color mixing. These factors make the dyeing system attractive and useful more.

After these future work achieved, practical problems of dyeing can be addressed. The problems include archiving and restoring traditional dyeing techniques, designing graphics of dyeing, education of the dyeing culture, etc. One of our important goal is that the real-world dyeing would be raised through these approaches. The dyeing frameworks in computer graphics should be used to enhance social interests in dyeing and enrich understanding but replace traditional real-world dyeing work. People can use the CG dyeing method for a wide range of aims. The methods include some factors of physics and design. In the future, visual simulation of dyeing would be able to develop as a theme between some scientic areas and be utilized widely.

#### **7. References**

Bruce Gooch, A. G. (2001). *Non-Photorealistic Rendering*, A K Peters Ltd.


**1. Introduction** 

textiles/apparels.

**3** 

*India* 

**Dyeing of Textiles with Natural Dyes** 

Textile materials (natural and synthetic) used to be coloured for value addition, look and desire of the customers. Anciently, this purpose of colouring textile was initiated using colours of natural source, untill synthetic colours/dyes were invented and commercialized. For ready availability of pure synthetic dyes of different types/classes and its cost advantages, most of textile dyers/ manufacturers shifted towards use of synthetic colourant. Almost all the synthetic colourants being synthesized from petrochemical sources through

Hence, worldwide, growing consciousness about organic value of eco-friendly products has generated renewed interest of consumers towards use of textiles (preferably natural fibre product) dyed with eco-friendly natural dyes. Natural dyes are known for their use in colouring of food substrate, leather as well as natural fibres like wool, silk and cotton as major areas of application since pre-historic times. Although this ancient art of dyeing textiles with natural dyes withstood the ravages of time, but due to the wide availability of synthetic dyes at an economical price, a rapid decline in natural dyeing continued. However, even after a century, the uses of natural dyes never erode completely and they are being still used in different places of the world. Thus, natural dyeing of different textiles and leathers has been continued mainly in the decentralized sector for specialty products besides the use of synthetic dyes in the large scale sector for general

Recently, most of the commercial dyers and textile export houses have started re-looking to the maximum possibilities of using natural dyes for dyeing and printing of different textiles for targeting niche market. Natural dyes produce very uncommon, soothing and soft shades as compared to synthetic dyes. On the other hand, synthetic dyes, which are widely available at an economical price and produce a wide variety of colours, sometimes causes skin allergy and other harmfulness to human body, produces toxicity/chemical hazards

For successful commercial use of natural dyes for any particular fibres, the appropriate and standardized techniques for dyeing for that particular fibre-natural dye system need to be adopted. Therefore to obtain newer shade with acceptable colour fastness behaviour and reproducible colour yield, appropriate scientific dyeing techniques/procedures are to be derived. Thus, relevant scientific studies and its output on standardization of dyeing

hazardous chemical processes poses threat towards its eco-friendliness.

during its synthesis, releases undesirable/hazardous/toxic chemicals etc.

Ashis Kumar Samanta and Adwaita Konar

*Institute of Jute Technology, University of Calcutta* 

*Department of Jute and Fibre Technology,* 

Polakoff, C. (1971). *The art of tie and dye in africa*, African Arts, African Studies Centre 4(3).

