-
Notifications
You must be signed in to change notification settings - Fork 2
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
shuttle example - export rendering as glb not working as expected #492
Comments
Hi @amscosta, You can do it with the following commands: avz = session.show("webgl") The first command will create for you a Renderable object, that JupyterNotebook will display for you automatically; otherwise, you can access avz.url to get a URL that you can browse to visualize the AVZ model The second command, available as a method for the Renderable, allows you to download the file into the input folder. It returns the list of file names downloaded As concerning the glb export, I believe the legend and the renderable missing (I assume you are talking about the streamlines, being the shuttle example) are not supported |
Hi Mario,
Thanks for the output.
The .glb format I intend is for VR headset viewing. Sharing some
impressions :
The legend not being show in the glb is an issue (workarounds?)
Html5 exports includes the legend.
AVZ format also.
Em sex., 6 de dez. de 2024 às 11:22, Mario Ostieri ***@***.***>
escreveu:
… Hi @amscosta <https://github.com/amscosta>,
you can export an AVZ file directly from PyEnSight, without the EnSight
GUI.
You can do it with the following commands:
avz = session.show("webgl")
downloaded = avz.download("test_folder")
The first command will create for you a Renderable object, that
JupyterNotebook will display for you automatically; otherwise, you can
access avz.url to get a URL that you can browse to visualize the AVZ model
The second command, available as a method for the Renderable, allows you
to download the file into the input folder. It returns the list of file
names downloaded
As concerning the glb export, I believe the legend and the renderable
missing (I assume you are talking about the streamlines, being the shuttle
example) are not supported
—
Reply to this email directly, view it on GitHub
<#492 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHTU55C7NO3EFS4XXVNEFKD2EGXK5AVCNFSM6AAAAABTEX2WSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRTGM2TOOBWGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Standard glb file have no notion of a 2D rendering plane, so we cannot physically put stuff like legends, annotations, or any kind of overlay, differently from AVZ. However, we are working on GLB extensions that will allow us to add these exports. There will be though the need of a renderer that can handle it. Potentially in the future we might have a viewer that can handle these extensions. |
If the VR headset is running on the same machine as PyEnSight, PyEnSight can drive a headset directly. Set the environment variable CEI_INPUT=openvr in the shell before starting PyEnSight. If SteamVR is up and running, EnSight will display its scene on the headset. EnSight will draw annotations like the legend on a big rectangle floating in space, in the VR environment. There are some scene centering and scaling preferences you might have to set interactively (and save) from EnSight to make it look nice. Alternatively, EnSight can export Jt scenes, and the Jt file contains a legend. If your VR viewer reads Jt, and displays legends from Jt files, that might be an option. |
@amscosta Just in case there was another aspect of this export we might have missed is that you may have originally been commenting about missing geometry? When exporting geometry from EnSight, it only exports the selected parts, so you may have to select all the parts before calling show. I did a: session.ensight.part.select_all() and generated the attached GLB file. rjf2.zip If the original question revolved around not seeing all the objects you expected, try selecting all the parts before exporting the GLB file. |
@amscosta Yes, saving the annotations as an image could work, if you're building something custom. You should be able to hide the triad and all parts, and save an image. With the png format, there is an option to save an image with a transparent background. |
Thanks Frank.
One or several parts + "part" corresponding to legend. I know legend is not
a part. I am just trying ways to do the trick.
Em sex., 6 de dez. de 2024, 16:03, Randy Frank ***@***.***>
escreveu:
… @amscosta <https://github.com/amscosta> Just in case there was another
aspect of this export we might have missed is that you may have originally
been commenting about missing geometry? When exporting geometry from
EnSight, it only exports the selected parts, so you may have to select all
the parts before calling show. I did a: session.ensight.part.select_all()
and generated the attached GLB file. rjf2.zip
<https://github.com/user-attachments/files/18042458/rjf2.zip>
If the original question revolved around not seeing all the objects you
expected, try selecting all the parts before exporting the GLB file.
—
Reply to this email directly, view it on GitHub
<#492 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHTU55EMCVQQEB5SHVPKEDT2EHYJFAVCNFSM6AAAAABTEX2WSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRTHE3TAMRZGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sharing some glbs (brake - from pyfluentvisualisation) and double (from pyensight).samples.zip.zip |
Hi,
Just adding the following piece of script at the end of the shuttle example:
glbdata = session.geometry()
with open("simple_example.glb", "wb") as fp:
fp.write(glbdata)
Results in .glb file like this:
Wondering if somebody know how to make the glb including all the expected renderables from the shuttle example?
Best,
P.S. Actually, the legend is also not visible in the glb (only using the GUI and exporting as .AVZ)
The text was updated successfully, but these errors were encountered: