Creating screenshots from multiple views

Hi all,

I’m looking into capturing a screenshot from multiple cameras at once to form a single image that includes those camera views. What would be the correct approach?



Probably the best will be to create a screenshot per camera and then use a bit of JS to reassemble all inside a canvas (2D) then simply getting a PNG out of the canvas

We were thinking more along the lines of rendering multiple views directly on the canvas used for our scene and somehow snapshotting just once. Something similar to the demo here: Babylon.js - Multi views demo, but using the CreateScreenshotAsync method doesn’t seem like it would work in this case. Stitching together is an option, but we’re looking for something to do the job more quickly. Any thoughts?

Multi views are actually based on multiple canvases.

So I’m afraid stitching is probably one good option

Other one is to work with viewports maybe? Like using viewport to render individual scenes to specific portion of the canvas?

1 Like

I suspected as much, regarding multi-views. Assuming rendering using viewports implies multiple scenes, I’m not sure that’s an appealing route for our use case, but we’ll keep it in mind. Thanks @Deltakosh!