Re: Transparency problem

New Message Reply Date view Thread view Subject view Author view

From: Boris Mansencal (boris.mansencal++at++inria.fr)
Date: 01/15/2001 00:39:35


bert's account wrote:
>
> if the material color mode is set to other then ' PFMTL_CMODE_OFF'
> then Alpha is taken from the geometry color. if the geometry color
> is opaque...... !

Ok.
So Is there a way to change only the alpha component of a pfGeoSet
without knowing its color ?
(The color could be set by vertex, so I would have to change the alpha
component
for each vertex?...)

>
> Boris Mansencal wrote:
> >
> > Hi pfAll,
> >
> > I have a problem with transparency.
> > I load a file with several objects, and I would like
> > to change only the alpha component for one of the
> > pfGeoSets. (I know the color is defined in the pfGeoSet, but
> > I
> >
> > I have the following code (with myGeoSet being a red box for example) :
> > ...
> > pfGeoState *gstate = myGeoSet->getGState()
> > pfMaterial *matl = new pfMaterial();
> > matl->setColorMode(PFMTL_FRONT, mode);
> > matl->setAlpha(0.3);
> > gstate->setAttr(PFSTATE_FRONTMTL, matl);
> > gstate->setMode(PFSTATE_TRANSPARENCY, PFTR_ON);
> > ...
> >
> > If mode==PFMTL_CMODE_OFF, my object is transparent, but white/grey
> > (the color of the pfGeoSet has no effect, it's ok.)
> >
> > If mode==PFMTL_CMODE_AMBIENT_AND_DIFFUSE, my object is red but not
> > transparent.
> >
> > Could somebody tell me what's wrong ?
> >
> > Is there a better way to do this ?
> >
> > Thanks a lot.
> >
> > Boris.
> >
> > --
> > Boris Mansencal
> > INRIA Rocquencourt (France) - projet i3D
> > -----------------------------------------------------------------------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Open Development Project: http://oss.sgi.com/projects/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
>
> --
> See Ya,
>
> Lawrence Eugene Bertoldi Technical Consultant
> vnet 238-8949 Silicon Graphics
> phone 301-572-8949 Silver Spring MD.
> email lberto++at++clubfed.sgi.com
>
> ~;-}>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
Boris Mansencal
INRIA Rocquencourt (France) - projet i3D


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jan 15 2001 - 02:15:37 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.