BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic...

58
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 1 http://gamma.cs.unc.edu/DAB http://gamma.cs.unc.edu/IMPASTO http://gamma.cs.unc.edu/VISCOUS http://gamma.cs.unc.edu/BRUSH Virtual Painting

Transcript of BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic...

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL1

http://gamma.cs.unc.edu/DAB

http://gamma.cs.unc.edu/IMPASTO

http://gamma.cs.unc.edu/VISCOUS

http://gamma.cs.unc.edu/BRUSH

Virtual Painting

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL2

Digital Painting

Alvy Ray Smith and Ed Ernshwillerworking on “Paint”, 1979

Many advantages•Undo mistakes•Perfect copies•Unlimited reprints•No material cost•No drying•No fading or decay•No physical limits

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL3

Traditional Painting

“The dispatch with which a number of effects can be obtained by a direct, simple technique” – Mayer 1991, The Artist’s Handbook

Rich, dynamic behavior

Deformable brushes

Fluid paint

Intuitive control

3D input

Visual and haptic feedback

The process

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL4

Goal

Enable realistic interactive painting on computer with thick medium using realistic 3D brushes

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL5

Applications

Training

Education

Entertainment

Production

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL6

Artist’s Quote

“My artist's toolbox has oils and acrylics—and a computer. But the computer’s not tactile, and I miss that. You can't push junk around.”

– Tia, Pixar Animation Studios

http://www.pixar.com/artistscorner/tia/interview.html

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL7

Artist’s Quote

“I have used painter and

psp [Paint Shop Pro] for

a few yrs, and would

welcome something better,

would fight for, would

almost die for a program

like is described.”

--received by email 8/27/04

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL8

Problem Overview

BrushComplex geometry

Stiff dynamical system

PaintComplex surface

Complex behavior

Subsurface scattering

HapticsNeeds stability

Needs kHz updates

InteractionCanvas Brush contact

Canvas Brush transfers

IntegrationAll simulations must work interactively simultaneously

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL9

Natural Media

Rudolf et al. 2003

Curtis et al. 1997

Xu, et al. 2003Chu & Tai 2002

Corel Painter 8, 2003

Sousa, 1999

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL10

Brush Simulation

Strassman, 1986

Wong & Ip, 2000

Chu & Tai, 2003

Xu et al., 2003,2004

Only for ink painting

Specialized geometry

Lower stiffness

No real bristles

No paint pickup

Some not interactive

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL11

System Context

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL12

Input

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL13

Brush Simulation

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL14

Paint Simulation

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL15

Paint Rendering

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL16

System Overview

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL17

System Demonstration

http://www.youtube.com/watch?v=tZq-cpeZm8Q

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL18

Brush Modeling

Geometric modelingBrush has 1,000’s of hairs

Each interacts with paint & roughness/tooth of canvas

Dynamic simulationEach hair deformable and independent

Bristles have stiff dynamics

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL19

Geometric Modeling

Exploit bristle coherence

Define skeletal “spine” bristles

Deform surface or interpolate bristles

For smoother, neater marks For coarser, rougher marks

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL20

Brush Spine Dynamics

Stiff dynamical system

Force large, mass small

Numerical integration requires small timestep

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL21

Minimization Approach

Brush always at equilibrium so

A statics problem

Or quasi-static since

Energy min

Use standard, robust minimizer

E.g. Quasi-Newton SQP(Sequential Quadratic Programming)

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL22

Brush Energy Minimization

Minimize

where

Subject to

Spring energy

Friction loss

Damping loss

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL23

Brush Modeling Results

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL24

System Demonstration

Video

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL25

dAb Paint Simulation

Fast and simple

2D paint behavior

Modest system requirements

First bi-directional brush transfer

First complex loading

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL26

Complex brush loading

Enabled by 3D brush model + bi-directional transfer

An essential technique in traditional painting

Difficult previously

Useful component of interface

Virtual Painting

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL27

dAb Result Images

Frog

Rebecca

Holmberg

Apple

Sarah Hoff

Meadow

Rebecca

Holmberg

Man

Lauren Adams

Blossoms

Eriko Baxter

Road Bug

Rebecca

Holmberg

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL34

Fluid Motion

Steps:

Determine velocity field

Advect material

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL35

Simulating Paint - Velocity

Paint is a Viscous / Viscoplastic Fluid

Subject to boundary conditions

advection pressure viscosity elasticity

incompressibility

acceleration

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL36

Material Advection

Given velocity field v, move material according to the advection equation:

Material = Pigment & field

Semi-Lagrangian advection

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL37

System Demonstration

Video

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL38

Viscous Result Images

Woman in a Hat

Eriko Baxter

Field of Flowers

Eriko Baxter

The Beach

Andrea Mantler

Meadow

Haolong Ma

Abstract I

John Holloway

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL44

IMPaSTo Paint Dynamics

Paint is very complex

IMPaSTo strategy:Model dominant terms

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL45

2.5D Representation

Cross section of Monet’s Water Lillies

(Courtesy The Museum of Modern Art)

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL46

Simulating Paint - Velocity

Paint is a Viscous / Viscoplastic Fluid

Subject to boundary conditions

advection pressure viscosity elasticity

incompressibility

acceleration

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL47

Paint Color

Pigmented material

Subsurface scattering

Mixes nonlinearly:

Composites nonlinearly:

Kubelka-Munk model (1948,1954)

100% 0%+ = 50%

= + a(1-a)

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL48

Measurement

Data collection setup

SpectraScan PR-715

5600K Illuminant

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL49

Spectral Sampling

Use 8 wavelengthsSufficient (Duncan, 1949)

Efficient on GPU

Gaussian quadrature

Choose best 8 at runtime

Canvas

Reflectance Light Spectrum

Red

Green

Blue

R

G

B

=

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL50

Color Mixing Results

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL51

System Demonstration

Video

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL52

IMPaSTo Result Images

Ajisai

Eriko Baxter

Woman

Andrea Mantler

Dame en Blau

Heather Wendt

Gogh Studios

Room 1

William Baxter

Green

Eriko Baxter

Abstract III

John Holloway