I am currently working on playing a video with a GUI button on it. It seems that right now I am able to play a video on a mesh but I am not able to see the GUI button. We’ve tried to use multi material, adding both advance dynamic texture and video texture together but it seems we can only see one of the two.
I’ve created a playground that can replicate the issue and I hope you can help us with this one.
The main issue is that both the video texture and gui texture needs to be displayed on the mesh so basically both texture need to be blended.
Maybe a simpler trick would be to duplicate the mesh so that you render the one with gui on top of the one with video. using the zOffset property you could prevent z fighting ?
I this might be difficult to implement. But we’ll definitely take a look into that.
@sebavan looking into your solution. Would it be possible to make a plane the size of the mesh and use that to apply the gui texture? The only thing I’m not quite sure is how would you make the plane be the same size of mesh. Will it be possible using bounding box and how?
This would not really work as the plane will not have the right curvature like the screen do.
If you are in full control of your assets (I mean the model) I would separate the screen from the rest of the mesh so you could clone a smaller one.
But @DarraghBurke solution is the simplest
Thank you I understand your point. Trying to update the code a bit (Where the original mesh has the video texture and the clone has the gui texture) but it seems that I cannot press the button anymore. Is this not possible?
I saved it in this playground
Hopefully this will be the last for this thread ^^
The element with the video is interfering with picking the GUI element. All you need to do is turn off
isPickable on the video element Curved screen with GUI, clickable | Babylon.js Playground (babylonjs-playground.com)
Thank you! That explains it!