mitsuba-renderer / mitsuba-tutorials

Tutorials and other resources for the Mitsuba 3 library
50 stars 9 forks source link

Adaptive Sampling Problem #21

Open archondoyen opened 7 months ago

archondoyen commented 7 months ago

I am currently learning how to use Mitsuba3, the tutorials are immensely helpful.

I want to achieve this function: manually specify the k ray samples for Pixel at (x, y)..For example, set 32 samples for Pixel(1,1) and 4 samples for Pixel(200,200).

I've gone through the API and tutorials, but haven't found clear instructions on how to achieve this.

Could someone please provide guidance or assistance on implementing this feature? Any insights or pointers would be greatly appreciated.

njroussel commented 7 months ago

Hi @archondoyen

Mitsuba doesn't have the necessary "tooling" for adaptive sampling. This doesn't mean that it isn't possible to do it, but it definitely requires some work on your own.

Typically an integrator is only defined by a sample method which takes a ray and the scene as input. In order to do adaptive sapmling, you must handle this one level higher at the Integrator::render() method, where you actually define the rays that are given to the integrator and accumulate its results into the Film.