Video clips need to be in an AVI file format with Channels: RGB + Alpha and Premultiplied Colour. For those of us not versed in the dark arts of video formats, you can use the Keylight tool and then export from After Effects with the above settings to quickly get a video with transparency.
- Importing the video
- The UE4 Media Framework does not directly import video but creates a stub to reference the video. Move to import your video file to create a
File Media Source
. - The File Media Source needs to be accessed by a media player. You can make this by creating "Media -> Media Player".
- Once the media player is created, select the AVI video source.
- Create a Media Texture by right clicking the Media Player and selecting "Create Media Texture." Note that the Media Texture and Media Player are linked.
- Create a material from the media texture
- You may set the material to be either masked or translucent. Masked seems to produce better results.
Add the material to an object in the scene. A plane or a cube will work best for a video converted from green screen.
See the documentation here https://docs.unrealengine.com/latest/INT/Engine/MediaFramework/HowTo/FileMediaSource/
Translucent materials don't support dynamically cast shadows, but masks should work well with shadows. Soft raycast lighting does not seem to work. To cast shadows with the material ensure the primitive on which the material plays has shadows disabled and enable dyanmic shadows on the material.
so this allows us to layer different videos on top of each other in unreal?