dmurdoch/rgl

Save a mesh without rendering it

stla opened this issue · 5 comments

stla commented

Hello,

In the Python library PyVista, it is possible to save a mesh without rendering it. This gains some time if you want to do an animation with several meshes. I don't know whether this would be possible with rgl, but this would be a nice feature.

  • rgl Version: 1.2.1
  • R Version: 4.3.1
  • Platform: Windows
stla commented

Maybe PyVista (based on VTK) meshes are not objects, I don't know. With rgl I often make a loop to do an animation and I save the mesh as PNG with snapshot3d. In PyVista there is a parameter off_screen which does not plot the mesh when it is set but it is possible to save the mesh as an image. This is faster than rendering the mesh at each iteration.

stla commented

If you want to save a PNG, the mesh has to be rendered.

Does that mean there's another format allowing not to render the mesh? As long as I can mount the pictures to a GIF animation, I don't mind the format if it has good quality.

I stopped to use webshot2, except for very small meshes, cause it can crash the laptop otherwise.