Basic Help in Writing a Custom Plugin #1785
-
|
Hi all, I'm attempting to write a PragueSunSky plugin that can represent wavelengths from 280 --> 2480nm (https://github.com/PetrVevoda/pragueskymodel). I've converted the base code to use DrJit function calls and data structures, primarily dynamic arrays. I've confirmed the function calls reproduce the original code's output. I'm now attempting to implement the code in Mitsuba, but I'm a little lost on where to begin. I read through https://mitsuba.readthedocs.io/en/stable/src/developer_guide/writing_plugin.html, but it's not clear to me (a) what functions are necessary for an emitter plugin (I assume eval(), eval_direction() and pdf_direction()?) and (b) what the arguments to these functions need to be? I'm also not entirely sure what the shape of Spectrum is for spectral and scalar rendering. I assume it's a tensor of [height, width, channels]? Is this documented somewhere or what would be the best way for me to understand Mitsuba's code flow? Where are calls to emitter plugins located in Mitsuba's rendering code? Thank you for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Hi @Disgruntoad Here's a few useful links:
|
Beta Was this translation helpful? Give feedback.
Hi @Disgruntoad
Here's a few useful links:
Emitterthan you can override in your custom implementation: https://mitsuba.readthedocs.io/en/stable/src/api_reference.html#mitsuba.EmitterPtrSpectrumtype you can read more about how it ge…