Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A common – equally good – alternative is called "Shirley remapping".  It does not rely on 3D stratification, but only on 2D stratification.  Get a 2D sample and first use one of the coordinates of the sample to select the sub-domain, and then map the sample samples within that selected domain (based on the selection probability) back to the unit square domain.  A figure provides a more intuitive explanation – in this example we choose between two light area sources, with 80% chance of selecting the first light and 20% chance of selecting the second light: 

...

To the left are the original samples on the unit square.  The middle square contains the samples from the left 80% of the left imageoriginal samples, only stretched a bit horizontally.  Likewise, the right square contains the samples from the right 20% of the left imageoriginal samples, but stretched 5x horizontally.  The stretching preserves the stratification properties of the original sample points.

...

It is possible to override the default PMJ samples if other sample sequences are desired.  This is scary stuff, but can be useful for experimenting with e.g. primary-space Metropolis rendering algorithms or adaptive progressive photon mapping.  The Generator class provides a way to intercept sample generation: when a custom Generator has been specified, it automatically gets called when e.g. a Bxdf or light sampling calls one of the GenerateSample*() or DrawSample*() functions.  Some of the RixRNG constructors can be passed an explicit pointer to a Generator.

...