Baking spherical harmonic light volumes with mitsuba #412
expenses
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
The reason for the low utilization of the multiple cores in your script is that you are parallelizing over the number of probes, and then looping over the number of samples. It would be more efficient to generate a wavefront of size Similarly, in our rendering code, we often generate a wavefront that traces all samples for all pixels at the same time. Regarding your second point, I am not sure to understand the issue here. The path tracer should be able to converge nicely if you run it with enough samples.. For 3D textures, you should take a look at the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I've been writing a script for baking out light volumes with mitsuba recently!
https://github.com/expenses/mitsuba-lightvol-baking
The goal was to use it as a global illumination solution something like what unreal engine does: https://docs.unrealengine.com/5.1/en-US/volumetric-lightmaps-in-unreal-engine/.
ignore the background here :P
The script works by rendering a whole bunches of vertical slices, with each one containing the 4 sets of coefficients:
I'd love to get some feedback on the script as I'm not quite sure I'm doing a few things correctly:
xargs
to parallelise the rendering, e.g.:seq 0 24 | xargs -P 8 -I % python script.py models/cbox.xml % -n 25 25 25 --scale 3 3 9 --center 0 1 0
. This is because the sampling loop doesn't really seem to work on multiple cores (with thellvm_ad_rgb
backend). Is there a good way to fix this?scene.sample_emitter_direction
and sampling the pathtracer viaintegrator.sample
. Because I'd get fireflies if the pathtracer hit an emitter, I do an initial intersection test to mask things. Ideallyintegrator.sample
would return something that I can check if the primary ray hit an emitter and just mask the result based on that, which would mean that I didn't need to trace the same ray twice.Beta Was this translation helpful? Give feedback.
All reactions