Converting .VTP files to .OBJ

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Luke Burley
Posts: 5
Joined: Mon May 09, 2011 2:58 pm

Converting .VTP files to .OBJ

Post by Luke Burley » Sun Jun 19, 2011 11:47 am

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?


User avatar
Olesya Klets
Posts: 1
Joined: Mon Aug 23, 2010 1:55 am

RE: Converting .VTP files to .OBJ

Post by Olesya Klets » Mon Jun 20, 2011 11:30 pm

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.

User avatar
Michala Cadova
Posts: 40
Joined: Tue Nov 23, 2010 3:45 am

Re: Converting .VTP files to .OBJ

Post by Michala Cadova » Thu May 31, 2012 5:34 am

Is there a different way how to convert VTP to OBJ or STL? I am having troubles instaling the paraview :(

Michala

User avatar
Greg Hanowski
Posts: 1
Joined: Fri Aug 23, 2013 12:09 pm

Re: Converting .VTP files to .OBJ

Post by Greg Hanowski » Sat Sep 14, 2013 7:31 pm

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?

User avatar
Ayman Habib
Posts: 2235
Joined: Fri Apr 01, 2005 12:24 pm

Re: Converting .VTP files to .OBJ

Post by Ayman Habib » Mon Sep 16, 2013 1:13 pm

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

User avatar
Jack Zhao
Posts: 94
Joined: Thu Jul 24, 2014 7:15 am

Re: Converting .VTP files to .OBJ

Post by Jack Zhao » Thu Dec 11, 2014 2:28 am

Thanks to Aymanh! I solved the obj conversion problem from vtp!!!

User avatar
Tanyaporn Pungrasmi
Posts: 5
Joined: Thu Nov 26, 2015 5:15 pm

Re: Converting .VTP files to .OBJ

Post by Tanyaporn Pungrasmi » Mon Jan 25, 2016 10:07 pm

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

POST REPLY