Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by viktor_vaughn · Jan 26, 2017 at 11:38 AM · videovideo streamingbetaalpha-channel

How to integrate a video with alpha channel (rgb+alpha) in the new 5.6 videoplayer?

I would like to integrate videos with an alpha channel into my project. I'm streaming the videos from my harddrive using the new videoplayer from the 5.6 beta. Currently I'm using the particle/additive shader as a workaround instead of an alpha. Is it currently possible to integrate an video with alpha channel (rgb+alpha)? Which format is supported?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by djsegler · Sep 14, 2017 at 01:19 AM

@this-play -

Did this ever get resolved? Trying out the new VideoPlayer component and not able to get transparency to work correctly. Followed the instructions here: https://docs.unity3d.com/Manual/VideoTransparency.html that prescribes that the video clip with alpha needs to be encoded with ProRes 4444 or VP8. I used ProRes 4444 and I can see the video with alpha correctly in the preview window, but in the game view, the transparent regions still render as black.

What am I missing?

2017.1.1f1

Thanks!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image djsegler · Sep 14, 2017 at 03:51 PM 1
Share

Everyone,

I've discovered the problem. Aside from properly encoding the footage before import, it's also necessary to select the "Sprites-Default" material in the $$anonymous$$esh Renderer component. Otherwise, the transparency isn't recognized.

Unity $$anonymous$$m - would you be willing to update the documentation to highlight this? $$anonymous$$aybe it's obvious for some, but wasn't for me!

Thanks!

avatar image
0

Answer by MrMatthias · Jan 26, 2017 at 01:52 PM

No. you have to put the alpha channel into the video. so you have a video with color on the left and black/white alpha mask on the right. Then you can write a shader that samples the texture for the alpha value.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by BlaineBrezina · Jun 12, 2017 at 08:44 AM

Sorry to necro a thread but for anyone who passes through here looking for answers.

It is possible to do this. Unity prefers H.264 and Webm VP8 formats for video formats with alpha it seems. Also would suggest overriding the encoding to H.264. It may take a while for unity to apply this import setting but it is a file format that is supported across a wider variety of devices (including android). More info here: https://forum.unity3d.com/threads/settings-for-importing-a-video-with-an-alpha-channel.457657/#post-2971240

I found that using the Unlit/Transparent Cutout shader on the renderer object (Object you are rendering video on) works wonders with alpha'ed video, as long as you don't need the video to react to lights in you scene.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by this-play · Jul 04, 2017 at 02:53 PM

Hi guys,

we exported the footage as uncompressed AVI with RGBA, then used this encoder, since the transcoding method utilizing ffmpeg in this thread did not work for us. But you have to install the direct show filter nevertheless.

the videoplayer displays the footage correctly with alpha channel, but just in the preview. If we make a build the texture is just white.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by kordou · Mar 20, 2018 at 06:52 AM

hi

i also have a problem with transparency. I have made a .webm transparent video with ffmpeg and VP8. I tried out of unity app and the transparency works for pc and android.

  • I tried to simple play it as a link with the 5.6 videoplayer (URL) but i get the green screen on my video (does not read the alpha value)

  • i tried to transcode and then played as a link (i upload the transcoded file) but still getting the green screen

  • i tried it with easymovie texture but still the same

any ideas about how to solve this ?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Handheld.PlayFullScreenMovie in iOS is faulty? 0 Answers

play back 360 video STEREO on GearVR 1 Answer

VideoPlayer streaming and buffering 0 Answers

MovieTexture.duration is giving me the wrong time. 1 Answer

Is it possible to access a file from the android Internal storage on to a Unity app during run time? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges