How to output the optimized reflactance #196
-
hi, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hello @EMwavelength, I've converted your Issue to a Discussion because it doesn't concern a bug in the system. In your optimization script, you've probably noticed a Let's say the name of the parameter containing a diffuse albedo texture is called img = mi.Bitmap(params['wall.bsdf.data'])
img.write('optimized_texture.exr') (didn't try to run this particular code, let me know if this doesn't work). In the case of the Cornell Box in the inverse rendering tutorial, it doesn't use a texture but a single RGB value, so I think you could just print it after the optimization is done: for k, v in params.items():
print(k, v) |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
Hello @EMwavelength,
I've converted your Issue to a Discussion because it doesn't concern a bug in the system.
In your optimization script, you've probably noticed a
params
object (acting like a dictionary) that contains all of the parameters being optimized.Let's say the name of the parameter containing a diffuse albedo texture is called
'wall.bsdf.data'
. Then you can get an image out with something like:(didn't try to run this particular code, let me know if this doesn't work).
In the case of the Cornell Box in the inverse rendering tutorial, it doesn't use a texture but a single RGB value, so I think you cou…