[vtkusers] vtkOBJReader not reading the whole mesh
Tony Yuan
tonyuanac at gmail.com
Wed Dec 13 13:56:44 EST 2017
Hi Bill,
I tried the code on the example website, and got a mesh with texture, but still, it only contains the legs of the chair. From what I see in Meshlab, it seems that only the legs have texture. Is that the reason why the OBJImporter doesn’t read the remaining part?
I am only interested in getting the entire mesh as a vtkPolyData, not the texture. If the material file is incomplete, is there a way I can still get the mesh from the obj file?
I attached the mtl file for your reference.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: model.mtl
Type: application/octet-stream
Size: 712 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171213/ee886910/attachment.obj>
-------------- next part --------------
Tony
> On Dec 13, 2017, at 12:53 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>
> You also need the material file that is referenced in the .obj file:
> model.mtl
>
> Then use the OBJImporter because you have more than one object in the file
>
> See:
> https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/
>
>
> On Wed, Dec 13, 2017 at 4:40 PM, Tony Yuan <tonyuanac at gmail.com> wrote:
>> Hi,
>>
>> 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:
>>
>>
>>
>> However, when I import the OBJ file in Meshlab it looks fine. Mac’s Preview is also able to open the complete mesh.
>>
>>
>>
>> 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.
>>
>>
>>
>> Thanks,
>> Tony
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
More information about the vtkusers
mailing list