We discussed in a meeting, the conclusion is that it seems confusing to have two parametrizations doing pretty much the same thing, so we don't implement this option yet.
For compatibility…
Double Henyey-Greenstein. Remove the hyphen after Double.
This function name is not quite clear, how about volume_has_same_phase_function()
?
Also a comment here explaining the functionality would be good. I guess it's finding the angle using binary search.
This function needs a description, it is not clear from the name.
These if (pdf)
are not needed. In all the use cases of phase function sampling we require the pdf.
😅 Thanks for spotting this typo, I'll commit a cleanup and merge this to reduce noise in the PR.
Rayleigh is parametrized by cosine angle, so this should just be dot(-sd->wi, wo)
instead acosf(dot(-sd->wi, wo))
.
Using vector_angle()
is better behaving at small angles. Also since it's an angle, call it theta
instead of cos_theta
.
I don't think we should expose Draine phase function in the UI. Too many options look overwhelming, so we would like to only support phase functions for common use cases. Water, cloud and atmosphere are all quite usual, but Draine for interstellar dust seems too specific to support? Also it can be achieved by setting other parameters to zero in the Draine-Henyey-Greenstein model.
I don't understand why this new density mode is needed, using color should be enough?