[vtkusers] Opacity of vtkActor2D

Gerrick Bivins gbivins at objectreservoir.com
Wed Jul 16 15:55:27 EDT 2008


Did you setup texture coordinates on your actor? You'll have to generate
those to use textures.




On 7/16/08 1:14 PM, "dream_noir" <kyle.charbonneau at gmail.com> wrote:

> 
Thank you for your reply. Unfortunately I haven't been able to apply
> your
advice and get things to work correctly. I've looked over vtkTexture
> and
vtkTexturedActor2D class but just can't figure out how to get them to play
> a
video stream. I have access to some code that does something similar to
> what
I want and from looking it over it seems you are definitely on the
> right
track using a texture. Unfortunately the code uses pure c++/opengl and
> not
vtk classes.

Any ideas are appreciated. Thanks.



Hello,
I don¹t know
> much about the imagemapper and the image pipeline but from a GL
perspective,
> it sounds like you have
 a glTexEnv problem. Sounds like your image is being
> applied with DECAL mode
(I think this is GL¹s default mode).

This basically
> means that the rgb value in your image (texture in GL speak)
is being used for
> the output fragment color an ignoring the values
 of rgba on your primative.

> That said you¹ll need to change the mode to something like MODULATE so
> that
the fragment output will (basically) be the multiplication
 of the
> underlying primative rgba values and the rgba values of the image
(texture) at
> each fragment.

If you can get your video source to a vtkTexture like so:
...

> texture = vtkTexture
   texture.setInputConnection( video.GetOuputPort())

> texture.setBlendingMode(     VTK_TEXTURE_BLENDING_MODE_MODULATE )
..
Then
> change your actor to a vtkTexturedActor2D
   actor = vtkTexturedActor2D

> actor.setTexture( texture );
...
 
 maybe that will do what you
> want.
Gerrick
-- 
View this message in context:
> http://www.nabble.com/Opacity-of-vtkActor2D-tp18385577p18493502.html
Sent from
> the VTK - Users mailing list archive at
> Nabble.com.

_______________________________________________
This is the
> private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to
> subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list