Document 7691755
Download
Report
Transcript Document 7691755
Computer-Generated
Watercolor
Cassidy J. Curtis
Sean E. Anderson
Joshua E. Seims
Kurt W. Fleischer
David H. Salesin
Outline
•
•
•
•
•
•
•
•
•
Introduction
Related work
Background
Overview
Watercolor simulation
Rendering
Applications
Results
Conclusion
Introduction
• Various artistic effects of watercolor
Related work
• Simulating artists’ traditional media and
tools
– Watercolor : [David Small 1991]
– Sumie : [Guo and Kunii 1991]
• Commercial package
– Fractal Design Painter
Background
• Properties of watercolor
– Watercolor paper
– Pigment
– Binder
– Surfactant
Background
• Watercolor Effects
•
•
•
•
•
•
a) dry-brush
b) Edge darkening
c) Backruns
d) granulation and separation of pigments
e) Flow patterns
f) color glazing
Overview
• Computer-generated watercolor
Glaze: physical properties, area
1. Fluid (and pigment) simulation for each glaze
2. Rendering
Fluid simulation
• Three-layer model
Fluid simulation
• Paper Generation
– Height field model ( 0 < h < 1 )
– Based on pseudo-random process
– Fluid capacity c: proportional to h
c h (cmax cmin ) cmin
Fluid simulation
• Main loop
Moving Water
For each time step
Moving Pigments
Transferring Pigments
Applying Capillary Flow
Fluid simulation
• Main loop
Moving Water
For each time step
Moving Pigments
Transferring Pigments
Applying Capillary Flow
Moving water
Moving Water
Moving Pigments
Transferring Pigments
• conditions of water
Applying Capillary Flow
1. To remain within the wet-area mask
Navier-Stoke Eq.
2. To flow outward into nearby region
3. To be damped to minimize oscillating waves
Viscous drag k
4. To be perturbed by the texture of the paper
Paper slope h
5. To be affected by local changes
Mass conserv.
6. To present the edge-darkening effect
Flow outward
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Configuration
– Staggered grid
(u, v) (i , j 0.5)
i,j
(u, v) (i 0.5, j )
(u, v) (i 0.5, j )
( p, g , d ...)
(u, v) (i , j 0.5)
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Updating the water velocities
– Governing Equation (2D Navier-Stoke Eqn.)
u
u
u
p
2
u v u
t
y
x
x
v
v
v
p
2
u v v
t
y
y
x
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Derivation of Navier-Stoke Eqn.(1/5)
dV
– Basic Eqn.: F mx m
dt
dV
– For unit volume: F
dt
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Derivation of Navier-Stoke Eqn.(2/5)
– Two kind of measurements
V (t )
solid
Control volume
fluid
V (t , x, y , z )
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Derivation of Navier-Stoke Eqn.(3/5)
– Eulerian view
dV (t , x, y, z ) V V x V y V z
dt
t x t y t z t
V V
V
V
u
v
w
t x
y
z
V
( V ) V
t
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Derivation of Navier-Stoke Eqn.(4/5)
– Governing Eq.: F
– Forces:
• Gravity:
g
• Viscosity:
2 V
• Pressure:
p
dV
dt
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Derivation of Navier-Stoke Eqn.(5/5)
– Navier-Stoke Eqn.
V
2
(V )V V p
t
– For 2D case,
u
u
u
p
2
u v u
t
y
x
x
v
v
v
p
2
u v v
t
y
y
x
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Updating the water velocities
– Numerical integration for u
ui 1.5, j ui 1.5, j ui .5, j 1 ui .5, j 1 4ui .5, j
u
u
u
p
2
u v u
t
y
x
x
ui.5, j ui .5, j
pi 1, j pi , j
t
ui .5, j (ui 1, j ui , j ) vi .5, j (ui , j 1 ui , j )
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Updating the water velocities
– Applying paper slope effect:
V V h
– Applying Drag Force:
F V
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Mass conservation (1/3)
– Divergence free condition
u v
0
x y
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Mass conservation (2/3)
– Relaxation (iterative procedure)
u v
x y
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Mass conservation (3/3)
– Relaxation (iterative procedure)
u v
x y
u v
( )
x y
(u, v)i , j
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Edge darkening
– To flow outward
• Remove some water at the boundary
p p (1 M)M
M : Wet mask
M : Gaussian Blurred mask
: Darkening coeff.
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Edge darkening
p p (1 M)M
dry
wet
0 0 0 1 1 1
0 .1 .4 .6 .9 1
0 0 0 .4 .1 0
0 0 0 1 1 1
0 .1 .4 .6 .9 1
0 0 0 .4 .1 0
0 0 0 1 1 1
0 .1 .4 .6 .9 1
0 0 0 .4 .1 0
M
M’
(1-M’)M
Fluid simulation
• Main loop
Moving Water
For each time step
Moving Pigments
Transferring Pigments
Applying Capillary Flow
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Moving Pigments
– To move as specified by the velocity field u,v
vi , j 0.5 g i , j
gi, j
ui 0.5, j g i , j
vi , j 0.5 g i , j
ui 0.5, j g i , j
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Moving Pigments
– To move as specified by the velocity field u,v
g i 1, j g i 1, j max( 0, ui 0.5, j g i , j )
g i 1, j g i 1, j max( 0,ui 0.5, j g i , j )
g i , j 1 g i , j 1 max( 0, vi , j 0.5 g i , j )
g i , j 1 g i , j 1 max( 0,vi , j 0.5 g i , j )
g i , j g i , j max( 0, ui 0.5, j g i , j ) max( 0,ui 0.5, j g i , j )
max( 0, vi , j 0.5 g i , j ) max( 0,vi , j 0.5 g i , j )
Fluid simulation
• Main loop
Moving Water
For each time step
Moving Pigments
Transferring Pigments
Applying Capillary Flow
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Transferring Pigments
– Adsorption and desorption
Adsorption
Desorption
h,
1 h, 1 / w
Fluid simulation
• Main loop
Moving Water
For each time step
Moving Pigments
Transferring Pigments
Applying Capillary Flow
Fluid simulation
Moving Water
Moving Pigments
Transferring Pigments
Applying Capillary Flow
• Backruns
– Diffusing water through the capillary layer
• Spreading slowly into a drying region
• Transfer water to its dryer neighbors until they are
saturated
Fluid simulation
• Drybrush effect
– By excluding any lower pixel than threshold
Rendering
• Optical properties of pigments
– Optical composition – subtractive color mixing
Rendering
• Optical properties of pigments
– Kubelka-Munk (KM) Model
– To compute Reflectance R and Transmittance T
using K and S
S
backscattered
unit length
absorbed
K
Rendering
• Optical properties of pigments
– Kubelka-Munk (KM) Model
sinh bSd
R
a sinh bSd b cosh bSd
b
T
a sinh bSd b cosh bSd
where a (S K ) / S , and b a 2 1
Rendering
• Optical properties of pigments
– Kubelka-Munk (KM) Model
– For multiple layers
2
1
T R2
R R1
1 R1 R2
T1T2
T
1 R1 R2
Rendering
• Optical properties of pigments
– Kubelka-Munk (KM) Model
We need S and K values
Make user choose them intuitively
Rendering
• Optical properties of pigments
– User selects Rw and Rb
Rendering
• Optical properties of pigments
– User selects Rw and Rb
2
b
(a Rw )( a 1)
1
1
S coth
b
b(1 Rw )
K S (a 1)
Rb Rw 1
1
, and b a 2 1
where a Rw
2
Rw
Applications
• 1. Interactive painting with watercolors
• 2. Automatic image “watercolorization”
• 3. Non-photorealistic rendering of 3D models
Applications
• 1. Interactive painting with watercolors
Applications
• 2. Automatic image “watercolorization”
– Color separation
– Brushstroke Planning
Applications
• 2. Automatic image “watercolorization”
– Color separation
• Determine the thickness of each pigment by bruteforce search for all color combinations
Applications
• 2. Automatic image “watercolorization”
– Brushstroke planning
Applications
• 3. Non-photorealistic rendering of 3D models
– Using “photorealistic” scene of 3D model
Results
Results
Results
Results
Conclusion
• Various artistic effects of watercolor
– Water and pigment simulation
– Pigment Rendering
• Application
– Interactive system
– Automatic “watercolorization” of 2D and 3D
Further work
• Other effects
– Spattering and drybrush
• Automatic rendering
– Applying automatic recognition
• Generalization
– Integration of Wet-in-wet and backruns
• Animation issues
– Reducing temporal artifacts