@sebavan oh that’s quite the bummer…
May I ask you if you would know of any approach to render images with text of top of them?
Previously I was using AdvancedDynamicTexture.CreateForMesh which does work with RenderTarget, but I found that it crashes on mobile when number of images grows.
hey @Evgeni_Popov
I need to get images with resolutions different than canvas.
like 3000x3000 and 1920x500 CreateScreenshot doesn’t seem to handle that
We have a PR that is pending (waiting for @RaananW return in 8 days) which will allows you to set a render target to camera.outputRenderTarget, which will generates the whole scene as seen from this camera into the render target (note that you can already use this outputRenderTarget property but it is currently bugged).
It’s a lot like CreateScreenshotUsingRenderTarget except all features of Babylon are supported (post processes, GUI, …) as it is the final output that is simply generated in a specific render target texture.
thank you @Evgeni_Popov
Problem is that we are going to prod next week
Right now I am looking if there is anything I can optimize with CreateForMesh
For other controls I am using instances and repeat then tens of time, and that is fine, but for these I can’t because having numbers they are all different.
I have overriden the CreateScreenshotUsingRenderTarget function and you can pass as the 1st parameter the advanced texture that should be rendered as part of the screenshot rendering.
@Evgeni_Popov
Sorry…
I realised the button, although properly sized now, it doesn’t seem to position properly.
I have linked it with the sphere, and just moved the sphere a bit left to make it more evident.
You’ll see the button in screenshot positions a bit off https://playground.babylonjs.com/#PE7MU2#8
Very sorry to bother you again
v5 might actually be correct, given the screenshot camera is positioned on the top left.
v4 is well off. Most likely something I did wrong trying to get it to work.
Do you happen to spot something that might justify such difference?
Regarding 4.2 I don’t know, the code of CreateScreenshotUsingRenderTarget I have extracted is from 5.0 and there may be some other changes in the lib that makes it fail (using linkWithMesh fails in 4.2). That will be near impossible to know what, though…