Page 1 of 1

Converting .VTP files to .OBJ

Posted: Sun Jun 19, 2011 11:47 am
by l6burley1
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?


RE: Converting .VTP files to .OBJ

Posted: Mon Jun 20, 2011 11:30 pm
by olesyaklets
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.

Re: Converting .VTP files to .OBJ

Posted: Thu May 31, 2012 5:34 am
by michalacadova
Is there a different way how to convert VTP to OBJ or STL? I am having troubles instaling the paraview :(

Michala

Re: Converting .VTP files to .OBJ

Posted: Sat Sep 14, 2013 7:31 pm
by blunderme
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?

Re: Converting .VTP files to .OBJ

Posted: Mon Sep 16, 2013 1:13 pm
by aymanh
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

Re: Converting .VTP files to .OBJ

Posted: Thu Dec 11, 2014 2:28 am
by jackzhao123
Thanks to Aymanh! I solved the obj conversion problem from vtp!!!

Re: Converting .VTP files to .OBJ

Posted: Mon Jan 25, 2016 10:07 pm
by ppungras
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