Re: Alpha Blending?

Hi Kevin,

> I've been playing with the alpha/transparency attributes of VisAD and
> have run into a problem with how I want to use it.  I've read the
> previous posts about alpha blending and am unsure whether this is the
> same problem or not.
>
> The basic problem is that I have several filled Irregular2DSets that I
> am displaying with with ConstantMaps that include Display.Alpha.  Many
> of these Irr2DSets overlap and I was hoping that the overlapping
> portions would "blend" the two colors and/or opacity of the respective
> ConstantMaps.
>
> To clarify, please see the right panel of:
>
> http://www.cimms.ou.edu/~kmanross/VCPRPE/VCPRPE_AllBeamWidthsFilled.gif
>
> Note the "filled beam widths", each of which has its own ConstantMap (as
> well as DataReferenceImpl).
>
> If we zoom in on the upper right corner of the right panel we have this
> image:
>
> http://www.cimms.ou.edu/~kmanross/VCPRPE/VCPRPE_AllBeamWidthsFilled_overlap.gif
>
> Hopefully you can see how the beam widths overlap.  The current behavior
> is to simply overlay the next ConstantMap color, but I am wanting to
> blend or merge the two ConstantMap colors and/or have their opacity
> merged.  Is there a way to do this?

To get continuously varying opacity for blending, you need
to have a ScalarMap to Alpha rather than a ConstantMap. You'll
need to add a RealType to the range values in your Field, and
possibly increase the sampling resolution of your Field in
the direction you want opacity to vary. Please let me know if
that's not clear.

Good luck,
Bill


  • 2004 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: