<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Sebastien,<div class=""><br class=""></div><div class="">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; orphans: 2; widows: 2;" class="">objReader.getNumberOfOutputPorts() returns 1.</span></div><div class=""><span style="font-family: inherit; font-style: inherit; orphans: 2; widows: 2;" class=""><br class=""></span></div><div class=""><span style="font-family: inherit; font-style: inherit; orphans: 2; widows: 2;" class="">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 class=""><div style="orphans: 2; widows: 2;" class=""><br class=""></div><div style="orphans: 2; widows: 2;" class="">Tony</div><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 13, 2017, at 12:25 PM, Sebastien Jourdain <<a href="mailto:sebastien.jourdain@kitware.com" class="">sebastien.jourdain@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">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 class=""><br class=""></div><div class="">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" class="">https://kitware.github.io/vtk-js/examples/OBJViewer.html</a></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Seb</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Dec 13, 2017 at 9:40 AM, Tony Yuan <span dir="ltr" class=""><<a href="mailto:tonyuanac@gmail.com" target="_blank" class="">tonyuanac@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br class="">
<br class="">
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 class="">
<br class=""><br class="">
<br class="">
However, when I import the OBJ file in Meshlab it looks fine. Mac’s Preview is also able to open the complete mesh.<br class="">
<br class=""><br class="">
<br class="">
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 class="">
<br class=""><br class="">
<br class="">
Thanks,<br class="">
Tony<br class="">
<br class="">
<br class="">______________________________<wbr class="">_________________<br class="">
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank" class="">www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank" class="">http://www.kitware.com/<wbr class="">opensource/opensource.html</a><br class="">
<br class="">
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank" class="">http://www.vtk.org/Wiki/VTK_<wbr class="">FAQ</a><br class="">
<br class="">
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank" class="">http://markmail.org/search/?q=<wbr class="">vtkusers</a><br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank" class="">http://public.kitware.com/<wbr class="">mailman/listinfo/vtkusers</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>