# how to use vtk import obj file which contains multiple objects?

**URL:** https://discourse.vtk.org/t/how-to-use-vtk-import-obj-file-which-contains-multiple-objects/1296
**Category:** Support
**Created:** [July 7, 2019, 3:29am UTC](https://discourse.vtk.org/t/how-to-use-vtk-import-obj-file-which-contains-multiple-objects/1296 "2019-07-07T03:29:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Wenye\_He](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wenye_he/32/418_2.png) [@Wenye\_He](https://discourse.vtk.org/u/Wenye_He)
#### Post date: [July 7, 2019, 3:29am UTC](https://discourse.vtk.org/t/how-to-use-vtk-import-obj-file-which-contains-multiple-objects/1296/1 "2019-07-07T03:29:17Z")

</div>

I am using vtkobjreader to import obj and show them in my viewer.  
One obj file may contain more than one object.  
How to import the obj file and create multiple objects?

---

<div class="post-metadata">

### Author: ![lorensen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lorensen/32/20_2.png) [@lorensen](https://discourse.vtk.org/u/lorensen)
#### Post date: [July 7, 2019, 10:03pm UTC](https://discourse.vtk.org/t/how-to-use-vtk-import-obj-file-which-contains-multiple-objects/1296/2 "2019-07-07T22:03:03Z")

</div>

Use vtkOBJImporter to import multiple objects from a .obj file.

See [this example](https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/). It also shows how to get each object.

There are many examples in the [VTKExamples Project](https://lorensen.github.io/VTKExamples/site/).

Enjoy VTK,

Bill

---

<div class="post-metadata">

### Author: ![Wenye\_He](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wenye_he/32/418_2.png) [@Wenye\_He](https://discourse.vtk.org/u/Wenye_He)
#### Post date: [July 7, 2019, 11:03pm UTC](https://discourse.vtk.org/t/how-to-use-vtk-import-obj-file-which-contains-multiple-objects/1296/3 "2019-07-07T23:03:50Z")

</div>

What about stl or ply? Do they have reader and importer? Importer for a file that contains multiple objects? @lorensen

---

<div class="post-metadata">

### Author: ![lorensen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lorensen/32/20_2.png) [@lorensen](https://discourse.vtk.org/u/lorensen)
#### Post date: [July 8, 2019, 12:42am UTC](https://discourse.vtk.org/t/how-to-use-vtk-import-obj-file-which-contains-multiple-objects/1296/4 "2019-07-08T00:42:27Z")

</div>

They do not have importers.
