Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save a mesh without rendering it #387

Open
stla opened this issue Sep 11, 2023 · 5 comments
Open

Save a mesh without rendering it #387

stla opened this issue Sep 11, 2023 · 5 comments

Comments

@stla
Copy link

stla commented Sep 11, 2023

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
@dmurdoch
Copy link
Owner

dmurdoch commented Sep 11, 2023 via email

@stla
Copy link
Author

stla commented Sep 11, 2023

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.

@dmurdoch
Copy link
Owner

dmurdoch commented Sep 12, 2023 via email

@stla
Copy link
Author

stla commented Sep 12, 2023

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.

@dmurdoch
Copy link
Owner

dmurdoch commented Sep 12, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants