[vtkusers] Make a texture tranparent
Rémy Baudet
baudet at ondim.fr
Mon Mar 11 06:04:17 EST 2002
Hi,
I'd like to make a plane with a texture transparent, but using
vtkProperty::SetOpacity() has no effect on the texture opacity.
Thanks for your help.
vtkBMPReader * pReader = vtkBMPReader::New();
pReader->SetFileName(pElement->getTopoFile().data());
vtkTexture * pTex = vtkTexture::New();
pTex->SetInput(pReader->GetOutput());
pTex->InterpolateOn();
vtkPlaneSource * pPlane = vtkPlaneSource::New();
vtkPolyDataMapper * pPlaneMapper = vtkPolyDataMapper::New();
pPlaneMapper->SetInput(pPlane->GetOutput());
vtkActor * pPlaneActor = vtkActor::New();
pPlaneActor->SetMapper(pPlaneMapper);
pPlaneActor->SetTexture(pTex);
pPlaneActor->GetProperty()->SetOpacity(5.0);
Rémy Baudet
ONDIM - Signal | Image | Multimédia
Email : <mailto:baudet at ondim.fr> baudet at ondim.fr
Tél. : +33.1.40.33.88.08
Fax : +33.1.40.33.65.54
Adresse : 14, rue du Soleillet - 75020 Paris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020311/8ceef3a3/attachment.htm>
More information about the vtkusers
mailing list