Skip to content

Monte Carlo code where it divide the number of samples #1197

Closed Answered by njroussel
NhatMinh2001 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @NhatMinh2001

This is split over a few different files. An integrator will typically return a "weight" for each sample, and its value is usually 1. These weights are accumulated into their own channel in the film, like RGB values. Finally the weight is divided out when developing the film. So effectively, this weight channel is equivalent to spp.

For your questions about varying spp, it is handled implicitly. The function Sensor.sample_rays() generates the rays with a constant spp, but it could do so according to a completely arbitrary distribution. So if you want to do some adaptive sampling like technique, modifiying the sample_rays() method should be enough. The change in distributi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by NhatMinh2001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants