[Paraview] paraview crashes on obj file originating from VMD

David E DeMarle dave.demarle at kitware.com
Thu Feb 17 13:19:20 EST 2011


For VRML it looks like our ancient reader does not support aliasing.
If you can configure the code that created vmd1.wrl to inline the
VMDCyl and VMDMat, I suspect that ParaView will read it.

For our equally ancient OBJ it does appear that we do not support mtl
files. The vtkOBJReader.cxx has a comment (following) that describes
the small subset of OBJ that it will read. I was able to read the file
with 3.10 with a debug build, but not a release build, which indicates
an uninitialized variable in the reader, which I should be able fix
for 3.10 final.

Please suggest modernizing these readers on user voice and if enough
people chime in we'll get it into 3.10.1 or 4.10.


/*---------------------------------------------------------------------------*\

This is only partial support for the OBJ format, which is quite complicated.
To find a full specification, search the net for "OBJ format", eg.:

    http://en.wikipedia.org/wiki/Obj
    http://netghost.narod.ru/gff/graphics/summary/waveobj.htm

We support the following types:

v <x> <y> <z>

    vertex

vn <x> <y> <z>

    vertex normal

vt <x> <y>

    texture coordinate

f <v_a> <v_b> <v_c> ...

    polygonal face linking vertices v_a, v_b, v_c, etc. which
    are 1-based indices into the vertex list

f <v_a>/<t_a> <v_b>/<t_b> ...

    polygonal face as above, but with texture coordinates for
    each vertex. t_a etc. are 1-based indices into the texture
    coordinates list (from the vt lines)

f <v_a>/<t_a>/<n_a> <v_b>/<t_b>/<n_b> ...

    polygonal face as above, with a normal at each vertex, as a
    1-based index into the normals list (from the vn lines)

f <v_a>//<n_a> <v_b>//<n_b> ...

    polygonal face as above but without texture coordinates.

    Per-face tcoords and normals are supported by duplicating
    the vertices on each face as necessary.

l <v_a> <v_b> ...

    lines linking vertices v_a, v_b, etc. which are 1-based
    indices into the vertex list

p <v_a> <v_b> ...

    points located at the vertices v_a, v_b, etc. which are 1-based
    indices into the vertex list

\*---------------------------------------------------------------------------*/



David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



On Fri, Feb 4, 2011 at 6:42 PM, Peter C. Lai <pcl at uab.edu> wrote:
> Hello
>
> We need to export molecular structures and surface renders from UIUC's VMD
> to OBJ with color/material support into Paraview for use with VisBox.
> Paraview 3.8.1 and 3.10-RC1 both crash while trying to render the OBJ files
> here:
> http://cesium.hyperfine.info/~cowbert/vmd/vmd1.obj
> http://cesium.hyperfine.info/~cowbert/vmd/vmd1.mtl
>
> Segfaults after hitting 'Apply'.
>
> Furthermore I read somewhere that the vtk OBJ reader does not read or process
> MTL files? Is this something that can be fixed? We'd really like surface
> colors and transparency to be imported from the mtl file...
>
> Also Paraview will also crash reading in VMD output to VRML2 with a segfault:
> http://cesium.hyperfine.info/~cowbert/vmd/vmd1.wrl
>
> The VMD developers at UIUC are certain these are problems with Paraview and
> not their software...
>
> One final method might supportable is: output POV-Ray from VMD and then
> convert it to something that Paraview will read. Any ideas on that?
>
> Thanks
> --
> ===============================================================
> Peter C. Lai                 | University of Alabama-Birmingham
> Programmer/Analyst           | BEC 257
> Genetics, Div. of Research   | 1150 10th Avenue South
> pcl at uab.edu                  | Birmingham AL 35294-4461
> (205) 690-0808               |
> ===============================================================
>
> _______________________________________________
> 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 ParaView Wiki at: http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list