computer graphics cheatsheet.txt 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. WORK IN PROGRESS
  2. This is not a complete cheatsheet of CG, just things I personally want to have a cheatsheet of.
  3. - 3D
  4. - perspective correction (texturing):
  5. - We have a triangle in 3D and texture coordinates u and v.
  6. - Principle: values 1/z, u/z and v/z are linear in screen space! We linearly interpolate these and
  7. from them compute the correct u and v at each pixel.
  8. - Algorithm:
  9. 1. Compute 1/z, u/z and v/z at each triangle vertex.
  10. 2. Linearly interpolate the three values on both side.
  11. 3. Linearly interpolate the three values between the both sides.
  12. 4. Compute the correct values from the interpolated ones as:
  13. z_correct = 1 / (1/z)
  14. u_correct = (u/z) * z
  15. v_correct = (v/z) * z
  16. - radiometry
  17. - Measurement of electromegnetic radiation including light.
  18. - measured quantities:
  19. - basic quantities:
  20. - radiant energy (Q,[J])
  21. - radiant flux/power (P,[W = J/s])
  22. - radiant flux density ([W/m^2]): for directional lights
  23. - irradiance: flux flowing INTO a surface
  24. - radiosity/exitance: flux flowing OUT of the surface
  25. - radiant intensity (I,[W/sr]): for point light sources
  26. - radiance (L,[W/(sr * m^2)]: Illumination in a single ray of light on a surface area, this is the quantity
  27. measured when evaluating the rendering equation - IMPORTANT. (The reason for
  28. sr in the unit: iny physics we can't get a value in a single point, we have
  29. to integrate over the solid angle)
  30. - spectral quantities: The same, but additionally parametrized by the wavelength.
  31. - functions:
  32. - BRDF (bidirectional reflectance distribution function)
  33. - most often used
  34. - input: incoming direction, outgoing direction (both with respect to the surface normal)
  35. - output: ratio of outcoming radiance to incoming radiance
  36. - BTDF (bidirectional transmittance distribution function)
  37. - same as BRDF, but the outgoing direction in on the other side of the surface, i.e. says
  38. how the incoming light gets into the surface instead of how it's reflected.
  39. - BSDF (bidirectional scattering distribution function)
  40. - BRDF + BTDF, i.e. for incoming light direction and outgoing light direction (which can be
  41. above or below the surface) returns the ration of the incoming to outcoming radiance.
  42. - SVBRDF (spatially varying bidirectional reflectance distribution function)
  43. - Like BRDF but also takes an extra parameter: the position on the surface, i.e. models
  44. surfaces whose BRDF differs across the surface.
  45. - BSSRDF (bidirectional surface scattering reflectance distribution function)
  46. - Takes into account also subsurface scattering etc., defines the relationship between any
  47. incoming and outcoming light ray (which may also be at a DIFFERENT POINT of the surface).
  48. - BTF (bidirectional texture function)
  49. - For a given texture coordinate, viewing and illumination angle tells the outcoming light.
  50. - photometry
  51. - Same as radiometry, but with respect to human eye, i.e. everything is multiplies by a photometric curve.
  52. - screen-space effects
  53. - ambient occlusion
  54. - SSAO (screen space ambient occlusion)
  55. - simple, sometimes inaccurate
  56. - For each pixel samples a normal-oriented hemisphere for occlusions and decides how much occlusion appears.
  57. - SSDO (screen space directional occlusion)
  58. - generalization of SSAO
  59. - Takes into account directions and so allows for "colored" occlusion shadow in scenes with multiple lights.
  60. Also computes one bounce of indirect ilumination and so approximates global ilumination.
  61. - HBAO (horizon based ambient occlusion)
  62. -
  63. - HBAO+
  64. - GTSO
  65. - HemiAO
  66. - GTAO (ground truth ambient occlison)
  67. - most accurate
  68. - PBR (physically based rendering)
  69. - A set of ideas and philosophies, using physics for close-to-reality rendering.
  70. - core ideas
  71. - using "measured" textures of physical surface properties
  72. - albedo map: What wavelengths are absorbed by the surface, defines its color. In
  73. non-PBR diffuse texture was used instead. The difference is: albedo
  74. has no ligting (AO, shadows, ...) in it!
  75. - one of the following
  76. - metallness "workflow"
  77. - two maps:
  78. - metallness map: How metal (more reflective, little diffuse, ...) or insulant (uncolored specular
  79. reflection, ...) the material is.
  80. - roughness map: How rough the surface is due to microsurfaces. The inverse is glossiness map.
  81. - more "PBR"
  82. - more difficult to mess up the material, but also more difficult to create unrealistic materials
  83. - uses less memory (doesn't specify the color of specular reflections)
  84. - can have artifacts
  85. - specular "workflow": less "PBR", easier to mess up the material
  86. - specularity map: Explicit color (and intensity) of the specular reflections (black = no specular
  87. reflections).
  88. - glossiness map: How glossy the surface is (inverse is the roughness map).
  89. - normal/bump maps as usual
  90. - energy conservation: When increasing reflectivity of material, the specular reflections get smaller
  91. and brighter, but other areas (diffuse reflections) get accordingly darker
  92. (e.g. if a cloth gets wet, it look darker).
  93. - Fresnel: Surfaces reflect more light when viewed at grazing angles (Fresnel's law says that more
  94. light is reflected when hitting the surface at low angle). E.g. a rendered ball will be
  95. brighter at edges.
  96. - pixel art upscaling methods
  97. - general upscaling methods (nearest-neighbour, bilinear, bicubic, vector tracing, ...)
  98. - specialized methods: because pixel art offers some presumptions (small palleter, small-scale features, common patterns etc.)
  99. - EPX: oldest, simple (4 neighbour pixels, 5 conditions), OK for fonts
  100. -