-
I am creating my own BRDF and I want it to be used in mitsuba. But I am not familiar with the reflection_flags and sampled_type these two attributes, I wonder how do they actually work in the mitsuba, what it will control?
For example, the above code has defined a sampling method, then why it still should add the sampled_type and sampled_component? More specifically, if I have design my own BRDF, with my own way to generate samples as well as pdf, what kinds of reflection_flags and sampled_type I should use? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @fzy28, When you have a multi-lobed BSDF, the One primary motivation for this information is for debugging purposes. An additional use case is if you perhaps are also defining your own custom integrator, you could supply a filtered Finally, existing integrators leverage the You can see the full list of the types of |
Beta Was this translation helpful? Give feedback.
Hi @fzy28,
When you have a multi-lobed BSDF, the
sampled_type
andsampled_component
can provide information regarding the category and index of the sampled lobe.One primary motivation for this information is for debugging purposes. An additional use case is if you perhaps are also defining your own custom integrator, you could supply a filtered
BSDFContext
that could restrict the types of lobes sampled.Finally, existing integrators leverage the
sampled_type
information. As an example, with the standard path integrator, if the BSDF sample is a delta type (BSDFFlags.Delta
), no direct illumination sampling (NEE) is performed for the subsequent bounce.You can see the full list of the types…