it would be *really nice* to be able to render 3D views headlessly (i.e. without opening a web browser)
Currently it's possible to render flatmaps headlessly, but not 3D views. To render a 3D view, a browser window needs to open to create the webgl context. This means it's impossible to render 3D views on headless cluster machines (that don't run X) without opening a browser window on a separate local machine.
We could potentially solve this by using some headless webgl library, such as https://github.com/stackgl/headless-gl
Might be worth looking into how plotly does this for their interactive plotting (w/ jupyter notebooks). To my knowledge they use WebGL and basically create a <div> output where they dump the viz. Check out:
https://github.com/plotly/plotly.py/blob/master/plotly/tools.py#L286
Which has some extra baggage because they're parsing plotly links, but it should have the guts for how the embedded plotting works.
isn't that always in browser though?
yep - they do embedded plotting, but under-the-hood it's just creating a bunch of HTML, then I think they just render it with a final call to IPython.display.HTML, so it could be possible to do the number crunching, and then save that HTML to a JSON file or something. Though I'm not sure as to @alexhuth's usecase here so maybe that wouldn't be useful.