[vtkusers] get vtkPolyData from VRML files?

Chris Scharver scharver at evl.uic.edu
Mon May 10 16:15:12 EDT 2004


On May 10, 2004, at 12:50 PM, Mathieu Malaterre wrote:

> 	Could you be more precise on that ? What is missing from the 
> vtkVRMLExport/Importer you could find in Coind3d ? Could you 
> contribute your code (Is it BSD-like) ? Do you have some VRML files 
> that can't be read, you could share with us ?

  I'm using the CAVELib for windowing, and all rendering and user 
interaction is handled in the Coin3D scene graph. I'm also using GHOST 
for haptics. I needed something that behaved like Paul Rajlich's 
vtkActorToPerformer code. It's Coin3D that's missing the geometry 
algorithms provided by VTK. :) I needed in-core conversion between the 
Coin3D, GHOST, and VTK geometry structures. I transfer low-level 
geometry between the three, and doing so via disk access is too slow. 
My vtkOIVSource takes the Coin3D geometry and dumps it directly to 
vtkPolyData for processing. When finished, I send the resulting 
vtkActor's geometry to Coin3D and GHOST.

vtkIVExporter and vtkVRMLExporter require active vtkRenderers. (I 
think?) I don't have any since I'm using VTK for processing only. Also, 
I need data in a specific format using SoVertexProperty nodes. I need 
to determine at run-time which part of a scene graph to send to VTK. 
vtkIVWriter omits normals and also creates its own coloring. 
vtkVRMLImporter also requires a vtkRenderer. I'm also using OpenGL 3D 
textures, and I think at the moment VTK doesn't support them.

It shouldn't be any trouble to contribute the code, but it depends on 
the original vtkActorToPerformer licensing terms from NCSA. There was 
some talk several months ago about creating a generalized conversion 
class that would interface VTK with one of several scene graph 
libraries like Performer, Coin3D, OpenRM, and OpenSceneGraph. I think 
we all got quite busy and never followed up, but maybe if there's 
enough interest we could pick that discussion up again.

Chris
--
Chris Scharver
Electronic Visualization Laboratory
The University of Illinois at Chicago
Ph: 312-996-3002   FAX: 312-413-7585
<http://www.evl.uic.edu/scharver/>




More information about the vtkusers mailing list