# Export from VTK to LumionRT - with colors

**URL:** https://discourse.vtk.org/t/export-from-vtk-to-lumionrt-with-colors/1895
**Category:** Support
**Created:** [October 9, 2019, 12:34pm UTC](https://discourse.vtk.org/t/export-from-vtk-to-lumionrt-with-colors/1895 "2019-10-09T12:34:18Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Mskovmand](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@Mskovmand](https://discourse.vtk.org/u/Mskovmand)
#### Post date: [October 9, 2019, 12:34pm UTC](https://discourse.vtk.org/t/export-from-vtk-to-lumionrt-with-colors/1895/1 "2019-10-09T12:34:18Z")

</div>

I’m trying to assist a colleague in creating some “interface” between VTK generated models and LumionRT, where we seek to extract a colored poly data mesh to Lumion, so far without success.

I can easily extract this data as a .PLY file or a simple .vtk file and view it in Paraview. However, finding some format in which Lumion can actually read this proves troublesome.

I tried creating .OBJ and .MTL files, but I can’t get Lumion to get any information from the .MTL file (I also tried with Blender, again without success).

Lastly, I tried exporting a .VRML file, but in this case the only coloring I got was 1 color per actor, not useful.

Does anyone here have any experience with this? Any help would be highly appreciated.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [October 9, 2019, 5:24pm UTC](https://discourse.vtk.org/t/export-from-vtk-to-lumionrt-with-colors/1895/2 "2019-10-09T17:24:11Z")

</div>

Have you tried [vtkOBJExporter](https://vtk.org/doc/nightly/html/classvtkOBJExporter.html)? It exports the renderer content as an obj+mtl file that Blender shows with correct colors.

---

<div class="post-metadata">

### Author: ![Mskovmand](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@Mskovmand](https://discourse.vtk.org/u/Mskovmand)
#### Post date: [October 9, 2019, 5:37pm UTC](https://discourse.vtk.org/t/export-from-vtk-to-lumionrt-with-colors/1895/3 "2019-10-09T17:37:20Z")

</div>

Thank you for your answer.

I did use the obj exporter. At first I could not this working with Blender, but I got it working eventually.

I’m visiting my colleague soon, so I can try hands on to assist in Lumion.

But I do believe that OBJ is the way to go right now.

---

<div class="post-metadata">

### Author: ![Mskovmand](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@Mskovmand](https://discourse.vtk.org/u/Mskovmand)
#### Post date: [October 10, 2019, 5:58am UTC](https://discourse.vtk.org/t/export-from-vtk-to-lumionrt-with-colors/1895/4 "2019-10-10T05:58:04Z")

</div>

I will try to explain the issue better, sadly didn’t have the time to do this thoroughly yesterday.

Even though I think the OBJ exporter works as intended, it appears to only provide me with the solid color set to the actor. In this case I have multiple actors colored this way, and one Glyph actor showing roughly 1000 Glyph spheres, all colored by point data using an `UnsignedCharArray` with RGB values. All these spheres are showing up white, as I’m not assigning the actor a color.

Is there a way to get these RGB values to the .mtl file?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [October 10, 2019, 9:40pm UTC](https://discourse.vtk.org/t/export-from-vtk-to-lumionrt-with-colors/1895/5 "2019-10-10T21:40:12Z")

</div>

Tube current OBJ exporter only considers actor color. For more sophisticated coloring you may need to create a texture image and map colors from the surface to this image.

---

<div class="post-metadata">

### Author: ![Mskovmand](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@Mskovmand](https://discourse.vtk.org/u/Mskovmand)
#### Post date: [October 11, 2019, 5:15am UTC](https://discourse.vtk.org/t/export-from-vtk-to-lumionrt-with-colors/1895/6 "2019-10-11T05:15:27Z")

</div>

Alright, thanks for your time!

I will get on to create a texture image.
