load_dict bsdf #1151
load_dict bsdf
#1151
-
Hi,
and the problem I get
I looked at https://mitsuba.readthedocs.io/en/latest/src/others/bsdf_deep_dive.html but did not instructions for loading reflectance that has more than 1 number. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
njroussel
Apr 26, 2024
Replies: 1 comment
-
The plugin pages (for BSDF) always have snippets of examples to initialize plugins from XML or Python dictionaries. Here's what you want to be doing: bsdf : mi.BSDF = mi.load_dict({
'type': 'diffuse',
'reflectance': {
'type': 'rgb',
'value': [0.8, 0.2, 0.2]
#'value': mi.ScalarColor3f(0.8, 0.2, 0.2) <- This is also valid
}
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
merlinND
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @zichenwang01
The plugin pages (for BSDF) always have snippets of examples to initialize plugins from XML or Python dictionaries.
Here's what you want to be doing: