You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get surface normal map through AOV integrator and multi-channel image.
I tested the example cbox file and got .png and .exr file successfully.
However, when I print the rendered .exr file:
bmp_exr = mi.Bitmap('my_first_render.exr')
print(bmp_exr)
It shows:
image: TensorXf(shape=(256, 256, 12))
RuntimeError: "my_first_render.exr": read 0 out of 4 bytes
The 'image' you get when you render with a custom AOV integrator is a multi-channel image which has the same channels as the custom variable channels you are trying to integrate in the form which has this shape: TensorXf(shape=(img_width, img_height, n_channels))
In the example integrator you have:
4 channels reserved for the final render output
1 channel for the depth value (Your dd.y:depth value)
3 channels for the normal value (Your nn:sh_normal value)
4 channels for the path integrated image
In your case, the final render and the path integrated image will be equal because both are rendered with pathtracing. If you want to get the normal of the output, you can simply put something like:
Dear community:
I am trying to get surface normal map through AOV integrator and multi-channel image.
I tested the example cbox file and got .png and .exr file successfully.
However, when I print the rendered .exr file:
bmp_exr = mi.Bitmap('my_first_render.exr')
print(bmp_exr)
It shows:
image: TensorXf(shape=(256, 256, 12))
RuntimeError: "my_first_render.exr": read 0 out of 4 bytes
Does anyone know this issue?
Thanks in advance!
The text was updated successfully, but these errors were encountered: