Non-Photorealistic Computer Graphics Chapter 6 Simulating Natural - - PowerPoint PPT Presentation

non photorealistic
SMART_READER_LITE
LIVE PREVIEW

Non-Photorealistic Computer Graphics Chapter 6 Simulating Natural - - PowerPoint PPT Presentation

_ University of Magdeburg _ Non-Photorealistic Computer Graphics Chapter 6 Simulating Natural Media and Artistic Techniques Simulating Natural Media and Artistic Techniques 1 _ University of Magdeburg _ Simulating the Artist?


slide-1
SLIDE 1

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 1

Non-Photorealistic Computer Graphics

Chapter 6 Simulating Natural Media and Artistic Techniques

slide-2
SLIDE 2

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 2

Simulating the Artist?

  • Simulating the artist would mean:
  • Being able to simulate/emulate the human thinking,

especially also creative thinking.

  • Being able to simulate/emulate the influence of social

factors.

  • This is impossible and is also not what we want!
slide-3
SLIDE 3

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 3

Simulating Artistic Techniques

  • results of rule-based and algorithmic techniques often

too „regular“

  • inclusion of „randomness“ not an option

Arbitrariness suggests a choice made from a number of acceptable alternatives, randomness suggests a lack of consideration

  • Artists are far away from placing their strokes randomly,

every „pixel“ has its purpose and meaning.

 Our goals:

  • simulate artistic tools and the workings of these tools
  • emulate the effects of artistic techniques
  • enrich the expressiveness of computer graphics techniques
slide-4
SLIDE 4

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 4

Contents

  • Simulating Watercolor
  • using a heuristic strokes model
  • using cellular automata
  • using fluid dynamics
  • Simulating Pencils and Erasers
  • Simulating Wax Crayons
  • Simulating Decorative Mosaics
slide-5
SLIDE 5

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 5

  • 1. Simulating Watercolor
  • ...
  • watercolor techniques
  • wet-in-wet: a brush loaded with wet paint is added to

paper that is already saturated with water  paint spreads freely

  • wet-on-dry: brush is applied to dry paper  paint cannot

spread freely

 different effects which can be achieved

slide-6
SLIDE 6

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 6

1.1. Watercolor Effects

  • dry-brush effects

strokes with gaps and rugged edges by applying an almost dry brush

  • edge darkening

Paint cannot spread freely on dry paper due to adsorption and surface tension of water „drops“. Pigment migrates from the interior of a painted region towards its edges. Paint begins to dry there leaving a region with high pigment density at the edges

  • backruns

When a puddle of water spreads back into a damp region, the pigment is pushed along ist way resulting in complex, branching shapes.

  • granulation and separation of pigment

effects resulting from different sizes of pigments

  • flow patterns

In wet-in-wet paintings, paint can spread freely resulting in soft, feathery shapes.

slide-7
SLIDE 7

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 7

1.2. Hairy Brushes

  • proposed by Steve Strassmann 1984
  • uses the path and style metaphor
  • „Hairy Brushes“ model consists of 4 parts:
  • the brush
  • the stroke
  • the dip
  • the paper
  • object oriented system (programmed in LISP)
slide-8
SLIDE 8

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 8

1.2.1. The Brush

  • collection of bristles each of which having its own

amount of ink and a position within the brush

  • simplification: 1D array, centered at the stroke
  • implications:
  • brush always  to stroke  simpler computation
  • Spread of bristles can be expressed as a function of the

applied pressure.

  • No two bristles write on the same point of the paper.
  • less bristles, less influence on neighbors, faster
slide-9
SLIDE 9

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 9

1.2.2. The Stroke

  • set of parameters which evolve over an independent

varible

  • parameters:
  • position (x,y)
  • pressure (p)
  • independent variable might be
  • distance the brush has moved
  • elapsed time
slide-10
SLIDE 10

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 10

1.2.3. The Dip

  • describes the state of the brush when it is dipped in the

paint

  • carries enough information to restore the state in order

to being able to repeat a stroke with the same parameters

  • color and amount of ink for each bristle
  • positions of bristles within the brush

 determines visual effects

slide-11
SLIDE 11

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 11

1.2.4. The Paper

  • responsible for rendering the ink as it comes off the

brush

  • Each bristle sends a message to the paper object with

position and other relevant parameters.

  • paper renders the stroke  all parameters for the paper

need to be stored only here

slide-12
SLIDE 12

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 12

1.2.5. Algorithm to Create an Image

  • User defines a stroke by a list of position and pressure

samples.

  • Positions and pressures are later interpolated using cubic

curves.

  • Spline subdivided into sufficiently small intervals which

are approximated by line segments.

  • Representation of the path by n nodes:

(x,y,p,s)i i = 0, ..., n-1 with s being the distance along the curve

  • Discretize each segment to give the positions of the

brush„s center.

  • To draw the whole brushstroke, cover the region

between two consecutive nodes by a quadrilateral.

slide-13
SLIDE 13

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 13

1.2.5.1. One Segment

  • Assume a segment between the nodes A and B

 construct a quadrilateral with the following properties:

  • A bisects EH
  • B bisects FG
  • |EH| is the width

computed from the pressure at A

  • |FG| is the width

computed from the pressure at B

  • FG bisects the angle ABC

A B C E F G H

slide-14
SLIDE 14

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 14

1.2.5.2. Fill the Quadrilateral

1 P:= pixel position in output image (x,y) 2 S:= pixel position along the stroke by interpolating (SA,SB,SB,SA) on EFGH 3 B:= pixel position across the brush by interpolating (1,1,0,0) on EFGH 4 sort all generated data for each pixel by S 5 foreach pixel in order of S do 6 determine the nearest bristle to B 7 invoke drawing procedure for this bristle 8 update the bristle‘s state 9 od

slide-15
SLIDE 15

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 15

1.2.6. Special Effects

1. Some bristles may run dry faster than others:

  • different ink supply in the dip
  • different speed with which the ink is given to the paper

2. Colored paper

  • combine ink color with previously drawn color and paper

color

3. Bristles influence each other:

  • interaction between bristles by transferring ink to the

neighboring bristles

  • Cit: color of bristle i at time t
  • 0  D  1 controls the speed of diffusion

D C C D C C

t t t t

i i i i

2 ) 1 (

1 1

1

 

   

slide-16
SLIDE 16

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 16

Steve Strassmann: „Hairy Brushes“ In: Proceedings of SIGGRAPH‟86, pp. 225-232

slide-17
SLIDE 17

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 17

1.2.7. Summary Hairy Brushes

  • Hairy Brushes work on the level of pixels.
  • problems associated with pixel images:
  • discrete position for image elements
  • aliasing artifacts
  • artifacts when transforming the image
  • Literature:
  • Steve Strassmann. Hairy Brushes. Computer Graphics

(Proceedings of ACM SIGGRAPH 86), 20(4):225-232, 1986

slide-18
SLIDE 18

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 18

1.3. A Simulation Model

  • Requirements for a model (among others):
  • modeling the paper
  • paper structure / properties
  • paper color
  • modeling the paint
  • paint color and other optical properties
  • liquidity (mixture with water) and other physical properties
  • modeling the paint process
  • interaction paint  paper
  • interaction between different strokes
slide-19
SLIDE 19

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 19

1.3.1. Modeling the paper

  • first approach: Don„t care about additional properties

and take a bitmap representation.

  • stores color values in a grid of pixels
  • standard in paint systems
  • Pro: easy handling and display
  • Con: no modeling of paper properties (structure, color,

physical properties) possible

  • Solution: Cellular Automata
slide-20
SLIDE 20

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 20

Detour: Cellular Automata

  • not only used in NPR
  • A Cellular Automaton (CA) is a model of computation,

much like a Turing Machine or a Finite State Machine.

  • CA are closely connected with Finite State Machines
  • large grid of cells each posessing a certain state at a

given moment

  • number of states per cell is finite and usually small
  • All cells change states simultaneously.
  • The state of a cell at the next time step depends only on

the cell„s state at the current time step and on the state

  • f the neighboring cells.
  • state transformation guided by rules
  • basically a 2D organization of Finite State Machines
slide-21
SLIDE 21

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 21

  • evolution takes place in discrete time steps
  • each cell characterized by a state taken from a finite set of states
  • each cell evolves according to the same rule which depends only on the

state of the cell and a finite number of neighbouring cells

  • neighbourhood relation is local and uniform

Informal definition: consists of a regular discrete lattice of cells

  • L

a regular lattice (the elements of which we call cells)

  • S

a finite set of states

  • N

a finite set (of size n = |N|) of neighbourhood indices such that  c N,  r L: c+r L

  • f: Sn S

a transition function More formal definition: A CA is a 4-tuple (L, S, N, f)

slide-22
SLIDE 22

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 22

  • Applications for CA:
  • CA well known in simulation
  • best known example: Conway„s Game of Life
  • simulation of flows and distribution of flowing and

streaming matter

  • following example: simulation of an excitable medium

(think of a prairie fire)

slide-23
SLIDE 23

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 23

Red – burning Yellow – burnt down Green – growing / recovering

slide-24
SLIDE 24

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 24

  • For our simulation ...
  • ... we could see the paper as a grid of cells and model the

color distribution as a Cellular Automaton

  • Instead: use the principles of a CA but extend the model

(basically more sophisticated states)

 the „canvas“ model

slide-25
SLIDE 25

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 25

1.3.2. The Canvas Model

  • array of cells
  • each of them can hold paint

particles

  • each of the contains information

about

  • horizontal and vertical position
  • absorbancy
  • type and volume of paint it

holds

  • Each cell can hold a different

volume of paint before it

  • verflows  simulation of a

paper structure.

slide-26
SLIDE 26

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 26

1.3.3. The Paint Model

  • real world paints are different in terms of
  • kind of paint (watercolor, acrylic, oil, ...)
  • amount of dissolver (paint thinner) contained in the paint

(wetness of the paint)

  • color
  • ...
  • Mixing paint is an important issue, but very difficult to

handle.

slide-27
SLIDE 27

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 27

1.3.4. The Brush Model

  • A real world brush
  • deposits paint on the paper,
  • comes in different shapes,
  • has different properties regarding „paint handling“.
  • Models of paper, paint, and brush only handle parts of

the paint process  combination needed  the „paint engine“

slide-28
SLIDE 28

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 28

1 prepare the paper 2 apply consecutive strokes 2.1 prepare the brush 2.2 apply the brush to the paper 2.3 update all cells in the paper 3 visualize the canvas and the paint

1.3.5. The Paint Process

slide-29
SLIDE 29

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 29

1.3.5.1. Prepare the Paper

  • set up the „cellular automaton“ of the desired grid size
  • create the paper structure by altering the properties of

some cells

  • Simulate paper fibers by randomly placing line segments
  • ver the grid and thus by altering the capacity of the

underlying cells

  • textures introduce a hight field over the paper
  • Interactively place fibers
  • load pre-defined textures
slide-30
SLIDE 30

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 30

Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer-Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997.

slide-31
SLIDE 31

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 31

1.3.5.2. For Each Stroke

  • prepare the brush (2.1)
  • brush also modeled as a cellular automaton
  • initial ink distribution characterizes thickness of the brush

(less ink at the tip)

  • transfer functions describe
  • flow of ink towards the tip
  • unequal ink distribution in the brush
  • effect of bristles
  • apply brush to the paper (2.2)
  • determine which cells are affected by the brush (which

cells are covered by the brush)

  • deposit ink in the respective cells by transferring ink from

the CA cells of the brush to the cells of the paper CA

slide-32
SLIDE 32

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 32

  • update all cells in the paper (2.3)
  • That„s where the paint engine comes in.
  • state of a cell determined by its attributes and by those of

the paint in the cell

  • However: real paint behaves differently.
  • aging the paint held by a cell (reducing its liquid contents)
  • mimicking the effect of evaporation
  • gravity upon the paint (paper not horizontal)
  • sideways spreading (cell overflow, spreading along fibers)
slide-33
SLIDE 33

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 33

1.3.5.3. The Update Process

  • four steps:
  • transfer/diffusion of water particles

If a cell is filled with water, it will overflow and water is transferred to neighboring cells. Also overflowing water from neighboring cells is transferred to the given cell. The resulting amount of water in a cell is thus the pervious amount of water plus the sum of water flowing into that cell reduced by the amount of water flowing out of it.

  

      

N k k ij ij k ij ij

W W t W t t W ) ( ) ( ) (

slide-34
SLIDE 34

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 34

  • transfer of ink particles accompanying water particles

Ink is transported with the water. The amount of ink transported depends on the ink concentration and the amount

  • f water flowing in and out of that cell.

  

      

N k k ij ij k ij ij

I I t I t t I ) ( ) ( ) (

) ( ) ( t W t I W I

k k ij k ij k  

  

) ( ) ( t W t I W I

ij ij k ij k ij  

  

slide-35
SLIDE 35

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 35

  • Transfer of ink particles to balance the concentration

After water and ink transfer, the ink concentration has to be balanced out since solutions of fluids tend to balance the concentration to the most stable state. Change of ink concentration depends on the diffusion coefficient of ink in water and the two cells where the balancing takes place.

  • Evaporation of water

Subtracting a quantity of water from the cell‟s contents each time step.

 

    

N k ij dk ij ij

I t I t t I ) ( ) (

k ij ij ij ij k k ij k ij k k ij dk

W W W I W I W W I I W I I                

 

slide-36
SLIDE 36

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 36

1.3.6. Visualize the Contents of Each Cell

  • up to now: numerical model describing the image (paint

parameters per cell)

  • transformation of the contents of a cell into a pixel„s

color value regarding to the properties of the paint

  • for each cell compute the pixel value from the paint

attributes:

  • color
  • wetness
  • type of paint
slide-37
SLIDE 37

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 37

Zhang, Sato, Takahashi, Muraoka, and Chiba: „Simple Cellular Automaton-based Simulation of Ink Behaviour and Its Application to Suibokuga-like 3D Rendering of Trees“. In: The Journal of Visualization and Computer Animation, vol. 10, no. 1, pp. 27-37, 1999.

slide-38
SLIDE 38

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 38

Zhang, Sato, Takahashi, Muraoka, and Chiba: „Simple Cellular Automaton-based Simulation of Ink Behaviour and Its Application to Suibokuga-like 3D Rendering of Trees“. In: The Journal of Visualization and Computer Animation, vol. 10, no. 1, pp. 27-37, 1999.

slide-39
SLIDE 39

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 39

Zhang, Sato, Takahashi, Muraoka, and Chiba: „Simple Cellular Automaton-based Simulation of Ink Behaviour and Its Application to Suibokuga-like 3D Rendering of Trees“. In: The Journal of Visualization and Computer Animation, vol. 10, no. 1, pp. 27-37, 1999.

slide-40
SLIDE 40

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 40

1.3.7. Summary (of this approach)

  • very flexible
  • can be used in different levels of modeled detail
  • simulation approach rather time consuming (depending
  • n the level of detail)
  • great for parallel architectures
  • Literature
  • Quinglian Guo and Tosiyasu L. Kunii. Modeling the Diffuse

Paintings of Sumie. In Tosiyasu L. Kunii, editor, Modeling in Computer Graphics. Proceedings of the IFIP WG 5.10 Working Conference (Tokyo, April 1991), IFIP Series on Computer Graphics, pages 329-338, Tokyo, Berlin, Heidelberg, 1991. Springer-Verlag.

slide-41
SLIDE 41

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 41

1.4. Watercolor and Fluid Dynamics

  • other approach to simulate watercolor
  • combine physical and optical properties of watercolor in
  • ne model
  • physical properties described by fluid dynamics
  • optical properties given by reflection and transmission

behaviour of paint layers

slide-42
SLIDE 42

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 42

1.4.1. A Painting ...

  • ... is represented as an odered set of washes.
  • Each wash contains one paint stroke.
  • Each wash thus contains various pigments in varying

quantities over different parts of the image.

  • Fluid simulations are carried out in each wash.
  • All quantities are discretized over a 2D grid

representation of the surface of the paper.

slide-43
SLIDE 43

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 43

paper wash #1 wash #2 wash #n

slide-44
SLIDE 44

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 44

1.4.2. A Wash

  • three-layer model
  • shallow water layer

water and pigment flow above the surface of the paper

  • pigment deposition layer

pigment deposited onto and lifted from the surface of the paper

  • capillary layer

transport of water through paper pores

slide-45
SLIDE 45

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 45

Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer-Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997.

slide-46
SLIDE 46

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 46

1.4.3. Simulation Main Loop

1 foreach time step do 2 move water 3 move pigment 4 transfer pigment 5 simulate capillary flow 6 od

slide-47
SLIDE 47

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 47

1.4.3.1. Moving Water

  • flow simulation with many constraints:
  • perturbation by the paper texture
  • local changes have global effect
  • outward flow towards the edges  create an edge

darkening effect

  • ...
  • simulation uses differential equations
slide-48
SLIDE 48

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 48

1.4.3.2. Moving Pigments

  • Pigments move within the shallow water layer.
  • distribution of pigments from each cell to its neighbours

according to the rate of fluid movement out of the cell

  • simple metaphor: water picks up pigments and

transports pigments along the way

slide-49
SLIDE 49

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 49

1.4.3.3. Transferring Pigment

  • Pigments are adsorbed by the pigment deposition

layer at a certain rate and also desorbed back into the fluid

1.4.3.4. Capillary Flow

  • Water is adsorbed from the shallow water layer and

diffuses through the capillary layer.

slide-50
SLIDE 50

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 50

Hand-made watercolor strokes Simulated watercolor strokes Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer-Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997.

slide-51
SLIDE 51

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 51

1.4.4. Visualization

  • Each pigment is assigned a set of
  • absorption coefficients K, and
  • scattering coefficients S
  • coefficients determined by experiments
  • compute reflectance and transmittance for each layer

(Kubelka-Munk model)

  • combine two consecutive layers by composing the
  • ptical properties
  • render the pixel using overall reflectance and

transmittance

slide-52
SLIDE 52

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 52

Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer-Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997.

slide-53
SLIDE 53

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 53

Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer-Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997.

slide-54
SLIDE 54

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 54

Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer-Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997.

slide-55
SLIDE 55

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 55

1.4.5. Summary (of this approach)

  • computationally very expensive
  • simulation of physical behaviour (differential equations)
  • very good visual approximation
  • Literature
  • Cassidy J. Curtis, Sean E. Anderson, Joshua E. Seims, Kurt
  • W. Fleischer, and David H. Salesin. Computer-Generated
  • Watercolor. In Turner Whitted, editor, Proceedings of ACM

SIGGRAPH 97, Computer Graphics Proceedings, Annual Conference Series, pages 421-430, New York, 1997. ACM Press/ACM SIGGRAPH.

slide-56
SLIDE 56

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 56

1.5. Conclusion (watercolor)

  • different approaches for simulating watercolor
  • path and style based à la „Hairy Brushes“
  • simplistic approaches as in paint programs
  • image processing filters (Photoshop)
  • simulation approaches
  • However, there is not such a thing as a simulated

painting:

  • real paintings are „3D“ (especially oil paintings)
  • real paintings age over time
  • ...
slide-57
SLIDE 57

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 57

  • 2. Simulating Pencil Drawings
  • easy approach: pixel filters as can be found in many

image processing programs

  • our approach: examine physical pencils and drawings on

a microscopic level

  • model the drawing process on this level
slide-58
SLIDE 58

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 58

2.1. The Microscopic Level

  • Each pencil has a writing core which is a mixture of

graphite, wax (as lubricant) and clay (as binding agent).

  • The hardness of a pencil depends on the graphite : clay

ratio.

very hard pencils 4 : 5; very soft pencils 90 : 4

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 9H 8H 7H 6H 5H 4H 3H 2H H F HB B 2B 3B 4B 5B 6B 7B 8B hard soft pencil type composition ratio graphite clay wax

slide-59
SLIDE 59

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 59

  • The weight of the paper determines the paper thickness

(measured in grams per square inch, in Germany grams per square meter).

  • Paper textures – smooth, semi-rough, rough – are

determined by microscopic „teeth“ which form peaks and valleys allowing lead particles to adhere to the paper.

slide-60
SLIDE 60

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 60

Different levels of magnification of a top view of paper

  • M. Sousa: „Computer-Generated Graphite Pencil Materials and Rendering“ PhD thesis. University of Alberta, 1999

×50, empty paper ×50, soft pencil ×50, hard pencil ×200, empty paper ×200, soft pencil ×200, hard pencil

slide-61
SLIDE 61

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 61

Different levels of magnification of a cross sectional view of paper

  • M. Sousa: „Computer-Generated Graphite Pencil Materials and Rendering“ PhD thesis. University of Alberta, 1999

×1000, empty paper ×1000, hard pencil ×2000, empty paper ×2000, soft pencil ×2000, hard pencil

slide-62
SLIDE 62

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 62

2.2. The Simulation

We„ll talk about the following:

1. the pencil model 2. the paper model 3. pencil-paper-interaction 4. visualization of the results

slide-63
SLIDE 63

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 63

2.2.1. The Pencil Model

  • Pencils are sharpened with a knife which results in

particular tip shapes.

  • modeling the pencil tip: convex polygon with at least

three edges

  • amount of deposited lead depends on the pressure

applied to the pencil

  • modeled by assigning pressure coefficients to the

polygon vertices as well as to the center of the polygon

slide-64
SLIDE 64

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 64

The model treats pencil tips as convex polygons with three or more edges.

  • M. Sousa: „Computer-Generated Graphite Pencil Materials and Rendering“ PhD thesis. University of Alberta, 1999
slide-65
SLIDE 65

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 65

The higher a pressure coefficient, the more surface of the pencil comes into contact with the paper surface

  • M. Sousa: „Computer-Generated Graphite Pencil

Materials and Rendering“ PhD thesis. University of Alberta, 1999

slide-66
SLIDE 66

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 66

2.2.2. Paper Model

  • as with many paper models: height field between 0 and

1: 0  h  1

  • generate this height field
  • procedurally
  • interactively
  • by using digitized paper samples
  • modeling paper on the level of grains
slide-67
SLIDE 67

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 67

2.2.2.1. A Grain

  • smallest element of the

paper„s rough surface

  • container which is filled

with lead

  • defined by giving the

heights at the paper position and the three neighbours

slide-68
SLIDE 68

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 68

  • grain can be filled with at most an

amount Tv of lead

  • If all hi are the same

 Tv = const = Fs

  • at least on hi differs: Vg is the

volume from the top by the lowest plane not cutting the grain and from below by the top surface of the grain

  • Tv = Vg · Fv
  • Fv maximum amount of lead to

completely fill the volume of the grain

  • FS, Fv assigned beforehand
slide-69
SLIDE 69

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 69

2.2.2.2. Lead Distribution

  • compute the distribution of lead based on the hk

(positions in the final bitmap)

  • The higher a hk, the more lead will stick to that location,

i.e. for each location

  • sum up the values for the (up to) four grains sharing hk

v i i k k

T h h L

g

 

 4 1

slide-70
SLIDE 70

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 70

2.2.3. Pencil-Paper-Interaction

  • pencil hardness and applied pressure influence the result
  • determine amount of lead which sticks to every grain
  • identify which grains are touched by the pencil tip
  • compute average pressure value Pa for each grain
  • compute depth of lead in the grain
  • deph to which lead penetrates the height field (How deep is

the pen pressed into the paper?)

  • proportional to the applied pressure
  • not deeper than hmin
  • Dl = max(hmin, Pa · hmax)
slide-71
SLIDE 71

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 71

  • compute the volume „bitten“
  • some of the lead „bitten“ by the paper fibers
  • deposited in that part of a grain above a clipping plane

defined by Dl

  • scale volume according to pencil type
  • scaling factor depends on pencil hardness

 s  1 hard pencil soft pencil

  • more real: make scale factor depending on applied pressure
  • compute lead distribution among the grain„s height
  • the higher a grain the more lead sticks to it
  • amount deposited at hk is proportional to Lk
slide-72
SLIDE 72

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 72

2.2.4. Final Amount of Lead

  • volume of lead bitten is distributed proportionally to the

heights hk in each grain

) (

4 1 a i i k v k

P s h h B B   

slide-73
SLIDE 73

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 73

2.2.5. Visualization

  • visualize intensity of light reflected at each grain
  • The more graphite in a grain, the less light is reflected.
  • given an amount of graphite Gk and a total amount of lead which is

needed to completely cover the paper„s surface Ft=Fs+Fv

t k k

F G I   1

slide-74
SLIDE 74

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 74

Hand-made pencil shadings (top) compared to simulation results.

  • M. Sousa: „Computer-Generated

Graphite Pencil Materials and Rendering“ PhD thesis. University of Alberta, 1999

slide-75
SLIDE 75

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 75

  • M. Sousa: „Computer-Generated

Graphite Pencil Materials and Rendering“ PhD thesis. University of Alberta, 1999

slide-76
SLIDE 76

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 76

2.3. Summary (Pencil Drawings)

  • bserved physical qualities on a microscopic level
  • physical processes between paper and pencil
  • Literature
  • Mario Costa Sousa and John W. Buchanan. Observational Model of

Graphite Pencil Materials. Computer Graphics Forum, 19(1):27-49, 2000

  • Mario Costa Sousa and John W. Buchanan. Computer-Generated

Graphite Pencil Rendering of 3D Polygonal Models. In Pere Brunet and Roberto Scopigno, editors, Proceedings of EuroGraphics'99 (Milano, Italy, September1999), pages 195-207, Oxford, 1999. NCC Blackwell Ltd.

  • Mario Costa Sousa and John W. Buchanan. Observational

Model of Blenders and Erasers in Computer-Generated Pencil Rendering. In Proceedings of Graphics Interface'99 (Kingston, Canada, June 1999), pages 157-166, Toronto,

  • 1999. Canadian Computer-Human Communications

Society.

slide-77
SLIDE 77

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 77

  • 3. Simulating Wax Crayons
  • physically-inspired model
  • drawings are synthesized from collections of user-

defined strokes

  • similar to the pencil simulation approach based on
  • bservation an microscopic level
  • paper: 2D height-field (as in some of the already

presented simulation techniques)

  • crayon: 2D mask that evolves while interacting with the

paper

  • visualization again using a simplified Kubelka-Munk

model

slide-78
SLIDE 78

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 78

3.1. Representation of the Involved Media

  • Paper
  • 2D height filed
  • static texture but dynamic model of wax
  • Wax
  • column of wax layers for each paper cell
  • each cell: height, color, transmittance scattering
  • blend adjacent layers with the same properties
  • Crayon
  • profile modeled as a 2D height map
  • height values represent the crayons distance from the

paper plane

  • height map is modified as the crayon is worn down by

friction

slide-79
SLIDE 79

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 79

  • dynamic crayon model allows to
  • represent a crayon‟s sharpened edges as they are

progressively abraded into a blunt shape

  • represent minor ridges and hollows that are carved by the

paper texture

  • represent
  • sharpened and blunt crayon tips
  • the sharpened back-end rim
  • long side of the crayon itself
  • model sufficient for most cases
slide-80
SLIDE 80

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 80

3.2. Interaction Crayon-Paper

  • Wax is deposited by the crayon.
  • volume of deposited wax depends on
  • contact area between crayon and paper
  • slope of the paper over that area
  • crayon force
  • Already deposited wax can be smeared around when the

crayon passes over it.

  • smearing
  • pushes wax from paper texture peaks down into adjacent

lower regions

  • crayon can push wax over ridges in the paper
slide-81
SLIDE 81

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 81

wax deposition smearing

slide-82
SLIDE 82

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 82

  • lines as drawing primitives
  • consider endpoints P1, P2, the crayons hight-mask M, the

scalar force f applied by the crayon to the paper and the set C of color properties of the wax

  • algorithm creates or modifies a set of wax layers L

1 foreach point Pi on the line segment P1P2 do 2 adjustCrayonHeight( Pi, M, f, L) 3 smearExistingWax( Pi, P1P2, M, L) 4 addNewWax( Pi, P1P2, f, M, C, L) 5 od

slide-83
SLIDE 83

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 83

  • adjustCrayonHeight( Pi, M, f, L)
  • remove some volume of wax from the crayon and deposit

it to the paper underneath

  • volume depends on value of crayons height-mask relative

to the paper height

  • adjust crayon‟s overall height with each step (crayon will

potentially be worn away locally)

  • addNewWax( Pi, P1P2, f, M, C, L)
  • similar to “biting” in the pencil model
  • macroscopic level – amount of deposited wax depends on

the force applied by the crayon

  • microscopic level – amount of deposited wax depends on

the local paper structure

slide-84
SLIDE 84

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 84

Dave Rudolf, David Mould, and Eric Neufeld. Simulating Wax Crayons. In Jon Rolne, Reinhard Klein, and Wenping Wang, editors, Proceedings of Pacific Graphics 2003, pages 163- 175

slide-85
SLIDE 85

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 85

  • smearExistingWax( Pi, P1P2, M, L)
  • smearing characteristic to wax

comparable to bleeding in water color

  • wax is smeared into adjacent

regions

  • simulated using an 8-

neighborhood mask of the current cell

  • each mask cell contains a

smearing coefficient calculated from

  • relative location
  • height of the paper and its

wax

  • directional handling of the

crayon

Dave Rudolf, David Mould, and Eric Neufeld. Simulating Wax Crayons. In Jon Rolne, Reinhard Klein, and Wenping Wang, editors, Proceedings of Pacific Graphics 2003, pages 163-175

slide-86
SLIDE 86

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 86

3.3. Rendering

  • wax treated as a translucent pigment
  • simple color models (RGB, CMY) not usable
  • Kubelka-Munk model with spectral transmittance,

scattering, and interference

  • combination of layers similar as in the watercolor

approach

top: real crayons, bottom: simulation

Dave Rudolf, David Mould, and Eric Neufeld. Simulating Wax Crayons. In Jon Rolne, Reinhard Klein, and Wenping Wang, editors, Proceedings of Pacific Graphics 2003, pages 163-175

slide-87
SLIDE 87

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 87

Dave Rudolf, David Mould, and Eric Neufeld. Simulating Wax Crayons. In Jon Rolne, Reinhard Klein, and Wenping Wang, editors, Proceedings of Pacific Graphics 2003, pages 163-175

slide-88
SLIDE 88

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 88

Dave Rudolf, David Mould, and Eric Neufeld. Simulating Wax Crayons. In Jon Rolne, Reinhard Klein, and Wenping Wang, editors, Proceedings of Pacific Graphics 2003, pages 163-175

slide-89
SLIDE 89

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 89

3.4. Summay (Wax Crayons)

  • physically inspired model of wax crayons
  • not a complete physical simulation
  • resembles the pencil model discussed before
  • Literature:
  • Dave Rudolf, David Mould, and Eric Neufeld. Simulating

Wax Crayons. In Jon Rolne, Reinhard Klein, and Wenping Wang, editors, Proceedings of Pacific Graphics 2003, pages 163-175, Los Alamitos, CA, 2003. IEEE Computer Society, IEEE.

slide-90
SLIDE 90

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 90

  • 4. Rendering Decorative Mosaics
  • simulating decorative tile mosaics similar to the

definition of “mosaics” in arts

  • consisting of square tiles which
  • are packed tightly
  • follow orientations defined by the artist
  • input: target image and edge features
  • i.e., aligning square tiles with varying orientation
slide-91
SLIDE 91

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 91

slide-92
SLIDE 92

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 92

4.1. Algorithm

1 S  list of random points on the image

2 until converged do 3 for each p in S, place a square pyramid with apex at p 4 rotate each pyramid about the z-axis to align it with the direction field (p) 5 render the pyramids with an orthogonal projection

  • nto the xy-plane, producing a Voronoi diagram

6 compute the centroid of each Voronoi region 7 move each p to the centroid of its Voronoi region 8 od 9 draw a tile centered at each p, oriented along 

slide-93
SLIDE 93

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 93

4.2. Direction Field

  • defining  which controls orientation of tiles
  • desired (x,y) should follow an edge‟s orientation

 gradient of the Euklidean distance from an edge

  • basically compute iso-distance lines from an edge
  • direction of the gradient between these lines gives the

required vector field

  • riginal image with

Edeg features (yellow) derived direction field

  • A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001
slide-94
SLIDE 94

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 94

initial Voronoi diagram with randomly placed tiles

  • A. Hausner:

“Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001

slide-95
SLIDE 95

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 95

Voronoi diagram after 20 iterations

  • A. Hausner:

“Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001

slide-96
SLIDE 96

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 96

4.3. Tile Variations

  • algorithm‟s output: set of points with associated
  • rientations
  • tile color:

 Tile colors represent color of the image region they cover.  image sample at the given point  average of the color of the covered region

  • tile size

 Total tile area (sum of all tiles) corresponds to the image size.  Image of hn pixels, n tiles  legth of the side of a tile is:  factor d accounts for packing inefficiency, d = 0.8 works fine

  • aspect ratio

 so fare square tiles  rectangular tiles to emphasize the direction field  computation: scaling the cone slopes non-uniformal

n hw d / d 

slide-97
SLIDE 97

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 97

Edge Avoidance

  • Tiles should not be placed on an edge.
  • Drawing the edge with a thick stroke and a different

color prevents tiles from moving there.

  • mix iterations with and without edge avoidance
  • A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001
slide-98
SLIDE 98

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 98

Voronoi diagram after edge avoidance

  • A. Hausner:

“Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001

slide-99
SLIDE 99

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 99

final tiling, point samples for coloring

  • A. Hausner:

“Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001

slide-100
SLIDE 100

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 100

2000 equal-sized tiles 2000 tiles in 3 sizes

  • A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001
slide-101
SLIDE 101

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 101

  • A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001
slide-102
SLIDE 102

_ _ University of Magdeburg

Simulating Natural Media and Artistic Techniques 102

  • A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001