[vtkusers] Performance animating a vtkAssembly in Java

Ayman Habib ahabib at stanford.edu
Tue Feb 13 14:47:47 EST 2007


Dear vtk experts,

I'm having a problem trying to animate a vtkAssembly in a vtk Window. I'm using Java (vtkPanel) and vtk 5.0.0. 

Here's the context,  I have an assembly made up of four types of objects:
type1: arbitrary polyData read from a .vtp file (typically tens of these <100). Geometry doesn't change during animation while transforms change.
type2: spherical objects attached at fixed locations to type1 objects (typically few <10 per object of type1 ) 
type3: spherical objects attached at fixed locations to type1 objects (typically tens per object of type1) that come in and out during animation.
type4: Line objects connecting type3 objects displayed as cylinders that change in number, length and orientation during animation based on type3 object positions. This's actually a set of poly-lines.

What I've tried so far
- vtkAssembly for type1, vtkActor for type2, type3, type4  =>very slow even tumbling the view 
- vtkActor for everything because of the warnings I read about slow assemblies performance => same 
- vtkActor for type1, (Glyph3D & PointSet) for type2, type3, (TensorGlyph3D & PointSet) for type4. =>snappy tumbling the view but slow animation (more than 100 ms to render a frame on a souped up workstation).
- vtkActor for type1, (Glyph3D & PointSet) for type2, type3, (Poly-lines & Tuber filter) for type4. =>almost same

Any suggestions on what vtk objects better fit this configuration/context would be greatly appreciated as well as any example doing animation in a vtk window in Java (I'm using a Timer to fire events that update the geometry/xforms).

Thanks in advance for your help,

-Ayman
-------------------------
Ayman Habib, Ph.D.
Stanford University
Clark Center, S348
318 Campus Drive
Stanford, CA  94305-5450
(650) 736-1414 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070213/7bbdb117/attachment.htm>


More information about the vtkusers mailing list