# How to render measurement results (SVGText) using WebGL to maintain consistency during scene transformations?

**URL:** https://discourse.vtk.org/t/how-to-render-measurement-results-svgtext-using-webgl-to-maintain-consistency-during-scene-transformations/15741
**Category:** Web
**Created:** [June 18, 2025, 6:58am UTC](https://discourse.vtk.org/t/how-to-render-measurement-results-svgtext-using-webgl-to-maintain-consistency-during-scene-transformations/15741 "2025-06-18T06:58:28Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lanranlaura](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lanranlaura/32/3748_2.png) [@lanranlaura](https://discourse.vtk.org/u/lanranlaura)
#### Post date: [June 18, 2025, 6:58am UTC](https://discourse.vtk.org/t/how-to-render-measurement-results-svgtext-using-webgl-to-maintain-consistency-during-scene-transformations/15741/1 "2025-06-18T06:58:28Z")

</div>

Hi,

When using measurement tools (e.g., `vtkLineWidget`), the SVG-based text labels don’t rotate/zoom with the 3D scene, causing visual inconsistency.

**Questions** :

1. Is there a recommended approach to render these labels using WebGL instead of SVG?
2. Are there plans to support 3D-transformable text annotations?

I’d like to make measurement results behave like 3D objects (perspective-aware, camera-facing). Any guidance would be appreciated!

Thanks!

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [June 20, 2025, 8:20am UTC](https://discourse.vtk.org/t/how-to-render-measurement-results-svgtext-using-webgl-to-maintain-consistency-during-scene-transformations/15741/2 "2025-06-20T08:20:48Z")

</div>

You must not use SVG based text if you want your text in the 3D world. You might want to look at [vtkCubeAxesActor](https://kitware.github.io/vtk-js/examples/CubeAxes.html) instead. There is also work in progress with [vtkTextActor](https://github.com/Kitware/vtk-js/pull/3252).

---

<div class="post-metadata">

### Author: ![daker](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@daker](https://discourse.vtk.org/u/daker)
#### Post date: [July 1, 2025, 1:21pm UTC](https://discourse.vtk.org/t/how-to-render-measurement-results-svgtext-using-webgl-to-maintain-consistency-during-scene-transformations/15741/3 "2025-07-01T13:21:30Z")

</div>

[vtkTextActor](https://kitware.github.io/vtk-js/examples/TextActor.html) & [vtkVectorText](https://kitware.github.io/vtk-js/examples/VectorText.html) are available now in vtk.js.

---

<div class="post-metadata">

### Author: ![lanranlaura](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lanranlaura/32/3748_2.png) [@lanranlaura](https://discourse.vtk.org/u/lanranlaura)
#### Post date: [July 2, 2025, 1:03am UTC](https://discourse.vtk.org/t/how-to-render-measurement-results-svgtext-using-webgl-to-maintain-consistency-during-scene-transformations/15741/4 "2025-07-02T01:03:38Z")

</div>

Thanks for the suggestion!

---

<div class="post-metadata">

### Author: ![lanranlaura](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lanranlaura/32/3748_2.png) [@lanranlaura](https://discourse.vtk.org/u/lanranlaura)
#### Post date: [July 2, 2025, 1:05am UTC](https://discourse.vtk.org/t/how-to-render-measurement-results-svgtext-using-webgl-to-maintain-consistency-during-scene-transformations/15741/6 "2025-07-02T01:05:29Z")

</div>

Thanks for implementing it！I will try.
