raysect / source

The main source repository for the Raysect project.
http://www.raysect.org
BSD 3-Clause "New" or "Revised" License
88 stars 23 forks source link

Feature/brdf interface #263

Closed mattngc closed 5 years ago

mattngc commented 5 years ago

Adding some draft code for a evaluate_BRDF() interface method. Although I agree it would be better to go for the full materials refactor, I would argue this is currently a long way away. Our users often ask me about this feature and I think its essential for their work. Its also possible to pull back the amount of changes here and just limit this new function to the rough metals, as thats were all the requests are.

mattngc commented 5 years ago

The demos I added in 6f6856e4e1d5bd30a5b14ad8f127841a96c463ec create plots like these:

brdf_polar_plots brdf_surface3d_plots brdf_slice_plots

mattngc commented 5 years ago

Reviewed this code with @CnlPepper. We agreed that the overall concept and demos look great. However we don't want to expose these methods at the Material interface level because we expect further API changes in future. Agreed instead to just implement this on the ContinuousBSDF material. All other implementations will be removed.

mattngc commented 5 years ago

Made all changes request by @CnlPepper.