How to Render Hyperspectral Image? #1406
-
Hi all, I'm using specfilm to render an image with 48 bands (every 10 nm from 360 to 830). <film type="specfilm">
<integer name="width" value="1024"/>
<integer name="height" value="512"/>
<string name="component_format" value="float16"/>
<boolean name="sample_border" value="false"/>
<boolean name="compensate" value="false"/>
<rfilter type="gaussian"/>
<spectrum name="band0" value="360.0:1, 370.0:1"/>
<spectrum name="band1" value="370.0:1, 380.0:1"/>
<spectrum name="band2" value="380.0:1, 390.0:1"/>
<spectrum name="band3" value="390.0:1, 400.0:1"/>
<spectrum name="band4" value="400.0:1, 410.0:1"/>
<spectrum name="band5" value="410.0:1, 420.0:1"/>
<spectrum name="band6" value="420.0:1, 430.0:1"/>
<spectrum name="band7" value="430.0:1, 440.0:1"/>
....... When I print the SpecFilm object after loading the xml file into a scene: In [8]: scene.sensors()[0].film()
Out[8]:
SpecFilm[
size = [1024, 512],
crop_size = [1024, 512],
crop_offset = [0, 0],
sample_border = 0,
compensate = 0,
filter = GaussianFilter[stddev=0.50, radius=2.00],
file_format = OpenEXR,
pixel_format = multichannel,
component_format = float16,
film_srf = [
RegularSpectrum[
distr = ContinuousDistribution[
size = 48,
range = [360, 830],
integral = [930],
pdf = [1, 2, 2, 2, 2, .. 38 skipped .., 2, 2, 2, 2, 1]
]
]
],
sensor response functions = (
RegularSpectrum[
distr = ContinuousDistribution[
size = 2,
range = [360, 370],
integral = [10],
pdf = [1, 1]
]
]
RegularSpectrum[
distr = ContinuousDistribution[
size = 2,
range = [370, 380],
integral = [10],
pdf = [1, 1]
]
]
.......... I just want to clarify that this is the appropriate way to generate multiple bands? My understanding is that it accumulates radiance based on the film_srf during render, and then splits this result into the defined 'sensor response functions' bands for saving an image. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Disgruntoad , It is the intended way. The plugin, as you mentioned, has the strategy to amortize the cost of tracing rays that contributes to several bands. That is the reason that it traces accordingly to the film's SRF and redistribute to the bands afterwards. Otherwise, it would be equivalent to launch in parallel rays accordingly to the wavelengths of the bands. Best |
Beta Was this translation helpful? Give feedback.
Hi @Disgruntoad ,
It is the intended way. The plugin, as you mentioned, has the strategy to amortize the cost of tracing rays that contributes to several bands. That is the reason that it traces accordingly to the film's SRF and redistribute to the bands afterwards. Otherwise, it would be equivalent to launch in parallel rays accordingly to the wavelengths of the bands.
Best