Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Computer Graphics Part1

9,060 views

Published on

Talk by me at entropia (ccc Karlsruhe)
Download from the nice entropia wiki at https://entropia.de/wiki/Bild:Computer-graphics-part1.tar.gz

Published in: Technology, Art & Photos

Computer Graphics Part1

  1. 1. Computer Graphics Part I entropia/CCC Karlsruhe
  2. 2. Two Parts today: Color Perception Pixels Fractals Geometry and Material Rendering
  3. 3. Two Parts next time: Realtime Rendering hardware wicked shit demos
  4. 4. Spectrum
  5. 5. Color Perception
  6. 6. RGB
  7. 7. RGB
  8. 8. Traditional Color Formats 5+6+5 bits (RGB) = 16bit (“HighColor”) 3*8 bits (RGB) = 24bit (“TrueColor”) 4*8 bits (RGBA) = 32bit
  9. 9. Dynamic Range defined as r = max min
  10. 10. Dynamic Range human eye: 1,000,000 computer displays: 1,000 24bit colors, per channel: 255
  11. 11. Tone Mapping Reduce Dynamic Range while preserving good looks
  12. 12. Tone Mapping
  13. 13. Tone Mapping
  14. 14. Tone Mapping
  15. 15. Tone Mapping
  16. 16. HDR Imaging In classic Photography Tone Mapping by aperture/exposure no intelligent/custom Tone Mapping is possible
  17. 17. HDR Imaging steps: acquire data from multiple LDR photographs generate a single HDR image Tone Map this image
  18. 18. HDR Imaging
  19. 19. HDR Imaging
  20. 20. HDR Rendering use HDR colors throughout the rendering process last step: Tone Map the rendered image requires hardware support for 16bit floating-point textures
  21. 21. HDR Rendering
  22. 22. Pixels pixel = “picture element”
  23. 23. Pixels
  24. 24. Pixels
  25. 25. Pixels
  26. 26. Resampling
  27. 27. Sampling
  28. 28. Bilinear Filtering
  29. 29. Linear Interpolation
  30. 30. Nearest Neighbour
  31. 31. Smooth Interpolation
  32. 32. Various Techniques Nearest Neighbour Linear Cubic: stitch many f (x) = ax 3 + bx 2 + cx + d together Optimal: sinc Filter
  33. 33. Nearest Neighbour
  34. 34. Linear Interpolation
  35. 35. Cubic Interpolation
  36. 36. Signal Processing Treat color information as a signal: pixel distance = sampling rate use Highpass/Lowpass Filters to access frequencies → JPG etc
  37. 37. Scaling small amounts
  38. 38. Downsampling must use more than four pixels perform a Lowpass Filter often ignored
  39. 39. Nearest Neighbour
  40. 40. Linear filtering
  41. 41. In Practice Nearest Neighbour: crappy software (browsers, pdf viewers) Bilinear: Graphics Hardware Bicubic etc.: Image Processing
  42. 42. Fractals
  43. 43. etc.
  44. 44. Mandelbrot Set
  45. 45. omg complex 0 + 2i 1 + 0i 2 + 7i i 2 = −1 (3+2i)∗(1+1i) = 3+5i +2i 2 = 1+5i
  46. 46. The Formula zi+1 = zi2 + c (1) where z0 := 0 + 0i c := x + yi for every pixel: z →0⇒z ∈M z →∞⇒z ∈M /
  47. 47. with color
  48. 48. Iterated Function System
  49. 49. Iterated Function System
  50. 50. Iterated Function System
  51. 51. Iterated Function System
  52. 52. Iterated Function System
  53. 53. another IFS
  54. 54. “Fractal Flames”
  55. 55. Nature
  56. 56. Nature
  57. 57. Nature
  58. 58. Nature
  59. 59. Pause?
  60. 60. Fractal Noise We want a pattern that is “random” contains structure of various sizes looks “natural”
  61. 61. blurred Noise
  62. 62. Next octave
  63. 63. Next octave
  64. 64. Next octave
  65. 65. Summing four octaves This is called “Perlin Noise” and everybody uses it.
  66. 66. Usage clouds height fields (terrain) wood, marble can be animated by using more dimensions
  67. 67. More Terrain Take a mesh of triangles and repeat: subdivide by cutting the edges at their midpoints displace the midpoints
  68. 68. Midpoint Displacement
  69. 69. sucks, because
  70. 70. Rendering input: Geometry Material output: pixels
  71. 71. Rendering
  72. 72. Geometry Representation Geometric Primitives Voxels, Point Clouds Polygons Isosurfaces
  73. 73. Geometric Primitives Spheres, Cubes, Cylinders, ... Sphere stored as center, radius Store transformations, boolean operations (Constructive Solid Geometry)
  74. 74. Geometric Primitives
  75. 75. CSG
  76. 76. Voxels Divide 3D space into equally sized voxels Store one bit per voxel Used in medical imaging, old (and maybe future) games, movies
  77. 77. Voxels
  78. 78. Octree
  79. 79. Octree
  80. 80. Polygons Store points and connectivity Provides no concept of “inside” and “outside” Used in games, movies
  81. 81. Polygons
  82. 82. Polygons generally unsorted (“polygon soup”) need to be triangulated for rendering triangles.
  83. 83. Isosurfaces f : R3 → R visualize the surface where that function yields some constant value c: f (x) = c
  84. 84. Example f is the sum of the “distances” between x and two given points a and b: f (x) = myDist(x, a) + myDist(x, b)
  85. 85. Example f (x) = myDist(x, a) + myDist(x, b)
  86. 86. Example f (x) = myDist(x, a) − myDist(x, b)
  87. 87. Rendering Isosurfaces two possibilites: walk view rays while evaluating f , approximate intersection transform into a lots of polygons
  88. 88. Isosurface
  89. 89. Appearance lighting material
  90. 90. Illumination local global
  91. 91. Material “Material” models micro-geometry color light transmission
  92. 92. Micro-Scale micro-scale roughness: matte surface
  93. 93. Diffuse Reflection
  94. 94. Meso-Scale meso-scale roughness: small visible bumps
  95. 95. Macro-Scale macro-scale roughness: we have geometry for that
  96. 96. Color usually stored in one or more textures
  97. 97. Appearance can vary according to light color light angle, viewing angle (velvet) environment (mirror, glass) there can be no comprehensive model
  98. 98. Offline Rendering static scene, no user interaction no hard time constraints
  99. 99. Realtime Rendering time constraint: 20msec a whole industry built around clever cheating
  100. 100. Ray Tracing
  101. 101. Ray Tracing Tracing “photons” from the light source is also possible
  102. 102. Rasterization for each object: project it onto the viewing plane paint all the pixels it covers
  103. 103. Painter’s Algorithm sort objects draw from back to front
  104. 104. Sucks wasteful in scenes with high occlusion can’t handle intersections sorting is in O(n log n)
  105. 105. Z-Buffer Algorithm draw objects in any order for every pixel, store distance to camera in a buffer paint pixel only if distance to camera is lower
  106. 106. Next time graphics pipeline and hardware wicked techniques GPGPU, future technologies demos
  107. 107. 500 GFLOPS vs. 10 GFLOPS
  108. 108. Questions?
  109. 109. This work is hereby published under the Creatice Commons Attribution License. It is also published under the GNU FDL and LGPL. Since i am not able to release anything into the public domain in germany, i hereby grant you all other imaginable rights to do with it as you wish. (this does not apply to the works of others reproduced here, of course) For a list of the images used in the slides and attribution information, see the file part1-license.txt that is included in the archive that you downloaded. If you feel that your copyright has been violated, please contact me. Johann ’cupe’ Korndoerfer

×