Vedo: How to save screenshot without show()?

Created on 2 Oct 2019  路  1Comment  路  Source: marcomusy/vedo

  1. load the mesh file
  2. color each face
  3. save the rendered image(there's no need to show)

I don't know how to implement the above without show(), thanks~

Ref: here,

help wanted testing-phase

Most helpful comment

You cannot save a screenshot without rendering the scene with show(), but you can avoiding visualizing the rendering window using keyword offscreen: e.g.

from vtkplotter import *

vp = Plotter(axes=0, offscreen=True)

for i in [1,2,3]:
    text = Text('%03d' %i, c='white')
    vp += Sphere(c=i).x(i)
    vp += text
    vp.show()
    screenshot('test_%03d.png' %i)
    vp -= text

>All comments

You cannot save a screenshot without rendering the scene with show(), but you can avoiding visualizing the rendering window using keyword offscreen: e.g.

from vtkplotter import *

vp = Plotter(axes=0, offscreen=True)

for i in [1,2,3]:
    text = Text('%03d' %i, c='white')
    vp += Sphere(c=i).x(i)
    vp += text
    vp.show()
    screenshot('test_%03d.png' %i)
    vp -= text
Was this page helpful?
0 / 5 - 0 ratings

Related issues

CMengich picture CMengich  路  5Comments

hmralavi picture hmralavi  路  7Comments

MarkusRosen picture MarkusRosen  路  5Comments

RubendeBruin picture RubendeBruin  路  3Comments

jby1993 picture jby1993  路  6Comments