<div dir="ltr"><div>Your example should have an OBJ with multiple textures if there is no more than one texture per material.</div><div><br></div><div>If the issue is that you have an OBJ file where one piece (material?), uses multiple textures and has multiple sets of texture coordinates per vertex, that is not fully supported.  I believe currently the multiple sets of texture coordinates are read in but only the first texture map and coordinate are used but I may be out of date.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 16, 2017 at 3:14 AM, vinmean <span dir="ltr"><<a href="mailto:iamdpak@gmail.com" target="_blank">iamdpak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Following is my function to import obj files with texture. But I need to<br>
import obj files that have multiple .png files as textures. Is there a way<br>
to use vtkOBJImporter class with mulitple texture files?<br>
<br>
void import_vtk_tex_obj(std::string filenameOBJ, std::string filenameMTL,<br>
std::string filenameTEX,<br>
boost::shared_ptr<pcl::<wbr>visualization::PCLVisualizer> view)<br>
{<br>
        vtkNew<vtkOBJImporter> importer;<br>
        std::string texture_path =<br>
vtksys::SystemTools::<wbr>GetFilenamePath(filenameTEX);<br>
<br>
        importer->SetFileName(<wbr>filenameOBJ.data());<br>
        importer->SetFileNameMTL(<wbr>filenameMTL.data());<br>
        importer->SetTexturePath(<wbr>texture_path.data());<br>
        importer->SetRenderWindow(<wbr>view->getRenderWindow());<br>
        importer->Update();<br>
        vtkSmartPointer<vtkRenderer> renderer<br>
=view->getRenderWindow()-><wbr>GetRenderers()-><wbr>GetFirstRenderer();<br>
        renderer->ResetCamera();<br>
}<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Using-multile-texture-files-in-vtkOBJImporter-tp5744430.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/Using-multile-texture-<wbr>files-in-vtkOBJImporter-<wbr>tp5744430.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<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/<wbr>opensource/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_<wbr>FAQ</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/<wbr>mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span><br></div><div>28 Corporate Drive<br>Clifton Park NY 12065<br><div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div></div></div>
</div>