Hello,
I came across a post a while back where Ayman replied mentioning that Meshlab or Paraview could be used to convert .VTK (or .vtp) to .OBJ files for collision detection in opensim. I have downloaded Paraview and am trying to do this now. However, the "save as" function doesn't provide .OBJ format as an option. Is there something I have to do to the data prior to saving it?
Converting .VTP files to .OBJ
- Olesya Klets
- Posts: 1
- Joined: Mon Aug 23, 2010 1:55 am
RE: Converting .VTP files to .OBJ
Hi Luke,
You can do this by writing the code with a simple script:
http://www.vtk.org/doc/nightly/html/cla ... orter.html
Best, Olesya Klets.
You can do this by writing the code with a simple script:
http://www.vtk.org/doc/nightly/html/cla ... orter.html
Best, Olesya Klets.
- Michala Cadova
- Posts: 40
- Joined: Tue Nov 23, 2010 3:45 am
Re: Converting .VTP files to .OBJ
Is there a different way how to convert VTP to OBJ or STL? I am having troubles instaling the paraview ![Sad :(](./images/smilies/icon_e_sad.gif)
Michala
![Sad :(](./images/smilies/icon_e_sad.gif)
Michala
- Greg Hanowski
- Posts: 1
- Joined: Fri Aug 23, 2013 12:09 pm
Re: Converting .VTP files to .OBJ
http://www.vtk.org/doc/nightly/html/cla ... orter.html this link does not provide any examples so it is useless. Anybody find a way to convert .vtp to .obj?
- Ayman Habib
- Posts: 2255
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Converting .VTP files to .OBJ
Hi Greg,
If you prefer not to write code/script to do it then there's a solution using intermediate file format(s) that I just tried (using Paraview 4.0.1 and MeshLab v1.2.1 because I happened to have them on my machine):
1. Load the vtp file into Paraview
2. Export Scene to .x3d file.
3. In MeshLab open .x3d file
4. save into .obj file
There're probably multiple intermediate formats that you can use but this should do the trick for you. If you have .asc file instead of .vtp then you can use MeshLab directly to convert to .obj
Please let us know how it goes.
Best regards,
-Ayman
If you prefer not to write code/script to do it then there's a solution using intermediate file format(s) that I just tried (using Paraview 4.0.1 and MeshLab v1.2.1 because I happened to have them on my machine):
1. Load the vtp file into Paraview
2. Export Scene to .x3d file.
3. In MeshLab open .x3d file
4. save into .obj file
There're probably multiple intermediate formats that you can use but this should do the trick for you. If you have .asc file instead of .vtp then you can use MeshLab directly to convert to .obj
Please let us know how it goes.
Best regards,
-Ayman
Re: Converting .VTP files to .OBJ
Thanks to Aymanh! I solved the obj conversion problem from vtp!!!
- Tanyaporn Pungrasmi
- Posts: 5
- Joined: Thu Nov 26, 2015 5:15 pm
Re: Converting .VTP files to .OBJ
Dear Mr.Aymanh,
I am having trouble with the .obj file on my contact model.
I tried to add .obj file that created as follow as you mentioned.
1. Load the vtp file into Paraview
2. Export Scene to .x3d file.
3. In MeshLab open .x3d file
4. save into .obj file
However, I couldn't open model in Opensim when I added my obj file. This problem is solved when I use the .obj file from opensim example.
So I think it may cause from the method during converting to .obj file.
Note: I am using paraview 4.4.0 32bit and meshlab 1.3.3 32bit
Do you have any other way to solve this problem?
Hope you can help me get through this.
Best regards,
Tanya
I am having trouble with the .obj file on my contact model.
I tried to add .obj file that created as follow as you mentioned.
1. Load the vtp file into Paraview
2. Export Scene to .x3d file.
3. In MeshLab open .x3d file
4. save into .obj file
However, I couldn't open model in Opensim when I added my obj file. This problem is solved when I use the .obj file from opensim example.
So I think it may cause from the method during converting to .obj file.
Note: I am using paraview 4.4.0 32bit and meshlab 1.3.3 32bit
Do you have any other way to solve this problem?
Hope you can help me get through this.
Best regards,
Tanya