Get camera stream and set inside to GUI

Hello everybody! The problem is this:
There are two cameras. I want to receive an image from the second camera and display it on the monitor screen, from the screenshot where it says ‘Click for change camera’. On the monitor, I now have a GUI button that makes the second camera active. Is it possible to display the image from the second camera on the monitor using the GUI? What are the options for solving this problem?

Unfortunately GUI cannot read textures so you can still use renderTargetTextures (from the camera) and then save it as a png :wink:

1 Like

Thanks for the answer. I didn’t quite understand how to take png from the second camera and show it in the mesh. In this example, if I try to add a camera to renderList, the application hangs with Cannot read property ‘_currentLODIsUpToDate’ of undefined

Example Babylon.js Playground

https://playground.babylonjs.com/#V2F19D#1

You can use the activeCamera of the RTT for that :slight_smile:

2 Likes

So I can’t just take an image from the second camera and display it on the panel? Do I need to add renderTarget.renderList.push (mesh) to every element of the scene?

If you want to render the full scene just put the renderlist to null,

1 Like

But be carefull to not render the plane you have the texture on in the list or it wont work cause it needs the rtt that needs the plane that needs the rtt that needs the plane … :slight_smile:

1 Like

Thank you very much. It all worked.