Visualizing paraview results on a Web

I have a little web app that allows me to visualize my results in two dimensions in paraview. Before launching the web app, I post process my results using a python script calling the paraview library. At the end of that script, I simply save a screenshot of the result as a PNG that I can use as static data in my html.

For three dimensions, I hoped that I could do the same by simply exporting the scene to x3d file. This works for simple geometries, although it messes up the colors. Furthermore, scenes with Glyphs are not exported at all to x3d files.

Which alternatives do I have? I’ve seen ParaviewWeb, but I am not interested in doing any postprocessing on the web server (I can do it before launching it), just visualization. Thanks.

I will go with the vtkjs export which allow you to either generate data that can be read using ParaView Glance or bundle the viewer with your data so everything is inside a single HTML file.

You can look at that blog for more information.

1 Like

Thanks. This is pretty helpful and neat. In my webapp, I have my own HTML because I have a little menu to be able to go through different simulation results. I think I could dig through the HTML generated to extract just what I need (Just the scene, no menus or options). Are there HTML examples that just show the scene?

You can use the loader/reader in vtk.js to do that directly in your web page. Basically it is just base64 encoded of the *.vtkjs files and a piece just extracting it and filling up the scene.

The relevant part is done below:

And a simple viewer using the same format outside of proxy / glance complexity.