Closed brabbitdousha closed 1 month ago
Hi @brabbitdousha
This is a bug, we were missing an implementation for Twosided::eval_attribute
. I've pushed a fix in https://github.com/mitsuba-renderer/mitsuba3/commit/5508ee6a392e2b32c1a4360742cbe9c966586458.
Thank you!
You will either need to cherry-pick this commit into your local build and recompile, or wait for the next public release if you can't build the project yourself. You could also implement a custom BSDF in Python that behaves exactly like the twosided
bsdf and add the missing eval_attribute
code there if you do not want to compile yourself or wait for the release.
Hi @brabbitdousha
This is a bug, we were missing an implementation for
Twosided::eval_attribute
. I've pushed a fix in 5508ee6. Thank you!You will either need to cherry-pick this commit into your local build and recompile, or wait for the next public release if you can't build the project yourself. You could also implement a custom BSDF in Python that behaves exactly like the
twosided
bsdf and add the missingeval_attribute
code there if you do not want to compile yourself or wait for the release.
@njroussel Thanks for the quick reply! I checked your commit and I forgot to mention that has_attribute
may also need an implementation, many thanks!
Indeed... thank you :+1:
Summary
Hi, I am trying to get roughness in python using misuba3, however, si.bsdf().eval_attribute_1('roughness', si) could not be used for a specific BSDF inside the twosided BSDF.
System configuration
System information:
OS: windows CPU: intel i9-13900H GPU: RTX 4060 laptop Python version: 3.9 CUDA version: 12.0 NVidia driver: 550.54.14
Dr.Jit version: 0.4.4 Mitsuba version: 3.5.0
Description
Here is the bsdf that I tried with to eval roughness, with testBSDF2, everything is ok with my code below, however, when using testBSDF( with BSDF inside a twosided BSDF), si.bsdf().eval_attribute_1('roughness', si) will only return zeros, I think I need to call the sub BSDF to get the actual attribute, is there any way to do it in python-mitsuba3 ?
my code that gets the roughness(alpha)
Steps to reproduce