dhiru Posted July 14, 2017 Share Posted July 14, 2017 Hi, I have been trying to draw images (plus importing assets from my blender software) but what I want to do is create a "static" image of my scene to show on the browser so that it can run on more dumb terminals without requiring a lot of GPU power. I don't know if I am posing the question right but could you give me some pointers to how this can be done. Thanks, dhiru Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 14, 2017 Share Posted July 14, 2017 Hello, you can either render your scene just once with scene.render() (And thus do not call engine.runRenderLoop). If you want a screenshot of a scene to save it for later, we have BABYLON.Tools.CreateScreenShot: https://www.babylonjs-playground.com/#1DWSMW#4 Quote Link to comment Share on other sites More sharing options...
dhiru Posted July 19, 2017 Author Share Posted July 19, 2017 Many thanks for this! -- just a quick stupid question; when I do not use the renderloop() is that in anyway "not" so stressful on the GPU; even though my scene is very complex (I guess it should right? or does the frames per second still work its way on the variables between the CPU and the GPU). I realize my question might not be very intelligent nevertheless doesn't hurt to ask Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 19, 2017 Share Posted July 19, 2017 Not calling the renderloop or just scene.render() will leave your GPU untouched (If I've got your question correctly) Quote Link to comment Share on other sites More sharing options...
dhiru Posted July 22, 2017 Author Share Posted July 22, 2017 Actually the reason I am getting freaked out about the GPU is because I am planning to make a product that has 3 independent canvas's/engines, showing three different angles of a Car. For the center one I plan to allow scene.render() only when the user is on a desktop. For low end devices, I would actually prefer to show a screen print (as light as an png/bmp); that way I eat up less battery and processing. I am not sure if I am over thinking all of this but I am not sure how I can generate an image from my Babylon.js page (or windows universal app) for low end devices. All that said, I want to thank you/Babylon.js for even giving me any hope of doing any of this -- I think it is one of the best frameworks I have come across; many thanks for your support. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 24, 2017 Share Posted July 24, 2017 No worry, your concern is real But to be fair, if you call scene.render only once you don't even need to provide a screenshot. The scene.render() will run just once 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.