IIerpos Posted August 16, 2017 Share Posted August 16, 2017 I build a scene and run the following: BABYLON.Tools.CreateScreenshot(engine, scene.activeCamera, 400); The resulting, beautiful 400x400 png is entirely transparent. What could cause this? Quote Link to comment Share on other sites More sharing options...
Jaskar Posted August 16, 2017 Share Posted August 16, 2017 Hello. Which version of Babylon do you use ? Can you explain your scene a little please ? It works on the playground at the moment Quote Link to comment Share on other sites More sharing options...
IIerpos Posted August 16, 2017 Author Share Posted August 16, 2017 I'm using 3.0 custom assembled with no additional options selected. Here is a very short and simple file for you to peruse that demonstrates the issue. Thank you in advance! babylonIssue.zip Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 17, 2017 Share Posted August 17, 2017 did you try BABYLON.Tools.CreateScreenshotUsingRenderTarget(engine, camera, {width: canvas.width, height: canvas.height}); Jaskar 1 Quote Link to comment Share on other sites More sharing options...
IIerpos Posted August 17, 2017 Author Share Posted August 17, 2017 OK. That works! I suppose that gives us a clue why the other doesn't? What is the difference between the two? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 17, 2017 Share Posted August 17, 2017 The first one you used is based on canvas rendering but it should work as well. Can you repro in the PG? Quote Link to comment Share on other sites More sharing options...
focomoso Posted October 20, 2017 Share Posted October 20, 2017 I just want to chime in here and point out that I'm seeing the same issue. For some reason canvas.toDataURL() is returning a blank png image. @IIerpos Can you think of anything that may be causing this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.