roman_44 Posted January 12, 2016 Share Posted January 12, 2016 Hi everybody! I need to convert Babylon.JS animation to video file with at least FullHD resolution and .... !!!on server side!!! I wrote code which already works locally on my mac, but now I need to deploy this rendering stuff. My flow is this: I have NodeJS server. When the server gets appropriate request, it starts real browser window on my mac, load scene, start animation with speed of 1 frame per second and every second I run screenshot function from babylon tools which finally give me canvas element with picture and I run this: var dataToSend = screenshotCanvas.toDataURL('image/png'); then I send dataToSend back to node and store it somewhere in filesystem. After all animation finishes server takes sequence of files and make video file with some node libraries. At this point I have my video file with big resolution. But now I need to deploy this kinda rendering engine somewhere and problem is that I need to run real browser window in order to get pictures from babylon.js animation. So I cannot use headless browser because they all are not supporting webGL. I have to run real browser window. And I think this is also doable. My question is this: is it possible to get what I need any other way? Maybe you have some hints for me, or already done same tasks. Thank you! Will appreciate any advice!!! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 12, 2016 Share Posted January 12, 2016 hello the main caveat I can foresee is that server side you will not be able to have a webgl context Quote Link to comment Share on other sites More sharing options...
roman_44 Posted January 12, 2016 Author Share Posted January 12, 2016 5 minutes ago, Deltakosh said: hello the main caveat I can foresee is that server side you will not be able to have a webgl context Yes, you right, unless I will not fire real browser window, which should be able to do in Windows Server VM with GPU somewhere on Azure... https://azure.microsoft.com/en-us/documentation/videos/azurecon-2015-applications-that-scale-using-gpu-compute/ Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 12, 2016 Share Posted January 12, 2016 This is correct! Quote Link to comment Share on other sites More sharing options...
roman_44 Posted January 13, 2016 Author Share Posted January 13, 2016 2 hours ago, Deltakosh said: This is correct! What do you think will I be able to run real browser with Babylon on VM with ubuntu on Azure? Or Windows Server 2012 only one way to do that? Quote Link to comment Share on other sites More sharing options...
roman_44 Posted January 13, 2016 Author Share Posted January 13, 2016 I'm just trying to find the way to run Babylon(webGL) on Linux on server side. If someone have any useful info about that, lat me know. For right now, most famous headless browsers does not support WebGL. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 13, 2016 Share Posted January 13, 2016 You may need a GPU on server side (like the azure or amazon ones) and see if this allows you to have a webgl context Quote Link to comment Share on other sites More sharing options...
roman_44 Posted January 13, 2016 Author Share Posted January 13, 2016 Ok, not big deal to run VM with GPU on Azure, or AWS, but how I can run WebGL and Babylon on Linux machine? If Headless browsers are explicitly does not support WebGL. And we don't have real browser on linux server. The only thing that I found is ThreeJs has some kind of library for NodeJS to get WebGL on server side: http://ox86.tumblr.com/post/129341221225/look-ma-no-canvas-server-side-3d-rendering-with Continue to search... Quote Link to comment Share on other sites More sharing options...
prvi_treti Posted January 13, 2016 Share Posted January 13, 2016 Did you check headless-gl? ( https://github.com/stackgl/headless-gl ) Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 13, 2016 Share Posted January 13, 2016 I have good experience with webgl rendering using remote selenium test servers. Both browserstack and sauce labs offer such servers, but they are more testing-oriented. You might be more successful with hosting your own selenium-enabled environment on the cloud (on a GPU instance) and connecting to selenium using node.js's selenium drivers. I am not sure about performance thou! Just a suggestion for a general direction you might be able to check. Quote Link to comment Share on other sites More sharing options...
roman_44 Posted January 13, 2016 Author Share Posted January 13, 2016 9 hours ago, mUnduli said: Did you check headless-gl? ( https://github.com/stackgl/headless-gl ) Yes, I was trying to get some results with headless-gl, but looks like it is working also on desktop. No luck on server. This is only guys who trying to do that on server with big big pain https://github.com/mrdoob/three.js/issues/7085 Quote Link to comment Share on other sites More sharing options...
roman_44 Posted January 13, 2016 Author Share Posted January 13, 2016 1 hour ago, RaananW said: I have good experience with webgl rendering using remote selenium test servers. Both browserstack and sauce labs offer such servers, but they are more testing-oriented. You might be more successful with hosting your own selenium-enabled environment on the cloud (on a GPU instance) and connecting to selenium using node.js's selenium drivers. I am not sure about performance thou! Just a suggestion for a general direction you might be able to check. Thank you so much for the advice. Definitely will read more about it and will give it a try. 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.