[vtkusers] VRMLImporter not giving correct colors

Kristian Sons kristian.sons at actor3d.com
Tue Aug 4 12:42:24 EDT 2009


Dear Karl,

> I am using vtkVRMLImporter to load a .wrl file.  The resulting rendering 
> does not have the correct colors.  Here is a clip from my code.

You code is correct.

> This problem only occurs in vtk and not with other VRML renderers.  Does 
> anyone know what the problem is?  Is there any way to fix this so that 
> the vertices are rendered with their correct colors.

This is a known problem, though I didn't find an entry in the bug
tracker (maybe you want to open an issue for that?). Though this is not
an excuse: the correct handling of the VRML IndexedFaceSet is not trivial.

This might be interesting for you:
We are currently working on a project with EDF R&D to implement a
vtkX3DImporter. X3D is the successor of VRML and is (nearly) backwards
compatible to VRML. X3D supports several encodings. Right now, our
importer supports XML and an binary FastInfoset encoding for large scenes.

I converted your scene to X3D using the converter coming with Xj3D
(http://www.xj3d.org/) and displayed it using the recent version of our
importer. It displays the expected result.

EDF intends to contribute the vtkX3DImporter to VTK (as already done for
the reimplementation of the vtkX3DExporter). To achieve this, we
currently work on a version with lesser external dependencies. It will
be finished end of this month.

Please have also a look at http://forge.collaviz.org/community/xiot,
where you can find a preliminary version of the vtkX3DImporter.

Best regards,
   Kristian Sons





> 
>  
> 
> Thanks,
> 
> Karl
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list