sampling
play

Sampling CS 6965 Fall 2011 Creative Program 3 CS 6965 Fall 2011 - PowerPoint PPT Presentation

Sampling CS 6965 Fall 2011 Creative Program 3 CS 6965 Fall 2011 2 CS 6965 Fall 2011 3 CS 6965 Fall 2011 4 CS 6965 Fall 2011 5 CS 6965 Fall 2011 6 Sampling Theory World: continuous Image: discrete samples Display:


  1. Implementation notes: • Draw graphs of your filters before using them • Try a box filter first • Hardest part: get subpixel coordinates right CS 6965 Fall 2011 63

  2. Pixel coordinate clarification 1 0 -1 0 1 -1 CS 6965 Fall 2011 64

  3. Pixel coordinate clarification 1 .75 .25 0 -.25 -.75 -1 0 1 -1 CS 6965 Fall 2011 65

  4. Box filter support 1 .75 .25 0 -.25 -.75 -1 0 1 -1 CS 6965 Fall 2011 66

  5. Triangle filter support 1 .75 .25 0 -.25 -.75 -1 0 1 -1 CS 6965 Fall 2011 67

  6. 1 spp CS 6965 Fall 2011 68

  7. 9 spp jittered triangle CS 6965 Fall 2011 69

  8. Adaptive supersampling • Images look better with more samples • More samples take longer • Can we put the samples where we need them? CS 6965 Fall 2011 70

  9. Statistical approach • Compute variance of samples • Add more samples if variance is too large • Confidence interval: 90% sure that average is within some range (+/- 1 lsb) • Theoretically, you must throw away old samples • You can still miss things CS 6965 Fall 2011 71

  10. Improved statistical approach • Discontinuity of sampling rate introduces artifacts • Two pass algorithm: • Normal statistical supersampling • Go back over pixels near pixels with high sample rates • Could repeat CS 6965 Fall 2011 72

  11. Geometric approach 2 1 • 4 samples: corners + center • Recursively subdivide pixels: (add three more) • Final color: area weighted 5 average • Duplicates on edges? 4 3 CS 6965 Fall 2011

  12. Geometric approach 2 1 • 4 samples: corners + center • Recursively subdivide pixels: (add three more) • Final color: area weighted 5 average • Duplicates on edges? 4 3 CS 6965 Fall 2011 74

  13. Geometric approach 2 6 1 • 4 samples: corners + center 8 • Recursively subdivide pixels: (add three more) • Final color: area weighted 7 5 average • Duplicates on edges? 4 3 CS 6965 Fall 2011 75

  14. Comparison CS 6965 Fall 2011 76

  15. Anti-aliasing review • Nyquist limit requires sampling rate of 2F • Graphics uses infinitely large frequencies • Can get reasonably close with good filters • Simple filters do a poor job, even at low frequencies (just above the Nyquist limit) CS 6965 Fall 2011 77

  16. Packet Traversal CS 6965 Fall 2011 78

  17. BVH traversal 79

  18. BVH packet traversal 80

  19. BVH packet traversal 81

  20. BVH packet traversal 82

  21. BVH packet traversal 83

  22. BVH packet traversal 84

  23. BVH packet traversal 85

  24. BVH packet traversal 86

  25. BVH packet traversal 87

  26. BVH packet traversal 88

  27. BVH packet traversal 89

  28. BVH packet traversal 90

  29. BVH packet traversal 91

  30. BVH packet traversal 92

  31. BVH packet traversal 93

  32. BVH packet traversal 94

  33. Instancing CS 6965 Fall 2011 95

  34. Instancing • Increase geometric complexity through creating multiple copies of similar objects CS6620 Spring 07 http://www.cs.utah.edu/~angell/cs6620/assignment6/

  35. Instances • Instances may affect position and material properties CS6620 Spring 07 http://www.cs.utah.edu/~bigler/classes/cs6620/final.html

  36. Pre-transformation Simplest way: transform objects as they are read in +No additional overhead in ray tracing objects - Requires a lot of memory for complex objects CS6620 Spring 07

  37. Transform More efficient way: transform ray at intersection time +Transform must be computed for each ray - Scenes with billions of polygons are possible with modest memory requirements CS6620 Spring 07

  38. Translational instances • Simplest instance: translation vector O’+tV • Create a TInstance class as a subclass of Primitive • Contains a translation vector and a pointer to an underlying object O+tV • Intersect method subtracts translation vector from origin and calls intersect on underlying object • Similar for call to normal() T CS6620 Spring 07

Recommend


More recommend