[vtkusers] Rendering multiple actors with opacity (alpha)

Eugene Kim eugene at salk.edu
Tue Aug 15 17:26:25 EDT 2006


Hey Michael and vtkusers,

  	That definetely affects the opacity of the objects in my scene. 
I'm rather adverse to modifying the source code, so my simple hack was to 
change the Opacity on a given actor to .99.  Since i'm using a lookuptable 
anyway, this has no noticeable effect on the objects, (except an 
occasional greying due to the switching b/t color modes).  Thanks a lot, 
and I hope you submit that change.

Eugene

On Mon, 14 Aug 2006, Michael Rice wrote:

> Oops, there was a typo in my post. The check is if opacity != 1.0 (not 0 as 
> in my original message).
>
> On Aug 14, 2006, at 9:08 PM, Michael Rice wrote:
>
>> This sounds like a problem we had. If you look in the 
>> vtkOpenGLActor::Render() method, you see that the glDepthMask is set to 
>> false if the opacity != 0 and the renderer is not picking. Our simple hack 
>> was to comment out the if/else check that disables the depth check. It 
>> doesn't produce the exact transparency we want, but it is very close.
>> 
>> As an experiment, you may want to try and modify vtkOpenGLActor.cxx and see 
>> if that gets you closer to what you want.
>> 
>> When I have some spare time, I'd like to craft a "real" solution and submit 
>> it to Kitware for consideration.
>> 
>> HTH.
>> Michael
>> 
>> On Aug 14, 2006, at 7:05 PM, Eugene Kim wrote:
>> 
>>> Hi everyone,
>>> 
>>> 	I've had an annoying little problem which should have an easy 
>>> solution.  For any given actor that I add to an assembly, modifying it's 
>>> alpha values in a lookup table makes its opaque to itself, but only 
>>> somewhat so to other objects.  Depending on the order in which objects are 
>>> added to the scene (via assembly), the first object will be opaque to 
>>> itself but no other object, the second to only itself and the first, the 
>>> 3rd to itself the second and the first, and so on.  It's very peculiar. 
>>> Anyone know how to get this properly working?
>>> 
>>> Thanks,
>>> Eugene
>>> _______________________________________________
>>> 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
>>> 
>> 
>> _______________________________________________
>> 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