Media Player Shaders

Hi folks,

spent some hours trying to render the light parts of the video only (with an additive material),
so I would have a glowing transparent video. But whatever shader I use, the video has a
'light condition' and I can see the plate it is presented on. So the media player export the
videos kind of "set video brightness + 20%"? With the Unity Player I just render videos to
a material (set to mobile/additive) and can place it on top of other meshes that shine through.

Would be very cool if there is a way to do so with the ML 2 Media Player, cause
it would make very detailed holographic animations possible (even stereoscopic),
without using any high poly 3D mesh animations...

1 Like

Hi @pepone, let me talk to our engineers and see what they have to say. I'll report back asap. Thanks for your post.

1 Like

Here is a perfect sample. If your genius enginieers can create a .additive shader for video playback (normal + stereoscopic) we can render visuals like this without any performance problem: Iron Man 2 Amazing Interfaces & Holograms (Pt. 2 of 3) - YouTube

1 Like

Thank you @pepone, this is excellent feedback. Our engineers logged this feedback to investigate. The discussion I had with our engineers centered on the following, for context:

"We (Magic Leap) decode the media frame and render it onto a Unity texture. That texture then gets rendered in the scene with whatever material / shader the dev chooses, and upon whatever geometry the dev chooses. From our side, the Unity texture we provide the frames on is a simple rgba texture. However, there might be some limitations and/or bugs in this process.

1 Like

If your devs are on it - it would be perfect if they not only fix the 'bounding box' - it would be supercool if they add a SBS alpha shader to the video part. So we can film real people (or create highpoly animations), create a mask for the alpha channel and put them as a .mp4 on a 2D mesh in the ML2. If you have an actor about 2 meters away this really looks real. Not sure if it will have an effect if you even use a stereoscopic alpha video shader. But for sure worth a try if your UnityDevTeam has


a shader genius :partying_face:

Btw. not sure if there is a 'really working' solution to put the alpha channel in a .mp4 movie itself. Would be a cool option, too - but side by side would work always and easy...