<div dir="ltr">That script [1] should work with ParaView to generate the various datasets.<div>Once they are converted, you can load them in your VTK application. Also, if you need you can merge the various polydata into a single file using ParaView.<br></div><div><br></div><div>[1] <a href="https://github.com/Kitware/vtk-js/blob/master/Utilities/ParaView/obj-mtl-importer.py">https://github.com/Kitware/vtk-js/blob/master/Utilities/ParaView/obj-mtl-importer.py</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 13, 2017 at 12:07 PM, Tony Yuan <span dir="ltr"><<a href="mailto:tonyuanac@gmail.com" target="_blank">tonyuanac@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi Sebastien,<div><br></div><div>The js loader works fine, but I couldn’t get the same behavior in C++. I tried to see if the reader has multiple outputs, but <span style="font-family:inherit;font-style:inherit">objReader.<wbr>getNumberOfOutputPorts() returns 1.</span></div><div><span style="font-family:inherit;font-style:inherit"><br></span></div><div><span style="font-family:inherit;font-style:inherit">I am interested in getting the mesh as a vtkPolyData, is there a way I can do that with OBJImporter? There seems to be no GetOutput function like OBJReader.</span></div><div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Tony</div></font></span><div><div class="h5"><div><br><blockquote type="cite"><div>On Dec 13, 2017, at 12:25 PM, Sebastien Jourdain <<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.<wbr>com</a>> wrote:</div><br class="m_-756236527013523913Apple-interchange-newline"><div><div dir="ltr">The file you sent have several materials and I think that the vtkOBJReader just read the first one as it is focusing on the mesh only.<div><br></div><div>Your file is correct and I've tried it with vtk.js with success here: <a href="https://kitware.github.io/vtk-js/examples/OBJViewer.html" target="_blank">https://kitware.github.<wbr>io/vtk-js/examples/OBJViewer.<wbr>html</a></div><div><br></div><div>But you may have more luck with the importer which could also process the mtl file that should come along. That way all the pieces that compose that object will be loaded.</div><div><br></div><div>Seb</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 13, 2017 at 9:40 AM, Tony Yuan <span dir="ltr"><<a href="mailto:tonyuanac@gmail.com" target="_blank">tonyuanac@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have a problem reading Blender OBJ files using VTK. The vtkOBJReader seems to only read part of the mesh. When I render the data being read it looks like this:<br>
<br><br>
<br>
However, when I import the OBJ file in Meshlab it looks fine. Mac’s Preview is also able to open the complete mesh.<br>
<br><br>
<br>
I attached the OBJ file and my code below. I am not very familiar with the OBJ format and how vtkOBJReader is implemented. If someone could point me to the problem and possible fixes, that would be great.<br>
<br><br>
<br>
Thanks,<br>
Tony<br>
<br>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>