Layer is not shown/rendered in the screenshot

I would like to have an svg or png as a background for a scene. I would like to render this scene as large as possible as a sceenshot so that I can then print it out (as a poster, for example).

When I use “CreateScreenshot”, the layer is rendered. However, the scene is very blurry when I render it at 3000px:
When I use “CreateScreenshotUsingRenderTarget”, the scene is sharp but the layer is not rendered in the screenshot: Babylon.js Playground

I found a similar question that @Deltakosh answered like: “It only captures what can be rendered inside a RTT”

Is there another way to render a background with high resolution and get it as a screenshot? I’m not a programmer, so unfortunately I can’t get any further at this point :frowning:

Thanks for help!

Adding @Evgeni_Popov as I think he solved that recently ?

For real? That would be great! I hope you have the solution @Evgeni_Popov :slight_smile:

What we managed to have working lately is rendering the GUI layer in a screenshot (when using render target):

You can use the same technic to make it work for a custom layer:


Should we wrap it in a function @Evgeni_Popov ?

I’m not sure, once we have fixed the problem with camera.outputRenderTarget, we will be able to make screenshots as when calling CreateScreenshotUsingRenderTarget but with all the sub-components being taken into account in the final shot (GUI, layers, …).

1 Like

Perfect lets do that :slight_smile:

1 Like

Ah, ok! Many thanks :slight_smile: But it is not working with v5.0, right?!
Nevertheless, many, many thanks to you two!!

The PG I gave above does work in 5.0.

1 Like