-
Notifications
You must be signed in to change notification settings - Fork 21
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
Comments
I don't understand. In rgl meshes are R objects, so they can be saved just
like any r object. Do you mean saving them directly to some external
format? Which format would you prefer?
…On Mon, Sep 11, 2023, 05:04 stla ***@***.***> wrote:
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
—
Reply to this email directly, view it on GitHub
<#387>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOYSQFX45EKJ3FLHIAQINLXZ346HANCNFSM6AAAAAA4TGZXJM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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 |
If you want to save a PNG, the mesh has to be rendered.
Currently there are two ways to save the PNG. The faster one renders to
the screen and then copies the screen to a file. The slower (but better
quality) method uses webshot2 to render to a virtual browser and saves from
there. It can be *much* slower, and I don't think there's anything I can do
to speed it up.
A third way would be to render to a memory buffer and save from there.
That might be possible in the future after I update to a newer version of
opengl, but that work is unlikely to be done for quite a while.
…On Mon, Sep 11, 2023, 07:17 stla ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#387 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOYSQFFMOQB2B762O6ZLRDXZ4MQNANCNFSM6AAAAAA4TGZXJM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
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. |
PNG is the only graphics format that other software would recognize. For
some very special cases, you could write HTML that would handle the
animation in JavaScript - but that means modifying each frame to produce
the next one. That's usually hard to do in JavaScript.
…On Tue, Sep 12, 2023, 10:09 stla ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#387 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOYSQDE7PNW7DR5NQ256TLX2CJNXANCNFSM6AAAAAA4TGZXJM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
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.
The text was updated successfully, but these errors were encountered: