[vtkusers] OPacity issues

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Mar 16 11:24:36 EST 2004


> I am really struggling, probably because I have come in as a high level user
> (and am not too interested in the pure graphics itself). I have adapted my
> code to v4.4 and it is behaving even worse. I have created a webpage
> (http://www.iol.ie/~jcrobinson/opacity%20bug.htm ) showing the difference in
> behaviour between v4.2 & v4.4. The issue this time is in regard opacity. I
> have written my code to allow the user to set the opacity of the
> visualisation objects. I do this using:
>   (pMeshMaterialActor->GetProperty())->SetOpacity(factor) ;
> 
> Where pMeshMaterialActor is a vtkActor* and factor is a vtkFloatingPointType
> (range 0.0 - 1.0).
> 
> The webpage shows that this doesn't work any longer.

Well the page shows only that the way you implemented it, doesn't work 
anymore. Could you please try with paraview for example (Use 
paraviewcomplete to make sure you are using the right version of VTK)? 
Without the full code, or something that reproduce the problem it is 
very hard to know where the bug come from.

Do you have tcl wrapping on ? Can you start:

vtk VTK/Examples/Modelling/Tcl/hello.tcl

The letters should be transparent. Confirm ?

Can you also check that the value you are passing is really a float 
value (and was not round to a integer value ?)

> Aside: I am suffering from my ignorance also of real software engineering. I
> notice that the VTK documentation refers to vtkActor as an abstract class.
> Surely this means that I shouldn't be able to have instances of these.
> Should I use vtkOpenGLActor instead (I am developing for the PC, Windows
> platform exclusively)? I know that I haven't been 100% satisfied with the
> rendered images since I change from v3.2. It could be related some basic
> choices, settings of which I am not aware.

No ! You are right you should use vtkActor. Unless you want to do 
something specific as a vtkLODActor.

HTH
Mathieu
Ps: did I tell you vtkusers ML is now vtkusers at vtk.org ;)





More information about the vtkusers mailing list