# Visualizing paraview results on a Web

**URL:** https://discourse.paraview.org/t/visualizing-paraview-results-on-a-web/7410
**Category:** Web Support
**Created:** [June 14, 2021, 9:22pm UTC](https://discourse.paraview.org/t/visualizing-paraview-results-on-a-web/7410 "2021-06-14T21:22:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Miguel\_Angel\_Salazar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/miguel_angel_salazar/32/2319_2.png) [@Miguel\_Angel\_Salazar](https://discourse.paraview.org/u/Miguel_Angel_Salazar)
#### Post date: [June 14, 2021, 9:22pm UTC](https://discourse.paraview.org/t/visualizing-paraview-results-on-a-web/7410/1 "2021-06-14T21:22:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [June 15, 2021, 4:54pm UTC](https://discourse.paraview.org/t/visualizing-paraview-results-on-a-web/7410/2 "2021-06-15T16:54:40Z")

</div>

I will go with the vtkjs export which allow you to either generate data that can be read using [ParaView Glance](https://kitware.github.io/paraview-glance/index.html) or bundle the viewer with your data so everything is inside a single HTML file.

You can look at that [blog](https://blog.kitware.com/exporting-paraview-scenes-to-paraview-glance/) for more information.

---

<div class="post-metadata">

### Author: ![Miguel\_Angel\_Salazar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/miguel_angel_salazar/32/2319_2.png) [@Miguel\_Angel\_Salazar](https://discourse.paraview.org/u/Miguel_Angel_Salazar)
#### Post date: [June 15, 2021, 5:13pm UTC](https://discourse.paraview.org/t/visualizing-paraview-results-on-a-web/7410/3 "2021-06-15T17:13:58Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [June 15, 2021, 6:11pm UTC](https://discourse.paraview.org/t/visualizing-paraview-results-on-a-web/7410/4 "2021-06-15T18:11:37Z")

</div>

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:

- [Add on script tag with data](https://github.com/Kitware/VTK/blob/master/Web/Python/vtkmodules/web/vtkjs_helper.py#L58-L65)
- [Import base64 code](https://github.com/Kitware/paraview-glance/blob/master/src/io/ReaderFactory.js#L273-L300)
- [Actual reader](https://github.com/Kitware/paraview-glance/blob/master/src/io/GlanceVtkJsReader.js#L21)

And a [simple viewer](https://kitware.github.io/vtk-js/examples/SceneExplorer.html) using the same format outside of proxy / glance complexity.
