Presentation is loading. Please wait.

Presentation is loading. Please wait.

Understanding DIRSIG4 vs DIRSIG5

Similar presentations


Presentation on theme: "Understanding DIRSIG4 vs DIRSIG5"— Presentation transcript:

1 Understanding DIRSIG4 vs DIRSIG5
Scott Brown and Adam Goodenough Understanding DIRSIG4 vs. DIRSIG5 6/9/17

2 Overview How DIRSIG4 and DIRSIG5 compute the radiance onto a pixel using dramatically different ray-tracing based approaches. Why diffuse radiance calculations are important and how DIRSIG4 and DIRSIG5 compute them, respectively. How DIRSIG4 and DIRSIG5 sample pixels differently. How DIRSIG5 being multi-threaded impacts frame-to-frame variation (aka, how DIRSIG4 was able to cheat). How the DIRSIG4 and DIRSIG5 pixel convergence algorithms differ. Brief look at statistics across 100 “duplicate” image frames. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

3 DIRSIG4 vs. DIRSIG5: Radiometry
... A single sub-pixel ray spawns generations of new rays. Each sub-pixel ray triggers a lot of calculations that contribute a small fraction to the final result. ... A single sub-pixel ray creates a path from the pixel to a source. Each sub-pixel ray contributes a large fraction to the final result. DIRSIG4: Hierarchical Ray Tracing A small number of sub-pixel rays contribute to the final result. DIRSIG5: Path Tracing A large number of sub-pixel rays contribute to the final result. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

4 DIRSIG4 vs. DIRSIG5: Why diffuse matters
DIRSIG4: CRS w/o diffuse calculations DIRSIG4: SRS w/ diffuse calculations Same exact radiance to RGB scaling in both images. Note the over estimation of the light in the shadows Without diffuse calculations the illumination in sun/moon shadows is wrong! Understanding DIRSIG4 vs. DIRSIG5 6/9/17

5 DIRSIG4 vs. DIRSIG5: Why diffuse matters
DIRSIG4: CRS w/o diffuse calculations DIRSIG4: SRS w/ diffuse calculations Same exact radiance to RGB scaling in both images. Note the over estimation of the light in the shadows. Without diffuse calculations the illumination in sun/moon shadows is wrong! Understanding DIRSIG4 vs. DIRSIG5 6/9/17

6 DIRSIG4 vs. DIRSIG5: Radiometry
Diffuse reflections are important in a world full of diffuse objects. When direct illumination is absent (sun shadow), diffuse illumination dominates. There are 3 primary radiometry solvers in DIRSIG4 All of them shoot dedicated rays in the Sun, Moon and specular directions. All of them can capture the diffuse loading Classic: has a diffuse background radiance calculation, but it is disabled by default (easy to enable in the material setup). Simple: has a diffuse fractional sky calculation, but we have been seeing users disable it via the options file (strongly discouraged). Generic: has a diffuse background radiance calculation. DIRSIG5 has single radiometry method: path tracing One of the biggest drivers in choosing path tracing for DIRSIG5 was to improve the speed at which we could capture diffuse illumination. Path tracing inherently computes diffuse radiance contributions. Always. End of story. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

7 DIRSIG4 vs. DIRSIG5: Why diffuse is hard
With a ray tracer, you are sampling the hemisphere above a surface to estimate the diffuse contribution. You need lots of background rays to get an accurate sampling of that hemisphere. Without a large number of rays, the diffuse calculation can be noisy. Semi-random sampling is preferred but can create frame-to-frame differences in the result when the hemisphere is undersampled. Differences between DIRSIG4 vs. DIRSIG5 diffuse approaches DIRSIG4 radiometry solvers spawn many rays (10s to 100s) at each surface. DIRSIG4 samples the entire hemisphere at each bounce. DIRSIG5 is a path tracer and each time you hit a surface it follows a single ray into the hemisphere. DIRSIG5 samples the hemisphere across different paths. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

8 DIRSIG4 Radiometry Solvers: Defaults
Classic Simple Generic Sun/Moon rays 1 11 Specular rays 1+ Diffuse rays 722 10, 100, 2003 200 Diffuse calc method Radiance Shadow4 Trans rays many Trans rays method5 Delta Hemisphere 1 The user can set the number of Sun/Moon rays used by GenericRadSolver. 2 The user must enable diffuse sampling in ClassicRadSolver (off by default). 3 SimpleRadSolver diffuse shadowing can be disabled in the options file (strongly discouraged). 4 SimpleRadSolver diffusely samples the hemisphere above the surface and figures out what the fraction of the sky is visible and then folds in a fraction of the total sky light using the DHR. 5 GenericRadSolver samples the transmission (back side hemisphere) but the other solvers yield to the TransmissionRadSolver (internal), which shoots a single ray (delta) in the forward direction. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

9 DIRSIG4 vs. DIRSIG5: Pixel Sampling
DIRSG4 Delta DIRSG4 Adaptive DIRSG5 (BasicPlatform) Each sub-pixel grid gets exactly 1 sample in the center. Rigid sampling can result in aliasing. Each sub-pixel grid gets at least 1 randomly positioned sample and then additional samples are added in pixel sub-grids where the greatest differences have been found. The NxN grid defined in the platform is ignored and samples are randomly distributed across the pixel. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

10 DIRSIG4 vs. DIRSIG5: Run Time
Kenny’s scene, 500 x 500, pan image on Scott’s laptop Version RadSolver Setup Pixel Sampling Actual Run Time Leveled DIRSIG 4.7.3 SRS w/o diffuse Fixed, 1x1 35 min 315 min1 SRS w/ diffuse 185 min 1655 min1 DIRSIG 5.0.7 N/A Adaptive, 20, 100 71 min 496 min2 COMMENTS: DIRSIG4 is faster than DIRSIG5 if diffuse shadows are disabled and when DIRSIG4 is using 9 total pixel samples and DIRSIG5 is using a minimum of 20 and a maximum of 100. DIRSIG4 is significantly slower than DIRSIG5 when diffuse shadows are enabled. NOTES: 1 DIRSIG4 “leveled” run time approximated for 3x3 using 1x1 run time. 2 DIRSIG5 “leveled” run time approximated from multi-threaded CPU usage (71 689%) to get a DIRSIG4 comparable single-threaded timing. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

11 DIRSIG4 vs. DIRSIG5: Frame-to-Frame
DIRSIG4 used a bunch of random number tricks to suppress frame-to-frame variation resulting from random sampling. Again, if enough samples are used the variance is minimal but more samples translates into more run time. These tricks work fine in DIRSIG4’s single-threaded world The same random sequence in every pixel, at every bounce, etc. could be duplicated between frames. However, DIRSIG5 is multi-threaded and you cannot control what order threads run in. Hence, DIRSIG5 cannot insure that we get the same random sequence. Therefore, frame-to-frame variance is inherently going to be higher. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

12 DIRSIG4 vs. DIRSIG5: Pixel Convergence
The point of adaptive/convergence based pixel sampling is to allow more complex pixels use more rays than simpler pixels. The algorithm is evaluating if the pixel radiance estimated from the current samples within the pixel is still changing significantly as samples are added. If it is changing then it assumes the pixel has not been well sampled yet and more samples will be used until the radiance stabilizes (converges). DIRSIG4’s “adaptive” sampling has an implicit minimum number of samples (how many sub-pixel grid elements there are), an explicit maximum (minimum plus additional samples) and a fractional threshold. The algorithm evaluates if the change at whatever wavelength is changing the most between N and N+1 samples is below the relative threshold. DIRSIG5’s “convergence” has a minimum and maximum samples, combined with an absolute threshold. The algorithm evaluates if the change in the radiance at the reference wavelength between samples N and N+1 is below the absolute threshold. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

13 Pixel Convergence: Sample Count Truth
Areas with illumination complexity require more samples: Between buildings Trees (leaf multi-bounce) Areas with geometric complexity require more samples: Edges of buildings Trees (small leaves) “SampleCount” truth from a DIRSIG5 simulation of the Chicago scene. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

14 DIRSIG4 vs. DIRSIG5: Pixel Convergence
The challenge with the convergence algorithm is establishing a minimum number of samples before the convergence is tested. If the minimum sample set is too small, sometimes the radiance is stable (appears to have converged) but the pixel is still undersampled and there is undiscovered complexity. Increasing the minimum samples can address this but it adds more samples to all pixels, even the ones that don’t need the extra samples. It’s difficult/impossible to know a-priori know which pixels will require more samples and which won’t. The geometric complexity and illumination complexity within the pixel are the biggest drivers. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

15 DIRSIG5: Pixel Convergence Guidance
The user can control the convergence criteria through a command-line option: What are the default parameters? Min paths = 20, max paths = 100 and radiance threshold = 1.0e-06 (W/cm^2/src/micron) When RIT talks about a “spiffy” simulation, what does that mean? Slightly higher convergence parameters (50, 200, 1.0e-06) When RIT talks about a “reference” simulation, what does that mean? Even higher convergence parameters (500, 5000, 1.0e-06) Ideally these parameters should vary by focal plane, channel, etc. At some point we will allow the user to specify these at that granularity. --convergence=min,max,thresh Understanding DIRSIG4 vs. DIRSIG5 6/9/17

16 DIRSIG5 Convergence/Variation Study
Inspired by a study performed by Kenny & Co, we generate 100 frames of the exact same scene, exact same sensor position, etc. The assumption is that every image should be the same. However, if the solution for a given pixel has not converged (not enough paths were used) and the random sampling is different for that pixel in each frame (which it is), then frame to frame variation will be observed. The absolute radiance threshold component of the convergence should allow the user to insure this variation is below the noise equivalent radiance for the sensor. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

17 DIRSIG5: 100 “Duplicate” Frames Radiance mean across all frames
Understanding DIRSIG4 vs. DIRSIG5 6/9/17

18 DIRSIG5: 100 “Duplicate” Frames Radiance, stddev across all frames
Understanding DIRSIG4 vs. DIRSIG5 6/9/17

19 DIRSIG5: 100 “Duplicate” Frames Average, relative difference from the mean
Understanding DIRSIG4 vs. DIRSIG5 6/9/17

20 DIRSIG5: 100 “Duplicate Frames” Notes
Illumination: This simulation uses the SimpleAtm, which is 100% direct illumination (6,000K Sun) and the sky is black (zero radiance). Background (diffuse) samples either hit backgrounds (non-zero radiance) or the sky (zero radiance). In addition to be unrealistic, this high dynamic range background presents a makes convergence slow. Moving forward we are going to rerun with realistic illumination. Understanding DIRSIG4 vs. DIRSIG5 6/9/17

21 DIRSIG4 vs. DIRSIG5: User-defined sources
Under the unified path tracing solution in DIRSIG5, user-defined sources are treated just like the sun/moon. At each bounce (node) along the path, a direct ray is traced to the sun and to 1 or more sources. The radiometry core automatically determines which sub-set of sources to include (no more threshold and grid partitions). DIRSIG5 includes multi-bounce source contributions. Unlike DIRSIG4 (unless diffuse radiance calculations were enabled) In general, having sources in the scene creates a greater dynamic range in illumination (aka illumination complexity) and will require higher convergence criteria. Understanding DIRSIG4 vs. DIRSIG5 6/9/17


Download ppt "Understanding DIRSIG4 vs DIRSIG5"

Similar presentations


Ads by Google