Problems Creating Movie with Transparency
Posted: Sun Mar 12, 2023 7:36 pm
This is not a purely Renpy, or even mainly Renpy question, but relates directly to what I am trying to do, and I hope someone using a similar toolset ( Renpy, Blender and Spine 2D) might have an answer to my problem.
I recently purchased the Spline 2D Animation app and am trying to use it's rendered output for character overlays/animations in Renpy. I am trying to get a movie with a transparent background. I have tried exporting the animated sequence directly from Spine as a movie using the webm format which Renpy can read. In spite of the preview having a transparent background, and checking "Transparent Background" in the export settings, the background shows as black in Renpy.
So I exported as a PNG sequence, which does come out as expected with a transparent background and I tried exporting a movie of the sequence using the Blender Compositor. In spite of the Viewer preview showing Transparent, still renders having a transparent background and the background showing transparency as it renders the animation, once again the rendered video has a black background when viewed and in Renpy.
I can assemble the stills laboriously into a sequence in Renpy and have tried it out, but I feel like these sequences don't load smoothly, are time consuming to create and take up a lot of space in the script, as my sequence is currently 40 frames long.
I've looked into this a bit and apart from Spine, I'm not a super newbie. In Blender, I have transparency checked in the film tab. I've tried plugging the alpha directly into the composite node. I have RGBA selected in the render output panel. I have Use Alpha checked on both the Viewer and the Composite nodes.
The movie export settings I'm using are:
File Format: FFmpeg Video - Color RGBA
Encoding - Container: I've tried both WebM and Matroska
Video Codec: WEBM/VP9
Output Quality: I've tried High, Perceptually Lossless and Lossless.
Encoding Speed: Slowest
Audio Codec: No Audio
In the compositor I am using a transform node to position the PNG sequence, an Alpha Over node (compositing over an empty image for placement) and two instances of the Filter node. Whether is arrangement might cause some sort of problem I'm not sure, but as I've said the stills show the transparency and I've also tried plugging the PNG sequence directly into the Composite node to test this and the result was still a movie with black background
If anyone has a clue why I can't get a video with transparency from Blender for use in Renpy, any help or tips would be great.
Thanks!
I recently purchased the Spline 2D Animation app and am trying to use it's rendered output for character overlays/animations in Renpy. I am trying to get a movie with a transparent background. I have tried exporting the animated sequence directly from Spine as a movie using the webm format which Renpy can read. In spite of the preview having a transparent background, and checking "Transparent Background" in the export settings, the background shows as black in Renpy.
So I exported as a PNG sequence, which does come out as expected with a transparent background and I tried exporting a movie of the sequence using the Blender Compositor. In spite of the Viewer preview showing Transparent, still renders having a transparent background and the background showing transparency as it renders the animation, once again the rendered video has a black background when viewed and in Renpy.
I can assemble the stills laboriously into a sequence in Renpy and have tried it out, but I feel like these sequences don't load smoothly, are time consuming to create and take up a lot of space in the script, as my sequence is currently 40 frames long.
I've looked into this a bit and apart from Spine, I'm not a super newbie. In Blender, I have transparency checked in the film tab. I've tried plugging the alpha directly into the composite node. I have RGBA selected in the render output panel. I have Use Alpha checked on both the Viewer and the Composite nodes.
The movie export settings I'm using are:
File Format: FFmpeg Video - Color RGBA
Encoding - Container: I've tried both WebM and Matroska
Video Codec: WEBM/VP9
Output Quality: I've tried High, Perceptually Lossless and Lossless.
Encoding Speed: Slowest
Audio Codec: No Audio
In the compositor I am using a transform node to position the PNG sequence, an Alpha Over node (compositing over an empty image for placement) and two instances of the Filter node. Whether is arrangement might cause some sort of problem I'm not sure, but as I've said the stills show the transparency and I've also tried plugging the PNG sequence directly into the Composite node to test this and the result was still a movie with black background
If anyone has a clue why I can't get a video with transparency from Blender for use in Renpy, any help or tips would be great.
Thanks!