Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • $\begingroup$ Hello, I'm not quite sure what you mean by "boundary of the integration change[s] to positive m.n and so you drop the Heaviside f[u]nc[tion] to reflect that". I thought the boundary of integration with the microfacet normal is positive m.n due to the Heaviside function and presumably when we drop the Heaviside function when integrating the output (rather than the microfacet normal) direction m.n can be < 0 which works for some reason. Also rather than having an if statement I just set the pdf to 0 (with the microfacet normal which has the Heaviside function) which should function the same. $\endgroup$ Commented Jan 11, 2023 at 1:07
  • $\begingroup$ I have added a simple example to the answer. The Heaviside fnc is a constant after all and can be put outside the integral while changing the boundaries. $\endgroup$ Commented Jan 18, 2023 at 19:17
  • 1
    $\begingroup$ I understand you can drop the Heaviside function to integrate into 1. As for why it doesn't integrate to 1 with the Heaviside function: It turns out the mapping from m to o is not one-to-one since both 2(i . m) m - i and 2(i . -m) -m are valid and for the jacobian to work you need to take into consideration both. So in practice, this looks like if (m . n < 0) { m = -m }. After this change, the function integrates into one (with the Heaviside function) as you would expect. $\endgroup$ Commented Jan 21, 2023 at 2:59