yuki-koyama / blender-cli-rendering

Blender Python scripts for rendering images directly from command-line interface
GNU General Public License v3.0
733 stars 107 forks source link

[Question] Transparent background #32

Closed bsridatta closed 3 years ago

bsridatta commented 3 years ago

11_mesh_vizualization.py has the feature transparent background but the rendered image isn't transparent, even after changing the format to PNG to support alpha channel. When running the code with UI, I see that it does get the transparent background when I change the view of the rendering to View Layer -> combined. But the image being saved is using the Composite option instead of view layer. Is there anyway to enable saving the combined view layer? or any workaround. Thank you very much!

image

yuki-koyama commented 3 years ago

What Blender version are you using? If it is 2.9x, then the APIs may be changed since I wrote the script.

bsridatta commented 3 years ago

Thanks for the response. I am using 2.8 itself. Even the example 11_mesh_visualization.py has a gray background and not transparent. However in my case, though changing render film properties to transparent, the bg was black which is the default addition in the composite layer. Rendering without the composition nodes gave a true transparent image.