[vtkusers] VtkUnstructuredGrid SetOpacity

David E DeMarle dave.demarle at kitware.com
Wed Jan 25 17:26:26 EST 2012


When you flip the object around, do you see only green?

In any case, the typical mapper people use for surface rendering,
vtkDataSetMapper, extracts the external surfaces. With that there is no
possibility to see the inner cells even with opacity.

You could instead send the data through something like the shrink filter,
 to  break up the object so that all cells are unconnected and thus
external. Surface rendering with opacity then might to what you want.

However, it is much better to use volume rendering. That will be much
faster and consume less memory.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Wed, Jan 25, 2012 at 4:58 PM, bhanu <bhanu at petrotel.com> wrote:

> Hi,
>
> I am using VtkUnstructuredGrid to render a simple volume wherein each grid
> cell in the 3dvolume has 8 world coordinates. Each grid cell has a color
> associated with it and I am using a vtkLookUpTable for this. When I use
> SetOpacity(1) and see the top view, I expect to see the top layer alone
> since I have set an opacity of 1.0. And that works fine.
> Now When the opacity is changed to anything less than 1 (even 0.99), it
> seems the top layer vanishes and all I see from the top is the bottom most
> layer.
> For example, if top most layer is green and the bottom most layer is blue
> (with inbetween layers shades of lighter green), with opacity less than 1,
> I
> see all blue from the top. I was expecting mixed colors( green and blue).
> What am I missing.
>
> How do you see a transparent grid using VtkUnstructuredGrid and Opacity
> property. Should I not be using Scalar Opacity for such a problem. Is this
> where one uses Gradient Opacity.
> Can anyone please paste some code to direct me here.
>
> Thanks,
> Bhanu
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/VtkUnstructuredGrid-SetOpacity-tp5431453p5431453.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120125/cd775c65/attachment.htm>


More information about the vtkusers mailing list