-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
WebM with alpha showing black background instead of transparent. #43736
Comments
I don't think support for transparent WebM was ever implemented. Not that our current WebM playback support is too reliable anyway: https://github.com/godotengine/godot/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+webm+label%3Abug The goal is to eventually move video support out of core and into a FFmpeg-based plugin. Video playback is hard. |
Closing in favor of godotengine/godot-proposals#1070, as feature proposals are now tracked in the Godot proposals repository. |
Hey is it possible for this to get solved in the next two months? I need this feature for a recent project. Another good work around I thought of would be to use animated textures, splitting the video into separate png files first, preserving the transparent parts. But assigning all those hundreds of textures frame by frame is not really a serious option. Even worse, after every assignment Godot needs time to reimport that png (idk why tbh). Is it possible to load multiple png files as frames for an animated texture at once? |
Nobody really knows how to implement this, unfortunately. If you only need materials with additive blending, you can already have a transparent video displaying this way (since that's how additive blending works). Black will appear to be fully transprent. Alternatively, you can use a chroma keying shader on a CanvasItemMaterial or SpatialMaterial. |
Yes, thanks a lot for the hint to use a shader. That worked fine. Now I just need a better video editing software to create masks and cut out greenscreen stuff. :) |
I think Olive has chroma keying features, even in its current stable version (0.1, not the 0.2 rewrite). |
Hey thanks for the hint, I checked it out already. |
Most other video codecs like H.264 are patent-encumbered. Supporting them in an open source engine is risky in countries where software patents are followed, such as the United States. That said, there are plans to remove built-in video playback functionality in profit of an official GDNative add-on based on FFmpeg. FFmpeg is larger, but is much more compatible and has the potential to be less buggy. |
That was quite a good hint. I finally managed it, preprocessing the video in several video editors such as adobe after effects > shortcut > then used ffmpeg to convert lossless and i had a video with my pixelperfect magenta mask applied and was able to key it out using a shader :) now I have a transparent video playing inside a sphere mesh displaying serveral layer in front and beyond it 🤠 |
Godot version:
v3.2.3.stable.official
OS/device including version:
GLES3
Issue description:
Playing a .webm file that was encoded with an alpha channel has a black background in godot. This is how I'm planning on doing all attack and battle animations, and it's much cheaper on memory than using a .png spritesheet.
Steps to reproduce:
Minimal reproduction project:
WebM Alpha.zip
The text was updated successfully, but these errors were encountered: