I have been working on extending pbrt to render infrared images, and since almost everything can be considered an emitter in infrared, ive been looking into the DiffuseAreaLights.
Currently, each instance of DiffuseAreaLights has it's own copy of an Image (as mentioned in #183). This leads to loading being insanely slow and memory exploding if one tries to create a mesh light with an associated image for emission, since each triangle has to load and store it's own image. This is quite easily fixed by simply using Image* instead and only loading each image once.
If this is something that would be deemed usefull for the code i can happily create a pull request.
But looking at the function DiffuseAreaLight::Bounds() which computes the power of the light, we see that the current sampling wouldn't work for models that have emissive textures and are uv mapped. So maybe the "fix" i stated earlier is of no interest with the current light samplers? Would improving the DiffuseAreaLight::Bounds() to work for uv mapped shapes be of interest, or would this be considered to far away what is currently described in the book? And if it is of interest, does anyone have any ideas for how one would go about computing this power? (Maybe monte carlo?)
Any thoughts on the matter would be very appreciated, sorry if my writing was hard to follow.
I have been working on extending pbrt to render infrared images, and since almost everything can be considered an emitter in infrared, ive been looking into the
DiffuseAreaLights.Currently, each instance of
DiffuseAreaLightshas it's own copy of anImage(as mentioned in #183). This leads to loading being insanely slow and memory exploding if one tries to create a mesh light with an associated image for emission, since each triangle has to load and store it's own image. This is quite easily fixed by simply usingImage*instead and only loading each image once.If this is something that would be deemed usefull for the code i can happily create a pull request.
But looking at the function
DiffuseAreaLight::Bounds()which computes the power of the light, we see that the current sampling wouldn't work for models that have emissive textures and are uv mapped. So maybe the "fix" i stated earlier is of no interest with the current light samplers? Would improving theDiffuseAreaLight::Bounds()to work for uv mapped shapes be of interest, or would this be considered to far away what is currently described in the book? And if it is of interest, does anyone have any ideas for how one would go about computing this power? (Maybe monte carlo?)Any thoughts on the matter would be very appreciated, sorry if my writing was hard to follow.