3
$\begingroup$

I am writing a pathtracer, and I want to somehow incorporate importance sampling of the environment map. The obvious way to do this seems to use MIS to either importance sample from my material bsdf or a ray to my environment map. I am having a hard time making it work though, and I am feeling uncertain as to whether I can really say that it is unbiased.

The main problem I have is that if I have a very bright environment light on the opposite side of the material, it will pretty much be sampled at least 50% of time time according to MIS. I should know that sampling that direction won't contribute to reducing variance in any way, as the brdf in that direction is 0. But how can I incorporate this into my MIS "flow" while keeping it completely unbiased???

$\endgroup$
2
  • $\begingroup$ You could add a third sampling strategy that samples in the general direction of that bright light (e.g., a spherical Gaussian) and compute the MIS weights accordingly. This will remain unbiased. $\endgroup$ Commented Nov 21, 2024 at 19:36
  • $\begingroup$ There can be more than two strategies. For example, use one-sample model with three different sampling methods: (1) BRDF sampling (2) precomputed inverse transform importance sampling of the env-map (in PBR-book) (3) cosine-weighted sampling: you know the normal of the hit position, then sample around the normal using cosine-weighted sampling. Method (1) (3) will ensure to have front-facing samples, while method (2) can yield high contribution samples. $\endgroup$ Commented Jan 1 at 4:52

1 Answer 1

0
$\begingroup$

Not sure I understand your question. You can't know ahead of time what direction to the env map you are sampling, so there's not really any way to know it's BRDF contribution.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.