Top Banner
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
58

BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

May 27, 2018

Download

Documents

ngokiet
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 2: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 3: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 4: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL4

Goal

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

Page 5: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL5

Applications

Training

Education

Entertainment

Production

Page 6: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 7: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 8: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 9: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 10: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 11: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL11

System Context

Page 12: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL12

Input

Page 13: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL13

Brush Simulation

Page 14: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL14

Paint Simulation

Page 15: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL15

Paint Rendering

Page 16: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL16

System Overview

Page 17: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL17

System Demonstration

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

Page 18: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 19: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 20: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL20

Brush Spine Dynamics

Stiff dynamical system

Force large, mass small

Numerical integration requires small timestep

Page 21: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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)

Page 22: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL22

Brush Energy Minimization

Minimize

where

Subject to

Spring energy

Friction loss

Damping loss

Page 23: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL23

Brush Modeling Results

Page 24: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL24

System Demonstration

Video

Page 25: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 26: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 27: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL27

dAb Result Images

Page 28: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Frog

Rebecca

Holmberg

Page 29: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Apple

Sarah Hoff

Page 30: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Meadow

Rebecca

Holmberg

Page 31: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Man

Lauren Adams

Page 32: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Blossoms

Eriko Baxter

Page 33: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Road Bug

Rebecca

Holmberg

Page 34: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL34

Fluid Motion

Steps:

Determine velocity field

Advect material

Page 35: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 36: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 37: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL37

System Demonstration

Video

Page 38: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL38

Viscous Result Images

Page 39: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Woman in a Hat

Eriko Baxter

Page 40: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Field of Flowers

Eriko Baxter

Page 41: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The Beach

Andrea Mantler

Page 42: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Meadow

Haolong Ma

Page 43: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Abstract I

John Holloway

Page 44: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL44

IMPaSTo Paint Dynamics

Paint is very complex

IMPaSTo strategy:Model dominant terms

Page 45: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL45

2.5D Representation

Cross section of Monet’s Water Lillies

(Courtesy The Museum of Modern Art)

Page 46: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

Page 47: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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)

Page 48: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL48

Measurement

Data collection setup

SpectraScan PR-715

5600K Illuminant

Page 49: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

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

=

Page 50: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL50

Color Mixing Results

Page 51: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL51

System Demonstration

Video

Page 52: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL52

IMPaSTo Result Images

Page 53: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Ajisai

Eriko Baxter

Page 54: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Woman

Andrea Mantler

Page 55: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Dame en Blau

Heather Wendt

Page 56: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Gogh Studios

Room 1

William Baxter

Page 57: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Green

Eriko Baxter

Page 58: BRUSH - Computer Sciencelin/COMP089/LEC/vPaint.pdf · 1991, The Artist’s Handbook Rich, dynamic behavior ... Brush Complex geometry Stiff dynamical system ... No paint pickup

Abstract III

John Holloway