non photorealistic
play

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?


  1. _ University of Magdeburg _ Informal definition: consists of a regular discrete lattice of cells • 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 More formal definition: A CA is a 4-tuple (L, S, N, f) • 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: S n  S a transition function Simulating Natural Media and Artistic Techniques 21

  2. _ University of Magdeburg _ • 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) Simulating Natural Media and Artistic Techniques 22

  3. _ University of Magdeburg _ Red – burning Yellow – burnt down Green – growing / recovering Simulating Natural Media and Artistic Techniques 23

  4. _ University of Magdeburg _ • 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 Simulating Natural Media and Artistic Techniques 24

  5. _ University of Magdeburg _ 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 overflows  simulation of a paper structure. Simulating Natural Media and Artistic Techniques 25

  6. _ University of Magdeburg _ 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. Simulating Natural Media and Artistic Techniques 26

  7. _ University of Magdeburg _ 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“ Simulating Natural Media and Artistic Techniques 27

  8. _ University of Magdeburg _ 1.3.5. The Paint Process 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 Simulating Natural Media and Artistic Techniques 28

  9. _ University of Magdeburg _ 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 over 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 Simulating Natural Media and Artistic Techniques 29

  10. _ University of Magdeburg _ Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer - Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997. Simulating Natural Media and Artistic Techniques 30

  11. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 31

  12. _ University of Magdeburg _ • 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) Simulating Natural Media and Artistic Techniques 32

  13. _ University of Magdeburg _ 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.  W ( t   t )  W ( t )  (  W   W ) ij ij k  ij ij  k k  N Simulating Natural Media and Artistic Techniques 33

  14. _ University of Magdeburg _ - 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 of water flowing in and out of that cell.         I ( t t ) I ( t ) ( I I ) ij ij k  ij ij  k k  N I ( t )    I W k k  ij k  ij W ( t ) k I ( t ) ij  I   W ij  k ij  k W ( t ) ij Simulating Natural Media and Artistic Techniques 34

  15. _ University of Magdeburg _ - 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.  I ( t   t )  I ( t )   I ij ij dk  ij k  N   I  I I W  I W   ij k k ij ij ij  I   I  W     dk  ij k k W  W W  W   ij k ij k 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. Simulating Natural Media and Artistic Techniques 35

  16. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 36

  17. _ University of Magdeburg _ 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. Simulating Natural Media and Artistic Techniques 37

  18. _ University of Magdeburg _ 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. Simulating Natural Media and Artistic Techniques 38

  19. _ University of Magdeburg _ 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. Simulating Natural Media and Artistic Techniques 39

  20. _ University of Magdeburg _ 1.3.7. Summary (of this approach) • very flexible • can be used in different levels of modeled detail • simulation approach rather time consuming (depending on 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. Simulating Natural Media and Artistic Techniques 40

  21. _ University of Magdeburg _ 1.4. Watercolor and Fluid Dynamics • other approach to simulate watercolor • combine physical and optical properties of watercolor in one model • physical properties described by fluid dynamics • optical properties given by reflection and transmission behaviour of paint layers Simulating Natural Media and Artistic Techniques 41

  22. _ University of Magdeburg _ 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. Simulating Natural Media and Artistic Techniques 42

  23. _ University of Magdeburg _ wash #n wash #2 wash #1 paper Simulating Natural Media and Artistic Techniques 43

  24. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 44

  25. _ University of Magdeburg _ Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer - Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997. Simulating Natural Media and Artistic Techniques 45

  26. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 46

  27. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 47

  28. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 48

  29. _ University of Magdeburg _ 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. Simulating Natural Media and Artistic Techniques 49

  30. _ University of Magdeburg _ 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. Simulating Natural Media and Artistic Techniques 50

  31. _ University of Magdeburg _ 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 optical properties • render the pixel using overall reflectance and transmittance Simulating Natural Media and Artistic Techniques 51

  32. _ University of Magdeburg _ Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer - Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997. Simulating Natural Media and Artistic Techniques 52

  33. _ University of Magdeburg _ Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer - Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997. Simulating Natural Media and Artistic Techniques 53

  34. _ University of Magdeburg _ Curtis, Anderson, Seims, Fleischer, and Salesin. „Computer - Generated Watercolor“. In: Proceedings of SIGGRAPH 97. pp. 421-430. 1997. Simulating Natural Media and Artistic Techniques 54

  35. _ University of Magdeburg _ 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. Simulating Natural Media and Artistic Techniques 55

  36. _ University of Magdeburg _ 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 - ... Simulating Natural Media and Artistic Techniques 56

  37. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 57

  38. _ University of Magdeburg _ 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 1.0 graphite 0.9 clay 0.8 wax 0.7 composition ratio 0.6 0.5 0.4 0.3 0.2 0.1 0.0 9H 8H 7H 6H 5H 4H 3H 2H H F HB B 2B 3B 4B 5B 6B 7B 8B hard pencil type soft Simulating Natural Media and Artistic Techniques 58

  39. _ University of Magdeburg _ • 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. Simulating Natural Media and Artistic Techniques 59

  40. _ University of Magdeburg _ ×50, empty paper ×50, soft pencil ×50, hard pencil ×200, empty paper ×200, soft pencil ×200, hard pencil 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 Simulating Natural Media and Artistic Techniques 60

  41. _ University of Magdeburg _ ×1000, empty paper ×1000, hard pencil ×2000, empty paper ×2000, soft pencil ×2000, hard pencil 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 Simulating Natural Media and Artistic Techniques 61

  42. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 62

  43. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 63

  44. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 64

  45. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 65

  46. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 66

  47. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 67

  48. _ University of Magdeburg _ • grain can be filled with at most an amount T v of lead • If all h i are the same  T v = const = F s • at least on h i differs: V g is the volume from the top by the lowest plane not cutting the grain and from below by the top surface of the grain • T v = V g · F v • F v maximum amount of lead to completely fill the volume of the grain • F S , F v assigned beforehand Simulating Natural Media and Artistic Techniques 68

  49. _ University of Magdeburg _ 2.2.2.2. Lead Distribution • compute the distribution of lead based on the h k (positions in the final bitmap) • The higher a h k , the more lead will stick to that location, i.e. for each location h L   T k k v 4 g  h i i  1 • sum up the values for the (up to) four grains sharing h k Simulating Natural Media and Artistic Techniques 69

  50. _ University of Magdeburg _ 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 P a 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 h min  D l = max(h min , P a · h max ) Simulating Natural Media and Artistic Techniques 70

  51. _ University of Magdeburg _ • 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 D l • scale volume according to pencil type  scaling factor depends on pencil hardness 0  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 h k is proportional to L k Simulating Natural Media and Artistic Techniques 71

  52. _ University of Magdeburg _ 2.2.4. Final Amount of Lead • volume of lead bitten is distributed proportionally to the heights h k in each grain h B  B   s ( P ) k k v a 4  h i i  1 Simulating Natural Media and Artistic Techniques 72

  53. _ University of Magdeburg _ 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 G k and a total amount of lead which is needed to completely cover the paper„s surface F t =F s +F v G I  1  k k F t Simulating Natural Media and Artistic Techniques 73

  54. _ University of Magdeburg _ Hand-made pencil shadings (top) compared to simulation results. M. Sousa: „ Computer-Generated Graphite Pencil Materials and Rendering “ PhD thesis. University of Alberta, 1999 Simulating Natural Media and Artistic Techniques 74

  55. _ University of Magdeburg _ M. Sousa: „ Computer-Generated Graphite Pencil Materials and Rendering “ PhD thesis. University of Alberta, 1999 Simulating Natural Media and Artistic Techniques 75

  56. _ University of Magdeburg _ 2.3. Summary (Pencil Drawings) • observed 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. Simulating Natural Media and Artistic Techniques 76

  57. _ University of Magdeburg _ 3. Simulating Wax Crayons • physically-inspired model • drawings are synthesized from collections of user- defined strokes • similar to the pencil simulation approach based on observation 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 Simulating Natural Media and Artistic Techniques 77

  58. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 78

  59. _ University of Magdeburg _ • 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 Simulating Natural Media and Artistic Techniques 79

  60. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 80

  61. _ University of Magdeburg _ wax deposition smearing Simulating Natural Media and Artistic Techniques 81

  62. _ University of Magdeburg _ • lines as drawing primitives • consider endpoints P 1 , P 2 , 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 P i on the line segment P 1 P 2 do 2 adjustCrayonHeight( P i , M, f, L) 3 smearExistingWax( P i , P 1 P 2 , M, L) 4 addNewWax( P i , P 1 P 2 , f, M, C, L) 5 od Simulating Natural Media and Artistic Techniques 82

  63. _ University of Magdeburg _ • 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 Simulating Natural Media and Artistic Techniques 83

  64. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 84

  65. _ University of Magdeburg _ • 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 Dave Rudolf, David Mould, and Eric Neufeld. Simulating  directional handling of the Wax Crayons. In Jon Rolne, Reinhard Klein, and Wenping Wang, editors, Proceedings of Pacific crayon Graphics 2003, pages 163-175 Simulating Natural Media and Artistic Techniques 85

  66. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 86

  67. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 87

  68. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 88

  69. _ University of Magdeburg _ 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. Simulating Natural Media and Artistic Techniques 89

  70. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 90

  71. _ University of Magdeburg _ Simulating Natural Media and Artistic Techniques 91

  72. _ University of Magdeburg _ 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 onto 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  Simulating Natural Media and Artistic Techniques 92

  73. _ University of Magdeburg _ 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 original image with derived direction field Edeg features (yellow) A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001 Simulating Natural Media and Artistic Techniques 93

  74. _ University of Magdeburg _ initial Voronoi diagram with randomly placed tiles A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001 Simulating Natural Media and Artistic Techniques 94

  75. _ University of Magdeburg _ Voronoi diagram after 20 iterations A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001 Simulating Natural Media and Artistic Techniques 95

  76. _ University of Magdeburg _ 4.3. Tile Variations • algorithm‟s output: set of points with associated orientations • 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: d  d hw / n  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 Simulating Natural Media and Artistic Techniques 96

  77. _ University of Magdeburg _ 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 Simulating Natural Media and Artistic Techniques 97

  78. _ University of Magdeburg _ Voronoi diagram after edge avoidance A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001 Simulating Natural Media and Artistic Techniques 98

  79. _ University of Magdeburg _ final tiling, point samples for coloring A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001 Simulating Natural Media and Artistic Techniques 99

  80. _ University of Magdeburg _ 2000 equal-sized tiles 2000 tiles in 3 sizes A. Hausner: “Simulating Decorative Mosaics”. In: Proceedings of SIGGRAPH 2001 Simulating Natural Media and Artistic Techniques 100

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend