When you try to export a video with the --transparent flag and the opengl renderer, the output video doesn't have any alpha channel.
Expected behavior
Rendered video should have transparency (alpha channel).
How to reproduce the issue
Use a ThreeDScene or Scene (the problem is the renderer, not the scene) with some OpenGLRectangle (or OpenGLMobject you want), set the self.camera.background_opacity = 0 and use the --renderer opengl and the -t tags/flags.
Additional comments
If you check the opengl_renderer.py file, that is the specific renderer that takes part when you send that flag, you can see in the line 596 that the background color is forced to have 1.0 as alpha background. This means that the background will never be transparent. That alpha value should check if the flag --transparent is set as True, as the cairo_renderer.py does, or at least allow you changing that value.
Even in the update_frame method of that file, if you manually force the background_color to be (0, 0, 0, 0) as a numpy array, it is set as 1.0 for the alpha as the setter is forcing it.
Description of bug / unexpected behavior
When you try to export a video with the
--transparent
flag and theopengl
renderer, the output video doesn't have any alpha channel.Expected behavior
Rendered video should have transparency (alpha channel).
How to reproduce the issue
Use a
ThreeDScene
orScene
(the problem is the renderer, not the scene) with someOpenGLRectangle
(orOpenGLMobject
you want), set theself.camera.background_opacity = 0
and use the--renderer opengl
and the-t
tags/flags.Additional comments
If you check the
opengl_renderer.py
file, that is the specific renderer that takes part when you send that flag, you can see in the line 596 that the background color is forced to have1.0
as alpha background. This means that the background will never be transparent. That alpha value should check if the flag--transparent
is set asTrue
, as thecairo_renderer.py
does, or at least allow you changing that value.Even in the
update_frame
method of that file, if you manually force thebackground_color
to be (0, 0, 0, 0) as a numpy array, it is set as1.0
for the alpha as the setter is forcing it.