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
Pixel coordinate clarification 1 0 -1 0 1 -1 CS 6965 Fall 2011 64
Pixel coordinate clarification 1 .75 .25 0 -.25 -.75 -1 0 1 -1 CS 6965 Fall 2011 65
Box filter support 1 .75 .25 0 -.25 -.75 -1 0 1 -1 CS 6965 Fall 2011 66
Triangle filter support 1 .75 .25 0 -.25 -.75 -1 0 1 -1 CS 6965 Fall 2011 67
1 spp CS 6965 Fall 2011 68
9 spp jittered triangle CS 6965 Fall 2011 69
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
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
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
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
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
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
Comparison CS 6965 Fall 2011 76
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
Packet Traversal CS 6965 Fall 2011 78
BVH traversal 79
BVH packet traversal 80
BVH packet traversal 81
BVH packet traversal 82
BVH packet traversal 83
BVH packet traversal 84
BVH packet traversal 85
BVH packet traversal 86
BVH packet traversal 87
BVH packet traversal 88
BVH packet traversal 89
BVH packet traversal 90
BVH packet traversal 91
BVH packet traversal 92
BVH packet traversal 93
BVH packet traversal 94
Instancing CS 6965 Fall 2011 95
Instancing • Increase geometric complexity through creating multiple copies of similar objects CS6620 Spring 07 http://www.cs.utah.edu/~angell/cs6620/assignment6/
Instances • Instances may affect position and material properties CS6620 Spring 07 http://www.cs.utah.edu/~bigler/classes/cs6620/final.html
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
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
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