-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exporting BSDF layers (roughness, metallic, etc.) #282
Comments
Hey, first question would be do you want it per object or per pixel? Both should be possible just different approaches for each. Best, |
Hi Max -- thanks for the quick response! Per-pixel would be ideal. Thanks!! |
Hey, could then you are up for a ride :D I don't know how you guys manage to do this, but whenever someone open an issue, we are currently in the process of rewriting the class in question. So, what you can do is you can use the SegMapRenderer. It allows you to write down custom properties in a pixel wise fashion. How would that look in code, create a new module and add this to the run function, if you already use the python api you just have to copy that code after you loaded your objects. objects = get_all_mesh_objects()
for obj in objects:
materials = obj.get_materials()
for material in materials:
principled_bsdf = material.get_the_one_node_with_type("BsdfPrincipled")
for key in ["Roughness", "Metallic", "Specular"]:
obj.set_cp("cp_"+ key, principled_bsdf.inputs[key].default_value) After that you specify in the SegMapRender Module which attributes you want to render, which then would be these custom properties: I hope this helps. PS: I have not tested this piece of code, I wrote it in the browser. Best, |
That's awesome, thanks a lot Max! I'll give this a shot first thing tomorrow morning! Thanks again! |
If you want to thank me tell you friends about BlenderProc ;) I will close this for now, if you have a follow up you can reopen it. If it is a new question, you can just open a new issue. |
Hi,
Thank you for creating and maintaining this excellent repo! I have a question that I hope you can help me with, or point me in the right direction. I would like to export various surface properties such as
roughness
,metallic
,specullar
etc. As far as I could tell that's not supported right now - I saw this issue #177 but wasn't sure if there was a follow up (outputting the diffuse image is an excellent addition!).Digging a bit through the code, I saw that here we have access to all the relevant layers, including
roughness
,metallic
-- is that the right place to look? Any hints on how I could go about exporting that information are very welcome!Thanks for the help!
The text was updated successfully, but these errors were encountered: