46
Comp 767: Advanced Topics in Graphics Comp 767: Advanced Topics in Graphics Computer-Generated Computer-Generated Watercolor Watercolor Cassidy J. Curtis Cassidy J. Curtis Sean E. Anderson Sean E. Anderson Kurt W. Fleischer Kurt W. Fleischer David H. Salesin David H. Salesin Irwin Chiu Hau Irwin Chiu Hau Computer Science Computer Science McGill University McGill University Winter 2004 Winter 2004

Comp 767: Advanced Topics in Graphics Computer-Generated Watercolor Cassidy J. CurtisSean E. Anderson Kurt W. FleischerDavid H. Salesin Irwin Chiu Hau

Embed Size (px)

Citation preview

Comp 767: Advanced Topics in Graphics Comp 767: Advanced Topics in Graphics

Computer-Generated Computer-Generated WatercolorWatercolor

Cassidy J. CurtisCassidy J. Curtis Sean E. AndersonSean E. AndersonKurt W. FleischerKurt W. Fleischer David H. SalesinDavid H. Salesin

Irwin Chiu HauIrwin Chiu Hau

Computer ScienceComputer Science

McGill UniversityMcGill University

Winter 2004Winter 2004

OverviewOverview

IntroductionIntroductionProperties of watercolorProperties of watercolorComputer-generated watercolorComputer-generated watercolorApplicationsApplicationsFuture workFuture workConclusionConclusion

IntroductionIntroduction

What is watercolor painting?What is watercolor painting?Computer generated watercolor as Computer generated watercolor as

a non-photorealistic renderinga non-photorealistic rendering

OverviewOverview

IntroductionIntroductionProperties of watercolorProperties of watercolorComputer-generated watercolorComputer-generated watercolorApplicationsApplicationsFuture workFuture workConclusionConclusion

Properties of WatercolorProperties of Watercolor

Watercolor materialsWatercolor materialsWatercolor paperWatercolor paperPigmentPigmentBinderBinderSurfactantSurfactant

Watercolor effectsWatercolor effects

Watercolor PaperWatercolor Paper

Typically not made of wood Typically not made of wood pulppulp

But from linen or cotton rags pounded into small fibers

Extremely absorbent to liquids

Filled with sizing usually made Filled with sizing usually made of celluloseof cellulose

Slows down the rate of Slows down the rate of water absorption and diffusionSource:

misterart.com

PigmentPigment

Source: misterart.com

• 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

Binder and SurfactantBinder and Surfactant

BinderBinderAdsorptionAdsorption

Enables the pigment to adhere to the paper

SurfactantAllows water to soak

into sized paper

BinderSource: Jerry’s ARTARAMA

Properties of watercolorProperties of watercolor

Watercolor materialsWatercolor materialsWatercolor effectsWatercolor effects

Dry-brush effectsDry-brush effectsEdge darkeningEdge darkeningIntentional backrunsIntentional backrunsGranulation and SeparationGranulation and SeparationFlow PatternsFlow PatternsGlazingGlazing

Dry-brush EffectsDry-brush Effects

TechniquesTechniques Dry brush that is Dry brush that is

almost driedalmost dried Applied at a proper Applied at a proper

angleangle

EffectsEffects Irregular gapsIrregular gaps Ragged edgesRagged edges

Source: Computer Generated Watercolor

Edge DarkeningEdge Darkening

TechniquesTechniques Wet-on-dry Wet-on-dry

brushstrokebrushstroke

EffectEffect Darken edgesDarken edges

Source: Computer Generated Watercolor

Intentional BackrunsIntentional Backruns

Occurs whenOccurs whenA puddle of water spread A puddle of water spread

back into a damp region of back into a damp region of paintpaint

A wash brush dries A wash brush dries unevenlyunevenly

The water tends to push pigment along as it spreads

EffectEffectComplex branching shapesComplex branching shapesSeverely darkened edgesSeverely darkened edges

Source:

Computer Generated Watercolor

Granulation and Separation of Granulation and Separation of PigmentsPigments

Granulation of pigmentsGranulation of pigmentsYields a kind of grainy texturesYields a kind of grainy texturesVaries from pigment to Varies from pigment to

pigmentpigmentStrongest when paper is very Strongest when paper is very

wetwet

Separation of pigmentSeparation of pigment Refers to splitting of colorsRefers to splitting of colorsOccurs when denser pigments Occurs when denser pigments

settle earlier than lighter onessettle earlier than lighter onesSource:

Computer Generated Watercolor

Flow PatternsFlow Patterns

In wet-in-wet paintingIn wet-in-wet paintingwet surface allows the

brushstrokes to spread freely

EffectsEffectsSoft, feathery shapes

Source:

Computer Generated Watercolor

GlazingGlazing

TechniquesAdding very thin, pale layers,

or washes, of watercolor, one over another

Different pigments are not mixed physically, but optically

EffectsEffects luminousglowing from within

Source:

Computer Generated Watercolor

OverviewOverview

IntroductionIntroductionProperties of watercolorProperties of watercolorComputer-generated watercolorComputer-generated watercolorApplicationsApplicationsFuture workFuture workConclusionConclusion

Computer-Generated Computer-Generated WatercolorWatercolor

Simulated watercolor effects

Source: Computer Generated Watercolor

Real watercolor effects

ImplementationImplementation

Paper generationPaper generationData structureData structureFluid simulationFluid simulationOptical compositingOptical compositing

Paper GenerationPaper Generation

Use a simple modelUse a simple modelPaper texture is modeled as a height field h

and a fluid capacity field ch is pseudo-randomly generated , 0 < h < 1

c = c = h * (cmax – cmin ) + cmin

Example paper textures Source: Computer Generated Watercolor

Data StructureData Structure

A complete painting consists ofA complete painting consists ofOrdered set of washes over a sheet of Ordered set of washes over a sheet of

paperpaperEach wash may containEach wash may contain

Various pigments in varying quantities Various pigments in varying quantities over different parts of the imageover different parts of the image

We store these quantities inWe store these quantities inA data structure called a ‘glaze’A data structure called a ‘glaze’

GlazeGlazeEach glaze is createdEach glaze is created

by running a fluid simulationby running a fluid simulation Inputs:Inputs:

Properties of pigments, paper, Properties of pigments, paper, watercolor mediumwatercolor medium

Wet-area maskWet-area maskOnce the glazes are computedOnce the glazes are computed

They are optically composited They are optically composited using the Kubelka-Munk color model

The Fluid SimulationThe Fluid Simulation

Each wash Each wash simulated using a three-layer model

Source: Computer Generated Watercolor

The Fluid SimulationThe Fluid Simulation

Main loop

proc MainLoopfor each time step do:

MoveWaterMovePigmentTransferPigmentSimulateCapillaryFlow

end forend proc

The Fluid SimulationThe Fluid Simulation

Cellular AutomatonCellular AutomatonDefinition from Mathworld.comDefinition from Mathworld.com

A cellular automaton is a collection of A cellular automaton is a collection of "colored" cells on a grid of specified "colored" cells on a grid of specified shape that evolves through a number of shape that evolves through a number of discrete time steps according to a set of discrete time steps according to a set of rules based on the states of neighboring rules based on the states of neighboring cells cells

Game of Life

Source: Mathworld.com

Move WaterMove Water

proc MoveWater(M, u, v, p):UpdateVelocities(M, u, v, p)RelaxDivergence(M, u, v, p)FlowOutward(M, p)

end procedge darkening

M : wet-area masku, v : velocity

p : water pressure

Move PigmentMove 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 PigmentTransfer Pigment

Pigment adsorption and desorptionPigment 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 FlowSimulate Capillary Flow

Diffusing water through the capillary layerproc SimulateCapillaryFlow(s, M ): for each pigment k do for all cells (i, j) do …

backruns

s : water saturation of the paper

dry-brush effects

Source: Computer Generated Watercolor

The Fluid SimulationThe Fluid Simulation

Main loop

proc MainLoop(M, u, v, p, g 1, … , g n, d 1, … , d n, s ):for each time step do:

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 forend proc

initial wet-area mask

initial velocity

initial water pressure

initial pigment concentrations

initial water saturation of the paper

Optical compositingOptical compositingRendering the pigmented layers

Use the 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 TheoryComes from KM Theory

Tells us how toTells us how tospecify the optical properties of specify the optical properties of

pigmentspigmentsoptically composite pigmentsoptically composite pigmentsoptically composite layersoptically composite layers

OverviewOverview

IntroductionIntroductionProperties of watercolorProperties of watercolorComputer-generated watercolorComputer-generated watercolorApplicationsApplicationsFuture workFuture workConclusionConclusion

ApplicationsApplications

Interactive painting with watercolorsInteractive painting with watercolorsAutomatic image “watercolorization”Automatic image “watercolorization”Non-photorealistic rendering of 3D Non-photorealistic rendering of 3D

modelsmodels

Interactive PaintingInteractive Painting

User createsUser createsGlazesGlazes

User adjustsUser adjustsBrush sizesBrush sizesPigmentsPigmentsWet-mask Wet-mask

areaareaPhysical Physical

parametersparameters Source: Computer Generated Watercolor

Automatic image Automatic image “watercolorization”“watercolorization”

““Automatically” convert a color Automatically” convert a color image into image into a watercolor illustration

Is done in two stepsIs done in two stepsColor separationColor separationBrushstroke planningBrushstroke planning

Color SeparationColor Separation

Color Separation Process

Source: Computer Generated Watercolor

Brushstroke PlanningBrushstroke Planning

Too much pigment

Thins them by adding water

Lack of pigment

Add a pigmented wash

Brushstroke Planning Source: Computer Generated Watercolor

Painter control the concentration and the Painter control the concentration and the flow of pigment in a washflow of pigment in a wash

Automatic image Automatic image “watercolorization”“watercolorization”

An automatic watercolorization Source: Computer Generated Watercolor

Original image

Steps for RenderingSteps for Rendering

Source: Computer Generated Watercolor

Non-photorealistic rendering ofNon-photorealistic rendering of3D models3D models

Given a 3D geometric scene, we 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

Several frames from a non-photorealistic animation of moving clouds

Source: Computer Generated Watercolor

3D Scene Detail of one frame

OverviewOverview

IntroductionIntroductionProperties of watercolorProperties of watercolorComputer-generated watercolorComputer-generated watercolorApplicationsApplicationsFuture workFuture workConclusionConclusion

Future WorkFuture Work

Other effectsOther effectsAutomatic renderingAutomatic renderingGeneralizationGeneralizationAnimation IssuesAnimation Issues

OverviewOverview

IntroductionIntroductionProperties of watercolorProperties of watercolorComputer-generated watercolorComputer-generated watercolorApplicationsApplicationsFuture workFuture workConclusionConclusion

ConclusionConclusion

That’s all aboutThat’s all about

Computer Generated WatercolorComputer Generated Watercolor

Questions ???Questions ???

Discussions ???Discussions ???

ReferencesReferences

Cassidy J. Curtis, Sean E. Anderson,Cassidy J. Curtis, Sean E. Anderson,Kurt W. Fleischer and David H. Salesin. Kurt W. Fleischer and David H. Salesin. Computer-Generated WatercolorComputer-Generated Watercolor

ImagesImages www.misterart.comwww.misterart.comwww.jerrysartarama.com