Video playback in a scene

Hi,

for a project i am comparing Xenko with Wave (to see which one i will use). But does Xenko support the playback of video’s in a scene? Wave allows me to use them as the diffuse property of a texture. So i can playback multiple video’s in a scene.

Regards,

Per

1 Like

Hi Per,

Currently this feature is not supported out of the box.
We are planning to add it in the next few months.

Best

Hi Xenko Team,

we’re evaluating Xenko to be our Engine of choice for future industry and presentation projects. We stumbled over the issue, that there seem to be no way of displaying Video (mp4 and the like) inside a 3d Scene.
In your previous reply you suggested it comes in the next month, but this is one year back? Does the feature exist? Is it planned? i cant seem to find it on the Trello Roadmap.
Are there any suggestions from your side how a possible implementation into the source could look like?

thanks
Frank Lenhard
PiXABLE STUDIOS

Hello,

@Frank_Lenhard, just to better understand your needs:

  • Since you mentionned “inside a 3d scene”, I take it that you want video as a texture, not full screen, right?
  • What are your target platforms/graphics API?

@Frank_Lenhard also, since you asked about how a possible implementation would look like, if the target is only Windows D3D11/12, one possible implementation for render to texture would be to use MediaFoundation.

Here is a C# example: https://github.com/sharpdx/SharpDX-Samples/blob/master/Desktop/MediaFoundation/MediaEngineAppVideo/Program.cs

Inside SiliconStudio.Xenko.Graphics, there is a SharpDXInterop class to directly access the underlying SharpDX.Texture2D objects.

Of course, targeting all other platforms such as iOS/Android with GPU HW acceleration is much more work (if even possible).

1 Like

Hi @Xen2

thanks so much for your insights.
ideally we’re looking for cross platform compatibility. i guess, the differences in the platforms is the reason why its not implemented. However, since one of the last updates UNITY managed to support this feature native.
And yes, we basically need to play a video as a texture. Just fullscreen is not enough.

We currently using a open source engine, that does exactly what you describe with media foundation. but it limits us to directX and that’s a big issue in future development.
We’re aiming more towards WebGL which is not yet supported with XENKO anyhow, but basic WebGL already supports Video as a Texture out of the box. And given that WebGL (more or less) plays back on mobile devices, the platform gap might not be so big. But locking ourself in directX is a bad thing :confused:

ciao
franky

I would also be interested in video playback to a texture for Android. It looks like the underlying GL_TEXTURE_EXTERNAL_OES TextureTarget needed by the MediaPlayer/SurfaceTexture class isn’t exposed through the Xenko API; I need to create a texture of this type so that it can receive the video image.

Thanks
Guy

Noticed in the Git history that you guys are working on video playback support for Windows and Android. That’s great, can’t wait!