comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » [Q]IDLgrImage Blend_Function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
[Q]IDLgrImage Blend_Function [message #19394] Thu, 16 March 2000 00:00
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
I have two IDLgrPoly objects, one inside of the other. I have mapped a
JPEG image on the outer object and would like to use alpha blending to
adjust the opacity of the outer object so you can see through it to the
inner object.

I read the JPEG, adjust the array to add a 4th channel and assign all
elements of that channel a value of say 100. (I am assuming that the
alpha
channel ranges from 0..255)

I then create the Image and polygon objects like so:

oImage = OBJ_NEW('IDLgrImage', image, INTERLEAVE=2, $
BLEND_FUNCTION=[3,4], /INTERPOLATE)

state.oFBSurface = OBJ_NEW("IDLgrPolygon", TRANSPOSE([[x],[y],[z]]), $
SHADING=1, POLY=mesh, COLOR=[255,255,255], $
TEXTURE_MAP=oImage, STYLE=2, /TEXTURE_INTERP, $
TEXTURE_COORD=TRANSPOSE([[ynorm],[znorm]]), $
ZERO_OPACITY_SKIP=0)

What I get is an object with my image mapped to it in where the final
image is a function of the original image, the IDLgrWindow's background
color and the values in my alpha channel. In other words, the image
fades out to the background color, but you still can't see what is
"inside" or behind the poly. I can't see the axes which fall inside my
outer object nor can I see the inner object.

Am I approaching this correctly? Can you adjust the opacity of the
texels so you can see other objects behind them in a scene?

Thanks for any help!

-Rick Towler
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL<-> Matlab conversion
Next Topic: IDL<-> Matlab conversion

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:00:37 PDT 2025

Total time taken to generate the page: 0.00535 seconds