[vtkusers] Newbie: Howto load and display textured meshes (vrml or 3ds)?
Mathias Franzius
Mathias.Franzius at web.de
Fri Feb 6 10:54:25 EST 2009
Dear group,
I try to load a vrml or 3ds file and display it with its textures. So far I succeeded in displaying the mesh but cannot figure out how to enable textures.
vtkVRMLImporter and vtk3DSImporter do support textures, don't they?
The 3ds and wrl files contain textures that are correctly displayed in different viewers.
My code snippet in python looks like this:
import vtk
importer = vtk.vtkVRMLImporter()
importer.SetFileName('duck.wrl')
importer.Read()
renWin = importer.GetRenderWindow()
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
renWin.SetSize(300, 300)
iren.Initialize()
renWin.Render()
iren.Start()
Any help appreciated!
Mathias
____________________________________________________________________
Psssst! Schon vom neuen WEB.DE MultiMessenger gehört?
Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123
More information about the vtkusers
mailing list