Simulate them! Real-world footage Sponsored by SA2015.SIGGRAPH.ORG - - PowerPoint PPT Presentation

β–Ά
simulate them
SMART_READER_LITE
LIVE PREVIEW

Simulate them! Real-world footage Sponsored by SA2015.SIGGRAPH.ORG - - PowerPoint PPT Presentation

WetBrush: GPU-based 3D Painting Simulation at the Bristle Level 2 1 1,2 2 Zhili Chen, Byungmoon Kim, Daichi Ito, Huamin Wang 1 The Ohio State University 2 Adobe Research Sponsored by Oil Painting Complex physical interactions


slide-1
SLIDE 1

Sponsored by

WetBrush: GPU-based 3D Painting

Simulation at the Bristle Level

Zhili Chen, Byungmoon Kim, Daichi Ito, Huamin Wang

The Ohio State University Adobe Research

1,2 2 2 1 1 2

slide-2
SLIDE 2

Sponsored by

SA2015.SIGGRAPH.ORG

Oil Painting

Complex physical interactions

Bristle-Bristle Bristle-Fluid Fluid-Fluid

Simulate them!

Real-world footage

slide-3
SLIDE 3

Sponsored by

SA2015.SIGGRAPH.ORG

Previous works

Paint Fluid Model

Height field 3D volumetric density grid

Baxter, et al. 2004 Chu, et al. 2010

slide-4
SLIDE 4

Sponsored by

SA2015.SIGGRAPH.ORG

Previous works

Brush Model

2D stamping 2D Surface wrapped around skeleton 3D Brush projected onto 2D stamp Individual Bristles

Chu et al., 2002 Baxter et al., 2004 DiVerdi et al., 2010

slide-5
SLIDE 5

Sponsored by

SA2015.SIGGRAPH.ORG

Previous works

Brush-Paint Fluid Interaction

Brush-Fluid one way interaction

Deform when collide with canvas Imprint generated using as boundary condition

Simple color transfer/pickup function with texture map

In 2D imprint space Wrapped surface space

Chu, et al. 2010

slide-6
SLIDE 6

Sponsored by

SA2015.SIGGRAPH.ORG

What is missing?

β€œNot feel like real while painting”

Artists who are familiar with traditional media want

Correct brush deformation under force Brush that carries paint liquid for intuitive paint deposition Natural color mixing Fine details, not overly-smooth color Stroke variations and happy accident

slide-7
SLIDE 7

Sponsored by

SA2015.SIGGRAPH.ORG

Motivation

Oil Painting observed from molecule level

Brush carry paint

Adhesion between bristle molecule and fluid molecule Cohesion among fluid molecule

Color mixing

Fluid molecules carrying different pigments gather and show mixed color

slide-8
SLIDE 8

Sponsored by

SA2015.SIGGRAPH.ORG

System Overview

Brush Sim Renderer Grid Fluid Particle Fluid User Input

Brush head movement One-way Bristle-Particle Interaction One-way Fluid-Bristle Interaction Conversion

slide-9
SLIDE 9

Sponsored by

SA2015.SIGGRAPH.ORG

Brush

Brush Sim Renderer Grid Fluid Particle Fluid User Input

Brush head movement One-way Bristle-Particle Interaction One-way Fluid-Bristle Interaction Conversion

slide-10
SLIDE 10

Sponsored by

SA2015.SIGGRAPH.ORG

Brush Model

Model individual bristles

Bristle Vertices

For brush dynamics ~10 per bristle

Bristle Samples

For paint interaction B-spline curve Denser sample near tip ~50 per bristle

50-200 bristles

Bristle vertices (also samples) Bristle samples

slide-11
SLIDE 11

Sponsored by

SA2015.SIGGRAPH.ORG

Brush Dynamics Position-based Dynamics Collide with canvas/dry paint surface

πͺ" πͺ"#$ π‘š& πͺ" πͺ"#$ πͺ"'$ πœ„

Bending

In-extensiblity

slide-12
SLIDE 12

Sponsored by

SA2015.SIGGRAPH.ORG

Brush Dynamics

Bristle-Bristle Contact

Essential for correct brush shape under deformation

Precise line-line collision processing?

Too expensive for real-time

Particle based collision

SPH style repulsion

Avoid over-compression

Laplacian velocity filtering for inter-bristle friction

slide-13
SLIDE 13

Sponsored by

SA2015.SIGGRAPH.ORG

Brush

  • Correct brush shape even under extreme

deformation

  • Stroke variations achieved from contacts

between individual bristles

slide-14
SLIDE 14

Sponsored by

SA2015.SIGGRAPH.ORG

Brush

  • Allow creative use of brush just like
  • ne could with real brush
slide-15
SLIDE 15

Sponsored by

SA2015.SIGGRAPH.ORG

Fluid Simulation

Brush Sim Renderer Grid Fluid Particle Fluid User Input

Brush head movement One-way Bristle-Particle Interaction One-way Fluid-Bristle Interaction Conversion

slide-16
SLIDE 16

Sponsored by

SA2015.SIGGRAPH.ORG

Hybrid Fluid Representation

Brush

Fluid particles

Adaptive Hybrid Fluid Representation based on

Distance to brush Velocity

slide-17
SLIDE 17

Sponsored by

SA2015.SIGGRAPH.ORG

Hybrid Fluid Representation

Brush

Fluid particles

Particles

Adaptive Hybrid Fluid Representation based on

Distance to brush Velocity Β§Close to the brush Β§OR Fast Moving Β§Cover smaller region

slide-18
SLIDE 18

Sponsored by

SA2015.SIGGRAPH.ORG

Hybrid Fluid Representation

Brush

Fluid particles

Particles Density Grid

Adaptive Hybrid Fluid Representation based on

Distance to brush Velocity Β§Close to the brush Β§OR Fast Moving Β§Cover smaller region Β§Further away from the brush Β§AND Slow moving Β§Cover larger region

slide-19
SLIDE 19

Sponsored by

SA2015.SIGGRAPH.ORG

Hybrid Fluid Grid & Particles Visualized Only Particles Visualized

slide-20
SLIDE 20

Sponsored by

SA2015.SIGGRAPH.ORG

Grid Fluid

Grid (Density, velocity, pigment, dryness, oil ratio)

Moving sim window (256X256X32) within full canvas grid (4096X4096X32) Semi-Lagrangian Advection

Fast Fixed-Point Jacobi Method for solving pressure projection

Only 2-6 Jacobi iterations needed for acceptable error level Suitable for real-time applications Grid used only for slow moving region

See paper for details

slide-21
SLIDE 21

Sponsored by

SA2015.SIGGRAPH.ORG

Particle Fluid

Particles (velocity, pigment, oil ratio)

Interact with bristle sample points Borrow Grid fluid velocity field for incompressiblity in FLIP/PIC way Allow small amount of volume loss

  • vs. SPH / Position-Based Fluid

Less noisy (good for viscous fluid appearance) Faster (+ pressure projection already needed in grid)

slide-22
SLIDE 22

Sponsored by

SA2015.SIGGRAPH.ORG

Particle-Bristle Interaction

Brush Sim Renderer Grid Fluid Particle Fluid User Input

Brush head movement

One-way Bristle-Particle Interaction

One-way Fluid-Bristle Interaction Conversion

slide-23
SLIDE 23

Sponsored by

SA2015.SIGGRAPH.ORG

Particle-Bristle Interaction

Brush pushes fluid

Bristle sample points as boundary condition Particles get SPH repulse from bristles

Brush carries fluid

Directly compute adhesion force?

Adhesion is strong Unstable stiff system with large timestep Small timestep/substepping => non-real-time

Brush Sim Particle Fluid

slide-24
SLIDE 24

Sponsored by

SA2015.SIGGRAPH.ORG

Bristle-Particle Adhesion

Explicit adhesion force

π’ˆ* = βˆ’π‘™π‘”(𝒆1) Particles fail to follow fast moving brush

slide-25
SLIDE 25

Sponsored by

SA2015.SIGGRAPH.ORG

Bristle-Particle Adhesion

Brush and fluid particles carried Has little relative movement Adhesive force counteract inertial acceleration Better modelled in brush non-inertial frame

Canvas Frame 𝐽 Brush Frame 𝐢 Particle i

slide-26
SLIDE 26

Sponsored by

SA2015.SIGGRAPH.ORG

Stable Position-Based Adhesion

Canvas Frame 𝐽 Brush Frame 𝐢

𝒒"

π‘ͺ

𝒅π‘ͺ

𝝏π‘ͺ

π’˜π‘ͺ

𝑏"

; = 𝑆; 𝑏>?@ βˆ’ (𝑀;

Μ‡ + 2πœ•; ×𝑀"

; + πœ•; Γ— πœ•; Γ—π‘ž" ; + πœ•Μ‡;Γ—π‘ž" ;) βˆ’ H IJ 𝒆1 ;

𝑆; : transformation from canvas frame to brush frame π‘ž"

; = 𝑆;(𝑦" βˆ’ 𝑑;)

π’˜"

π‘ͺ

π’š"

External forces in canvas frame – gravity, friction, etc. Acceleration in brush frame Linear velocity of brush frame Angular velocity

  • f brush frame

Frame linear acceleration Frame angular acceleration Coriolis acceleration Centrifigual acceleration Direct adhesion force in brush frame

slide-27
SLIDE 27

Sponsored by

SA2015.SIGGRAPH.ORG

Stable Position-Based Adhesion

Canvas Frame 𝐽 Brush Frame 𝐢

𝒒"

π‘ͺ

𝒅π‘ͺ

𝝏π‘ͺ

π’˜π‘ͺ

𝑏"

; = 𝑆; 𝑏>?@ βˆ’ (𝑀;

Μ‡ + 2πœ•; ×𝑀"

; + πœ•; Γ— πœ•; Γ—π‘ž" ; + πœ•Μ‡;Γ—π‘ž" ;) βˆ’ H IJ 𝒆1 ;

π’˜"

π‘ͺ

π’š"

Linear velocity of brush frame Angular velocity

  • f brush frame

Direct adhesion force in brush frame Inertial acceleration

slide-28
SLIDE 28

Sponsored by

SA2015.SIGGRAPH.ORG

Stable Position-Based Adhesion

Canvas Frame 𝐽 Brush Frame 𝐢

𝒒"

π‘ͺ

𝒅π‘ͺ

𝝏π‘ͺ

π’˜π‘ͺ

𝑏"

; = 𝑆; 𝑏>?@ βˆ’ (𝑀;

Μ‡ + 2πœ•; ×𝑀"

; + πœ•; Γ— πœ•; Γ—π‘ž" ; + πœ•Μ‡;Γ—π‘ž" ;) βˆ’ H IJ 𝒆1 ;

π’˜"

π‘ͺ

π’š"

Linear velocity of brush frame Angular velocity

  • f brush frame

Direct adhesion force in brush frame Inertial acceleration

slide-29
SLIDE 29

Sponsored by

SA2015.SIGGRAPH.ORG

Stable Position-Based Adhesion

Canvas Frame 𝐽 Brush Frame 𝐢

𝒒"

π‘ͺ

𝒅π‘ͺ

𝝏π‘ͺ

π’˜π‘ͺ π’˜"

π‘ͺ

π’š"

Linear velocity of brush frame Angular velocity

  • f brush frame

Inertial acceleration

𝑏"

; = 𝑆; 𝑏>?@ βˆ’ 𝛾(𝑀;

Μ‡ + 2πœ•; ×𝑀"

; + πœ•; Γ— πœ•; Γ—π‘ž" ; + πœ•Μ‡;Γ—π‘ž" ;)

𝛾 = 𝛾(𝒆1

;)

𝛾: A function of distance to brush

slide-30
SLIDE 30

Sponsored by

SA2015.SIGGRAPH.ORG

Keep local non-inertial frame for every bristle sample point Particles assign to frame dynamically

Stable Position-Based Adhesion

𝐸$ Brush

Bristle vertices (also samples) Bristle samples Fluid particles under influence Fluid particles

𝐸$

slide-31
SLIDE 31

Sponsored by

SA2015.SIGGRAPH.ORG

Stable Position-Based Adhesion Brush carries paint by stable adhesion Natural mass preserving deposition of paint on canvas

slide-32
SLIDE 32

Sponsored by

SA2015.SIGGRAPH.ORG

Dry Brush Load Very dry brush still can produce strokes

Particles carried with adhesion will run out Keep minimum paint load on bristle samples

Emit paint fluid particles to produce stroke Absorb paint fluid particles to modify color

slide-33
SLIDE 33

Sponsored by

SA2015.SIGGRAPH.ORG

Fluid Representation

Why hybrid like this?

Brush Sim Renderer Grid Fluid Particle Fluid User Input

Brush head movement One-way Bristle-Particle Interaction One-way Fluid-Bristle Interaction Conversion

slide-34
SLIDE 34

Sponsored by

SA2015.SIGGRAPH.ORG

Fluid Representation

Why hybrid like this?

Volumetric grid vs. Height field

Want to model overhanging paint Full interaction with 3D brush

Overhang (Photographed)

slide-35
SLIDE 35

Sponsored by

SA2015.SIGGRAPH.ORG

Fluid Representation

Why hybrid like this?

Volumetric grid vs. Height field

Want to model overhanging paint Full interaction with 3D brush

Particle-Grid Hybrid vs. Grid only

Brush carrying paint Particles conserves mass so paint closer to brush does not disappear when moving fast Particles tracks thin features better

Grid Only Grid+Particle

slide-36
SLIDE 36

Sponsored by

SA2015.SIGGRAPH.ORG

Hybrid vs. Grid-only

Hybrid method reveals more details in

Surface shape Color mixing

slide-37
SLIDE 37

Sponsored by

SA2015.SIGGRAPH.ORG

Hybrid vs. Grid-only

Hybrid method reveals more details in

Surface shape

Subpixel level solid-fluid interaction with particles around brush Avoid over-smoothing from grid sampling in semi-Lagrangian advection

Color mixing

slide-38
SLIDE 38

Sponsored by

SA2015.SIGGRAPH.ORG

Hybrid vs. Grid-only

Hybrid method reveals more details in

Surface shape

Subpixel level solid-fluid interaction with particles around brush Avoid over-smoothing from grid sampling in semi-Lagrangian advection

Color mixing

Particles carryings different pigment are not merged immediately Avoid over-smoothing from sampling brush transfer texture

slide-39
SLIDE 39

Sponsored by

SA2015.SIGGRAPH.ORG

Results

slide-40
SLIDE 40

Sponsored by

SA2015.SIGGRAPH.ORG

Results

Compared with popular painting software

Better 3D shape Finer surface details More pigment variations along strokes

slide-41
SLIDE 41

Sponsored by

SA2015.SIGGRAPH.ORG

Results

Thick β€œImpasto” Style A lot of overhang

slide-42
SLIDE 42

Sponsored by

SA2015.SIGGRAPH.ORG

Results

Thinner painting style

slide-43
SLIDE 43

Sponsored by

SA2015.SIGGRAPH.ORG

Performance Implemented in CUDA GTX Titan X Average: 46 fps, 210K Particles (~3M at maximum)

5% 30% 24% 24% 8% 9% Grid-based liquid simulation

(6.5ms)

Particle-based liquid simulation

(5.2ms)

Grid-particle transfer

(5.2ms)

Brush simulation

(1.1ms)

Rendering

(2.0ms)

Bristle-particle transfer

(1.6ms)

slide-44
SLIDE 44

Sponsored by

SA2015.SIGGRAPH.ORG

Performance Implemented in CUDA GTX Titan X Average: 46 fps, 210K Particles

5% 30% 24% 24% 8% 9% Grid-based liquid simulation

(6.5ms)

Particle-based liquid simulation

(5.2ms)

Grid-particle transfer

(5.2ms)

Brush simulation

(1.1ms)

Rendering

(2.0ms)

Bristle-particle transfer

(1.6ms)

slide-45
SLIDE 45

Sponsored by

SA2015.SIGGRAPH.ORG

Limitations

Shear thinning fluid behavior not modelled Particles have to be densely sampled

for less noisy color mixing 27 particles per cell

No strict incompressiblity for particle fluid

Using velocity field with FLIP/PIC Particles not evenly distributed overtime, resulting in noisy surface

Some behaviors are more difficult for user control

Deposit rate, etc. more difficult to control than with procedural system

Requirement of high-end graphics hardware

slide-46
SLIDE 46

Sponsored by

SA2015.SIGGRAPH.ORG

Future Work

Optimization of implementation Unified simulation of watercolor, oil painting, etc Simplification and optimization for low-end devices Less exhaustive method for similiar quality

slide-47
SLIDE 47

Thank you!