[vtkusers] OPacity issues

James C. Robinson j.robinson at kepler-systems.com
Tue Mar 16 12:12:15 EST 2004


Mathieu,

You are a martyr "pour ma cause"....

Firstly, I do not use TCL. I am writing a PC (Windows) platform application
in MFC C++. When I try to run hello.tcl I get "Can't find package vtk". I
didn't think that I had to "install" some kind of vtk kernel on a pc to run
my MFC application (am I correct?)

You say that I should use vtkActor instead of vtkOpenGLActor. Why do
vtkOpenGLActor and all the other inherited OpenGL classes exist?

I have found Maya VI and am going to investigate the kind of images it can
produce (as a benchmark for what I should be able to do). I notice when I
expand its pipeline, it has OpenGL objects in there.......

I am pretty sure that I am not transferring an integer. I am using
vtkFloatingPointType, so if this is a problem it must emanate from the vtk
end?

I believe I am using vtkusers at vtk.org now.

Regards,

Jim

______________________

James C. Robinson, PhD,
Chartered Engineer,
Kepler Simulation Systems Ltd.,
42 Rivergrove,
Glanmire, Co. Cork,
Eire

Tel:         +353-21-4822028
Tel:         +353-87-2393010
Fax:        +353-21-4822028
E-mail:     j.robinson at kepler-systems.com
______________________

-----Original Message-----
From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com]
Sent: 16 March 2004 16:25
To: j.robinson at kepler-systems.com
Cc: vtkusers
Subject: Re: [vtkusers] OPacity issues


> 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