jeffrey.aydelotte Posted January 26, 2016 Posted January 26, 2016 I am running into an issue where I want to be able to render out an image while in headless mode. I start the headless instance with "-video_app null", and when I call Unigine::Image::getPixels() I get the output "Image::flipY(): image is not loaded". When I query the image it says that it is loaded, and I'm suspecting that this is likely because the renderer is not initialized because of my command line flag. Is there a way for me to render an image in a headless version of Unigine? As a temporary work around if that is not possible, is there a way for me to have a windowed instance of Unigine run when its windows is not active in Windows?
silent Posted January 27, 2016 Posted January 27, 2016 Hi Jeffrey, Currently, there is no graphics context created in -video_app null - that's why you can't use all the graphics-related methods. We can implement such mode, but we need to gather more information about what exactly required from the engine. Could you please specify some basic requirements for off-screen rendering? How do you plan to handle controls? As a temporary work around if that is not possible, is there a way for me to have a windowed instance of Unigine run when its windows is not active in Windows? If I understand you correctly, you can force update engine rendering in background via engine.app.setUpdate(1) in world or system script. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
jeffrey.aydelotte Posted January 27, 2016 Author Posted January 27, 2016 Thanks, engine.app.setUpdate(1) was exactly what I wanted for keeping my update loop running. We are using Unigine as a dynamic renderer which is communicating with another program. Right now our Unigine app is taking in json from http requests, and then rendering out images based on that input and sending those frames over a TCP socket to a different program. As this is running on a server and we'd like to maximize the number of instances that we can have running (and not have a ton of Unigine windows open when we remote into the server) we'd ideally be able to render to a buffer in headless mode.
silent Posted January 28, 2016 Posted January 28, 2016 Hi Jeffrey, Thank you for the information. I've added task to internal TODO list about the -video_app null rendering improvements. Can't give you any ETA at this moment, sorry. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Prieto.Jose Posted September 4, 2017 Posted September 4, 2017 (edited) I have the same problem. Has the solution been implemented? Edited September 4, 2017 by Prieto.Jose
silent Posted September 4, 2017 Posted September 4, 2017 Hi Prieto, If you are talking about ability to render in headless mode (with -video_app null) - it's not implemented yet. You can keep all the windows in background and continue to render with App::setUpdate(1). Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
luuk.van-dijk Posted July 10, 2019 Posted July 10, 2019 +1 for render in headless mode ( -video_app null)
Recommended Posts