Hey there,
It’s Robin from CFD Engine & this week I’m taking a second glance, at ParaView Glance.
I recently shared a few ParaView-related projects that I thought you might like & by far the most popular one was a standalone, in-browser, data-viewer, called ParaView Glance.
I only wrote a paragraph on it last time, so I thought I’d share a bit more on what you can (& can’t) do with it, drop in a couple of hints & show how I’ve been using it.
Glance?
A web app for viewing ParaView data on machines that don’t have ParaView.
There’s nothing to download or install, simply visit the website, drag & drop your data file onto the loader (it doesn’t need to upload it) & inspect the data right there in your browser.
By “inspect” I mean you can spin things around, zoom in & out, turn bits on & off, change variables, colours & colourmaps, plus there’s a really neat screenshot feature.
It’s great for sharing data with clients (or team members) who might not be used to the sources, filters & pipelines in ParaView.
Make a scene
Although Glance can open raw data files (.vtp
, .obj
& .stl
), its much more useful if you do a little prep work in ParaView & create a scene from your data instead.
Read your data into ParaView & use all the usual filters to get things looking good. Feel free to create long pipelines, safe in the knowledge that only those filters that are visible in your scene will be exported.
So, when your data looks nice & it “tells a story” then you can export it by clicking File > Export Scene & selecting the .vtkjs
format.
Hints
Not all of ParaView’s features are supported in .vtkjs
(or Glance), so here are a few hints & tips to save you time, disk space & disappointment:
In addition to your geometry & field data, the following things are also exported in a .vtkjs
scene:
- the view/camera position;
- the names from your ParaView pipeline (change them to something more descriptive than
Extract Surface1
); - the representation of your data (surface, surface with edges, wireframe or points);
- which field you’re currently displaying, including its colourmap & range;
The .vtkjs
files can be quite big – so try to reduce the amount of data you’re exporting (this gives your web browser an easier time too). To help with that, you can:
- Use ParaView’s
Merge Blocks
filter to reduce the number of entities you’re about to export, especially if you’re displaying lots of patches. This makes it much easier to turn bits on & off in Glance too. - Only export the fields you need – if you’re not interested in certain fields, or if you don’t plan to look at cell-based data, then don’t include them in the export. Use the
Pass Arrays
filter in ParaView to turn off the fields you don’t want.
There are quite a few bits that aren’t (currently) supported, but I just want to flag two that impacted me:
- There’s no backface culling in Glance – if you have thin/coincident surfaces (or baffles) on show, then you might want to use
Generate Surface Normals
&Warp
to offset those surfaces before export. - There are no on-screen legends, annotations or colour bars in Glance, so don’t bother finessing them in ParaView (there is a legend in the sidebar, but it’s not editable).
There are other bits like animation & volume rendering that are kinda supported, but I’ll leave you to explore them.
Use cases
From my perspective, Glance is great for putting curated datasets into the hands of people who don’t use ParaView.
You have to be thoughtful about what you want to show to avoid huge files & laggy browsers – but that’s probably no bad thing.
I’ve used it for CAD sign-off – sharing complex assemblies with clients so they can visually check that it’s all present & correct, prior to meshing.
I’ve also used it to let clients explore particular flow features where one or two fixed views in a PDF wouldn’t quite cut it.
My favourite (by far) is using it on my iPad to explore results (shown above). Interacting with a model using a touchscreen is almost as pleasing as when I had a SpaceMouse 🤩 Combine that with being able to scribble on your screenshots with a stylus & you have a really nice environment for generating ideas for your next case.
How about you?
IMHO Glance is a great addition to any CFD toolkit, whether for emergency use when you can’t install ParaView on a client’s machine, or just for browsing data on your tablet.
Here’s a link to the app, a link to the docs & one to their GitHub repo for your reference.
Do you have a use for it? Have you tried it? Was it useful? Drop me a note, I’d be keen to hear your experiences.
Alternatively, is there a different gap in your CFD toolkit that needs filling? Tell me about it, I might know something that could fit the bill, or it could be a good topic for a future email.
Until next week, stay safe,