Skip to content

How to output the optimized reflactance #196

Answered by merlinND
EMwavelength asked this question in Q&A
Discussion options

You must be logged in to vote

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:

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 cou…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by EMwavelength
Comment options

You must be logged in to vote
2 replies
@merlinND
Comment options

@EMwavelength
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #193 on August 21, 2022 08:37.