Advanced Rendering Techniques and Technologies in Computer Graphics

shading n.w
1 / 25
Embed
Share

Explore the world of advanced rendering techniques and technologies in computer graphics, including shading, displacement, surface lighting, volume imaging, and more. Learn about the evolution of RenderMan, GPU applications, real-time vs. non-real-time rendering, and the historical development of rendering methods. Dive into GLSL and HLSL languages for vertex, geometry, and pixel shaders, uncovering the complexities of image synthesis and computation in graphics rendering.

  • Rendering Techniques
  • Computer Graphics
  • Advanced Technology
  • GLSL
  • HLSL

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Shading CMSC 435/634

  2. RenderMan Displacement Surface Light Volume Imager

  3. Displacement Given Position Normal Compute Position Normal Displacement Surface Light Volume Imager

  4. Surface color Given Position Compute Color Opacity Displacement Surface Light Volume Imager

  5. Lighting Given Surface Position Compute Light Direction Light Color Displacement Light Surface Volume Imager

  6. Volume Effects Given Position Color Compute New Color Displacement Surface Light Volume Imager

  7. Image Effects Given Pixel Color Compute Pixel Color Displacement Surface Light Volume Imager

  8. Non-real time vs. Real-time RenderMan GPU Application Application Texture/ Buffer Displacement Vertex Surface Light Geometry Volume Imager Fragment Displayed Pixels Displayed Pixels

  9. RenderMan vs. GPU RenderMan Developed from General CPU code Seconds to hours per frame 1000s of lines Unlimited computation, texture, memory, GPU Developed from fixed- function hardware Tens of frames per second 1000s of instructions Limited computation, texture, memory,

  10. History (not real-time) Testbed [Whitted and Weimer 1981] Shade Trees [Cook 1984] Image Synthesizer [Perlin 1985] RenderMan [Hanrahan and Lawson 1990]

  11. History (real-time) Custom HW [Olano and Lastra 1998] Multi-pass standard HW [Peercy, Olano, Airey and Ungar 2000] Register combiners [NVIDIA 2000] Vertex programs [Lindholm et al. 2001] Compiling to mixed HW [Proudfoot et al. 2001] Fragment programs Standardized languages Compute

  12. GLSL / HLSL Vertex, Geometry & Fragment/Pixel C-like, if/while/for Structs & arrays Float + small vector and matrix vec2, vec3, vec4, mat2, mat3, mat4 Swizzle & mask (a.xyz = b.xxw)

  13. GLSL / HLSL Common math & shading functions Trigonometric, exponential, min, max, abs, length, distance, normalize, dot, cross mix(a, b, t) clamp(t, a, b) step(a, t), smoothstep(a, b, t) reflect, refract

  14. Shader Debugging Render as color Map intermediate values to 0-1 Interpret results Hot reloading Make changes without changing viewpoint Remap debug values vec4(-sign(x), sign(x), abs(x), 1) x / (1 + abs(x)) External debugging tools

  15. Vertex Demo: Blend Positions

  16. Vertex + Fragment Demo: Fresnel Environment Map

  17. Shading Methods Repeating Patterns mod, sin Divide and floor Shapes Implicit form: is this pixel inside Color tables Noise or computed patterns 17

  18. Brick Demo mortar brick gap height width gap

  19. Noise Controlled, repeatable randomness Still spotty GPU implementation Can use texture or compute

  20. Noise Characteristics Repeatable Locally continuous but distant points uncorrelated Values RenderMan [0,1], average 0.5 Perlin s [-1,1], average 0 1/2 1 cycle per unit Versions for 1D-4D input

  21. Noise Subtleties Many noise functions based on a lattice Piecewise function between integer coordinates Hash of integer coordinates control points Interpolating values easy but poor Even with higher-order interpolation Perlin s noise Passes through 0 at each integer Hash gives gradient

  22. Perlin Noise in RenderMan Ci = float noise(floor(1/t)*P); 1 2 3 4 56 7 8 9 12 13 14 15 16 20 22

  23. Fractional Brownian Motion (fBm) // Combine octaves, scaled by 1/f for(f=1; f<=floor(1/t); f*=2) Ci += (float noise(f*P)-.5)/f; Ci += .5; 1 2 3 4 56 7 8 9 12 13 14 15 16 20 23

  24. Turbulence // fBm using abs(noise) for(f=1; f<=floor(1/t); f*=2) Ci += abs(float noise(f*P)-.5)/f; Ci += .5; 1 2 3 4 56 7 8 9 12 13 14 15 16 20 24

  25. Advanced Shading Methods Perturbed patterns Adjust position, radius, etc. with noise Bombing Divide space into cells Compute random position in each cell Check if pixel is inside shape Blending Fade effects in and out with smoothstep

More Related Content