A Monte Carlo ray tracer samples a high dimensional space. As Cook pointed out in his classic paper, it makes practical sense to divide the space into 1D and 2D subspaces and parametrize them to [0,1] for conceptional simplicity. For example:
- camera lens
- specular reflection direction
- diffuse reflection direction (could be combined with #3 but in practice don't for glossy layered)
- light sampling location/direction
- pixel area
- time (motion blur)
- (u1, u2)
- (u3, u4)
- (u5, u6)
- (u7, u8)
- (u9, u10)
- u11
All sorts of fun and productive games are played to make the multidimensional properties of the samples for sets across those dimensions, with QMC making a particular approach to that, and Cook suggesting magic squares. The approach in that bad paper was to pretend there is no correlation at between the pairs of dimensions. So use:
- (u1, u2)
- (u1, u2)
- (u1, u2)
- (u1, u2)
- (u1, u2)
- u1
The samples can be regular or jittered-- just subdivide when the 4-connected or 8-connected neighbors don't match. Start with 100 or so samples per pixel.
Yes this approach has artifacts, but often now Monte Carlo is used for a noisy preview and the designer hits "go" for a noisy version when the setup is right. The approach above will instead give artifacts but the key question for preview (a great area to research now) is how to get the best image for the designer as the image progresses.
Note this will be best for one bounce of diffuse only but that is often what one wants, and it is another artifact to replace multi-bounce with an ambient. The question for preview is how best to tradeoff artifacts for time. Doing it unbiased just makes the artifact noise.
Let me know if anybody tries it. If you have a Monte Carlo ray tracer it's a pretty quick project.
No comments:
Post a Comment