Computer-Generated Watercolor Cassidy J. Curtis Sean E. Anderson

Document Sample
Computer-Generated Watercolor Cassidy J. Curtis Sean E. Anderson Powered By Docstoc
					Computer-Generated Watercolor
    Cassidy J. Curtis          Sean E. Anderson
     Kurt W. Fleischer          David H. Salesin



                Irwin Chiu Hau
               Computer Science
                McGill University

                      Winter 2004


         Comp 767: Advanced Topics in Graphics
               Overview
 Introduction
 Properties of watercolor
 Computer-generated watercolor
 Applications
 Future work
 Conclusion
             Introduction
 What is watercolor painting?
 Computer generated watercolor as a
  non-photorealistic rendering
               Overview
 Introduction
 Properties of watercolor
 Computer-generated watercolor
 Applications
 Future work
 Conclusion
         Properties of Watercolor
   Watercolor materials
     Watercolor   paper
     Pigment
     Binder
     Surfactant

   Watercolor effects
                        Watercolor Paper
                            Typically   not made of wood pulp

                               from linen or cotton rags
                            But
                            pounded into small fibers
                                  Extremely absorbent to liquids


                            Filledwith sizing usually made of
                            cellulose
                                  Slows down the rate of water
Source: misterart.com              absorption and diffusion
                        Pigment




                         • A pigment is a solid material in
                           the form of small, separate
                           particles (ranging from 0.05 to
                           0.5 microns)
                         • Pigments vary in density

Source: misterart.com
         Binder and Surfactant
Binder
 Adsorption
   Enables the pigment
    to adhere to the paper


Surfactant                   Binder
                             Source: Jerry‟s ARTARAMA
 Allows water to soak
  into sized paper
         Properties of watercolor
 Watercolor materials
 Watercolor effects
     Dry-brush  effects
     Edge darkening
     Intentional backruns
     Granulation and Separation
     Flow Patterns
     Glazing
                  Dry-brush Effects
                                           Techniques
                                               Dry brush that is
                                                almost dried
                                               Applied at a proper
                                                angle


                                           Effects
                                               Irregular gaps
                                               Ragged edges
Source: Computer Generated Watercolor
                    Edge Darkening
                                           Techniques
                                               Wet-on-dry brushstroke


                                           Effect
                                               Darken edges




Source: Computer Generated Watercolor
               Intentional Backruns
                                 Occurs   when
                                    A puddle of water spread
                                     back into a damp region of
                                     paint
                                    A wash brush dries unevenly
                                    The water tends to push
                                     pigment along as it spreads

                                 Effect
                                    Complex branching shapes
Source:
                                    Severely darkened edges
Computer Generated Watercolor
Granulation and Separation of Pigments

                                 Granulation   of pigments
                                   Yields a kind of grainy textures
                                   Varies from pigment to pigment
                                   Strongest when paper is very
                                    wet


                                 Separation   of pigment
                                   Refers to splitting of colors
Source:                            Occurs when denser pigments
Computer Generated Watercolor       settle earlier than lighter ones
                        Flow Patterns
                                 In   wet-in-wet painting
                                      wet surface allows the
                                       brushstrokes to spread freely


                                 Effects
                                      Soft, feathery shapes



Source:
Computer Generated Watercolor
                                Glazing
                                 Techniques
                                    Adding very thin, pale layers,
                                     or washes, of watercolor, one
                                     over another
                                    Different pigments are not
                                     mixed physically, but optically


                                 Effects
                                    luminous
Source:
                                    glowing from within
Computer Generated Watercolor
               Overview
 Introduction
 Properties of watercolor
 Computer-generated watercolor
 Applications
 Future work
 Conclusion
   Computer-Generated Watercolor



Real watercolor effects




Simulated watercolor effects
Source: Computer Generated Watercolor
            Implementation
 Paper generation
 Data structure
 Fluid simulation
 Optical compositing
                         Paper Generation
   Use a simple model
      Paper  texture is modeled as a height field h
        and a fluid capacity field c
        h is pseudo-randomly generated , 0 < h < 1
        c = h * (cmax – cmin ) + cmin




Example paper textures     Source: Computer Generated Watercolor
                 Data Structure
   A complete painting consists of
     Ordered   set of washes over a sheet of paper
   Each wash may contain
     Various  pigments in varying quantities over
      different parts of the image
   We store these quantities in
    A   data structure called a „glaze‟
                        Glaze
   Each glaze is created
       by running a fluid simulation
   Inputs:
     Properties of pigments, paper, watercolor
      medium
     Wet-area mask

   Once the glazes are computed
       They are optically composited using the
        Kubelka-Munk color model
                   The Fluid Simulation
   Each wash simulated using a three-layer model




    Source: Computer Generated Watercolor
          The Fluid Simulation
Main loop

proc MainLoop
  for each time step do:
      MoveWater
      MovePigment
      TransferPigment
      SimulateCapillaryFlow
  end for
end proc
           The Fluid Simulation
 Cellular Automaton
 Definition from Mathworld.com
    A cellular automaton is a collection of "colored"
     cells on a grid of specified shape that evolves
     through a number of discrete time steps
     according to a set of rules based on the states
     of neighboring cells

                   Game of Life
                   Source: Mathworld.com
                   Move Water




                                 M : wet-area mask
proc MoveWater(M, u, v, p):
                                 u, v : velocity
  UpdateVelocities(M, u, v, p)
                                 p : water pressure
  RelaxDivergence(M, u, v, p)
  FlowOutward(M, p)              edge darkening
end proc
              Move Pigment




 Pigments move within the shallow-water layer as
  specified by the velocity field u, v
 Pigment from each cell are distributed to its
  neighbors at the rate of fluid movement out of
  the cell
                    Transfer Pigment
   Pigment adsorption and desorption
    proc TransferPigment(g 1, . . . ,g n,d 1, . . . ,d n ):
      for each pigment k do
        for all cells (i, j) do  g, d : pigment concentrations
          …




    Source: Computer Generated Watercolor
             Simulate Capillary Flow
   Diffusing water through the capillary layer
    proc SimulateCapillaryFlow(s, M ):   s : water saturation
                                             of the paper
      for each pigment k do
        for all cells (i, j) do
          …

                                            dry-brush effects
                                            backruns



Source: Computer Generated Watercolor
              The Fluid Simulation
Main loop          initial velocity   initial water saturation of the paper
initial wet-area mask                 initial water pressure
proc MainLoop(M, u, v, p, g 1, … , g n, d 1, … , d n, s ):
  for each time step do:
                              initial pigment concentrations
      MoveWater(M, u, v, p)
      MovePigment(M, u, v, g 1, … , g n)
      TransferPigment(g 1, … , g n, d 1, … , d n)
      SimulateCapillaryFlow(M, s)
  end for
end proc
                 Optical compositing
   Rendering the pigmented layers
     Use the Kubelka-Munk (KM) model to
      perform the optical compositing of glazing
      layers




    Source: Computer Generated Watercolor
        Kubelka-Munk (KM) Model
   Comes from KM Theory

   Tells us how to
     specify the optical properties of pigments
     optically composite pigments
     optically composite layers
               Overview
 Introduction
 Properties of watercolor
 Computer-generated watercolor
 Applications
 Future work
 Conclusion
              Applications
 Interactive painting with watercolors
 Automatic image “watercolorization”
 Non-photorealistic rendering of 3D models
               Interactive Painting
   User creates
     Glazes

   User adjusts
     Brush sizes
     Pigments
     Wet-mask area
     Physical
      parameters
                       Source: Computer Generated Watercolor
    Automatic image “watercolorization”

 “Automatically” convert a color image into
  a watercolor illustration
 Is done in two steps
     Colorseparation
     Brushstroke planning
                 Color Separation




Color Separation Process
Source: Computer Generated Watercolor
                 Brushstroke Planning
   Painter control the concentration and the flow of
    pigment in a wash
      Too much pigment                          Lack of pigment




                                              Add a pigmented wash




     Thins them by adding water
    Brushstroke Planning    Source: Computer Generated Watercolor
   Automatic image “watercolorization”




                                              Original image




An automatic watercolorization   Source: Computer Generated Watercolor
                   Steps for Rendering




Source: Computer Generated Watercolor
    Non-photorealistic rendering of
             3D models
 Given a 3D geometric scene, we
  automatically generate mattes isolating
  each object
 These mattes are used as input to the
  watercolorization process
 The user specifies the pigment choices
  and brushstroke planning
       Non-Photorealistic Animation




3D Scene                       Detail of one frame




Several frames from a non-photorealistic animation of moving clouds
Source: Computer Generated Watercolor
               Overview
 Introduction
 Properties of watercolor
 Computer-generated watercolor
 Applications
 Future work
 Conclusion
             Future Work
 Other effects
 Automatic rendering
 Generalization
 Animation Issues
               Overview
 Introduction
 Properties of watercolor
 Computer-generated watercolor
 Applications
 Future work
 Conclusion
                    Conclusion
   That‟s all about
    Computer Generated Watercolor

   Questions ???

   Discussions ???
                     References
   Cassidy J. Curtis, Sean E. Anderson,
    Kurt W. Fleischer and David H. Salesin.
    Computer-Generated Watercolor

   Images
       www.misterart.com
       www.jerrysartarama.com