- Home /
offscreen rendering
Is it possible to run Unity in offscreen mode, using a renderer such as osmesa? I would like to run a unity app that outputs frames to a file from a script without having it open any windows.
I don't feel like this is really a complete answer, but you might check into various command-line options, such as "headless" or "batch" mode: http://unity3d.com/support/documentation/$$anonymous$$anual/Command%20Line%20Arguments.html
I doubt that will fix your problem, but it might be a lead you could follow up on.
Answer by jorgenpt · May 31, 2012 at 09:35 PM
You should see the first response to this question about rendering to file, it might be what you're looking for.
Basically it's a combination of using Unity's batch mode - which doesn't render anything, and manually invoking a Camera render operation followed by reading pixels into a Texture2D (that you then can save).
I see, this drawing method Texture2D.ReadPixels() is fully on GPU, right? Its great.