- Home /
Question by
WildMage · Jan 31, 2018 at 01:30 PM ·
screenshottransparent
Transparent background screenshot not working with Speedtree shaders (Nature/Leaves_Fast)
Hi, I have a script to take screenshots with transparent backgrounds. I set the camera clear color to (0,0,0,0), read to a RGBA texture with ReadPixels, and export to .png.
It works perfectly with solid objects and transparent objects (using a Standard material with transparent cutout rendering). For instance here the red discs are planes with transparent materials:
However, when I use try to render trees, the leaves (that must use Nature/Leaves or Leaves_Fast) are not properly rendered:
It looks like the alpha channel is destroyed when rendering the leaves, so the values I read on the alpha buffer are wrongs. What can I do to be able to create textures of trees with transparent backgrounds?
Thanks.
transparent-cutout.png
(40.4 kB)
leaves-fast.png
(38.4 kB)
Comment