22
Painterly Rendering with Curved Brush Strokes of Multiple Sizes Aaron Hertzman, NYU Presented by: Shreeganesh Ramanan

Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Embed Size (px)

DESCRIPTION

Painterly Rendering with Curved Brush Strokes of Multiple Sizes. Aaron Hertzman, NYU Presented by: Shreeganesh Ramanan. Introduction. Painterly Rendering is a method of reproducing artistic style and expression of a painting using a source image and/or 3D models An Image Space Technique - PowerPoint PPT Presentation

Citation preview

Page 1: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Painterly Rendering with Curved Brush Strokes of

Multiple Sizes

Aaron Hertzman, NYU

Presented by: Shreeganesh Ramanan

Page 2: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Introduction

• Painterly Rendering is a method of reproducing artistic style and expression of a painting using a source image and/or 3D models

• An Image Space Technique• A few steps beyond what

PhotoshopTM offers.

Page 3: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

A Sampler

Page 4: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

A Sampler

Page 5: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Things to discuss

• “curved brush strokes of multiple sizes”

• Implementation details(as little as possible )

• Various parameters and what they can do

Page 6: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

So you want to be an artist ?

• Do you have lot of time ?

• A huge smattering of skill ?

• That elusive thing called talent

• And some canvas, paints, a subject, and a dirty rag you call work clothes

Page 7: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Or we can turn to NPR

Page 8: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Previous Work…

• One brush size only

• No multiple passes to refine style

• Support for one style only

• Image looks “flattened”

Page 9: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Previous Work..

• But details need different sized strokes

Page 10: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

CBS of MS improves quality

Page 11: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Advantages

• Faster than painting– Can be used for interactive rendering

• Multiple brush sizes allow for varying detail and continuous color regions

• Multipass method similar to how artist paint

• Different parameters create different styles

Page 12: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Main Loopfunction paint (sourceImage, R1 … Rn)

{

canvas := a new constant color image

// paint the canvas

for each brush radius Ri,

from largest to smallest do

{

// apply Gaussian blur

referenceImage = sourceImage * G(fσRi)

// paint a layer

paintLayer(canvas, referenceImage, Ri)

}

return canvas

}

Page 13: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Painting a Layerfunction paintLayer(canvas, referenceImage, R) {

S := a new set of strokes, initially empty

D := difference(canvas, referenceImage)

grid := fg R

for x=0 to imageWidth stepsize grid do {

for y=0 to imageHeight stepsize grid do {

M := the region(x-grid/2…x+grid/2, y-grid/2…y+grid/2)

areaError := sumOfError(M, D) / grid2

if (areaError > T) then {

(x1, y1) := maxPoint(areaError)

stroke := makeStroke(R, x1, y1, referenceImage)

add stroke to S

}

} }

paint all strokes S on canvas – random order

}

Page 14: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Curved Brush Strokes

• Anti-aliased cubic B-Splines• Each stroke models the color

gradient of reference image• Representation– Control Points– Color– Size of brush

Page 15: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Spline Stroke Algorithmfunction makeSplineStroke(x0, y0, R, refImage) {

strokeColor = refImage.color(x0, y0)

K := new stroke, radius R, color strokeColor

add point (x0, y0) to K

(x, y) := (x0, y0)

(lastDx, lastDy) := (0, 0)

for i=1 to maxStrokeLength do {

if (i > minStrokeLength and (|refImage.color(x,y) – canvas.color(x,y)| < |refImage.color(x,y)-strokeColor)) then return K

if (refImage.gradientMag(x,y) ==0) then return K

(gx, gy) := refImage.gradientDirection(x, y)

(dx, dy) := (-gy, gx)

if (lastDx * dx + lastDy * dy < 0) then

(dx, dy) = (-dx, -dy)

(dx, dy) := fc * (dx,dy) + (1-fc) * (lastDx,lastDy)

(dx, dy) := (dx,dy)/(dx2 + dy2)1/2

(x, y) := (x + R*dx, y + R*dy)

(lastDx, lastDy) := (dx, dy)

add the point (x, y) to K

}

return K }

Page 16: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Calculating Control Points

θ0

G0

(x0, y0)

D1

(x1, y1)

(x2, y2)

D0

G1

θ1

G2

Page 17: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Parameters of Style

• Approximation Threshold (T)

• Brush Sizes – Smallest (Ri), Number (n), Size Ratio (Ri-1/Ri)

• Curvature Filter (fc)

• Blur Factor (fσ)

• Min and max stroke lengths (minLength, maxLength)

• Opacity (α)

• Grid size (fg)

• Color Jitter (jh, js, jv, jr, jg, jb)

Page 18: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Experiments in Style

Source Image

Page 19: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Experiments in Style

Impressionist

Page 20: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Experiments in Style

Expressionist

Page 21: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Experiments in Style

Colorist Wash

Page 22: Painterly Rendering with Curved Brush Strokes of Multiple Sizes

Experiments in Style

Pointillist