mitsuba2
mitsuba2 copied to clipboard
- [❔ other question] How to fill a volume grid with sigma_t values corresponding to a certain material
Hello,
In your paper you showed a volume optimization using smoke. I was wondering if there is any code available showing how you setup the scene, especially the .vol file's data to correspond to the material of smoke. I am trying to recreate a similar setup, and have spectral data of my material available, which can be loaded into my scene with the <spectrum name="sigma_t" filename="$matobj"/>
, where $matobj is my filename. I would like to port this data to my volume grid.
Hello @vucenovic,
The smoke plume reference data comes from OpenVDB's sample volumes: https://www.openvdb.org/download/ It was then converted to Mitsuba's simple binary format using @dvicini's converter: https://github.com/mitsuba-renderer/mitsuba2-vdb-converter
If you are trying to supply 3D spectral data and rendering it in a volume, I believe you will need to extend the Grid3d plugin to support it. Currently, it can handle either 1 or 3 channels:
https://github.com/mitsuba-renderer/mitsuba2/blob/858509e6cf1fbade7c3ae06f63a67eac7d31727e/src/textures/grid3d.cpp#L106-L117
You will probably need to achieve something like the regular
or irregular
spectrum plugins, depending on your spectral data.