From: Kalle Jalkanen (kalle.jalkanen++at++tii.se)
Date: 02/06/2003 05:57:55
Hi Johan,
Try this:
pfMaterial *mat = new pfMaterial;
mat->setColorMode(PFMTL_BOTH, PFMTL_CMODE_AD);
-- regards KalleOn Fri, 31 Jan 2003 15:46:08 +0100 Johan Stenlund <johan.stenlund++at++opticore.com> wrote:
> Ok, I have tried that and it looks a little bit better, but not > perfect. > > I did this: > > geoState->setAttr(PFSTATE_BACKMTL, geoState->frontmtl); > geoState->setAttr(PFSTATE_FRONTMTL, geoState->frontmtl); > > And > > lmodel->setTwoSide( PF_ON ); > gstate->setAttr( FPSTATE_LIGHTMODEL, lmodel ); > > but the polygons with the back facing me is not reacting to the light. > They have color but no light interaction. This gives me a model where some > polygons got diffuse and specular hightlights and some just got glColor. > > Is there a way to fix this? > > //Regards, Johan > > > > > > > > -----Ursprungligt meddelande----- > Fren: Goncalo Carvalho [mailto:g.carvalho++at++gsa.ac.uk] > Skickat: Friday, January 31, 2003 3:29 PM > Till: Johan Stenlund > Kopia: 'info-performer++at++sgi.com' > Dmne: Re: SV: [info-performer] help with drawing backmaterial ! > > pfHey, > > gstate->setAttr( PFSTATE_FRONTMTL, mtl ); > gstate->setAttr( PFSTATE_BACKMTL, mtl ); where mtl is of type > pfMaterial* > > lmodel->setTwoSide( PF_ON ); > gstate->setAttr( FPSTATE_LIGHTMODEL, lmodel ); where lmodel is of type > pfLightModel* > > > Goncalo > > Johan Stenlund wrote: > > > > Hey, > > > > How will this code look like in C++ ? > > > > //Regards, Johan > > > > -----Ursprungligt meddelande----- > > Fren: Goncalo Carvalho [mailto:g.carvalho++at++gsa.ac.uk] > > Skickat: Friday, January 31, 2003 11:06 AM > > Kopia: 'info-performer++at++sgi.com' > > Dmne: Re: [info-performer] help with drawing backmaterial ! > > > > Hey, > > > > Use the token PFSTATE_BACKMTL in the geostate setAttr. You will probably > > need to enable a two sided > > lighting model with a pfLightModel. > > > > Goncalo > > > > -- > Goncalo Carvalho > Digital Design Studio - Glasgow School of Art > House for an Art Lover - Bellahouston Park > 10 Dumbreck Road > Glasgow G41 5BW > United Kingdom > > Tel: +44 (0) 141 353 4616 > Fax: +44 (0) 141 353 4422 > Mobile: +44 (0) 7766 295867 > mailto:g.carvalho++at++gsa.ac.uk > > ----------------------------------------------------------------------- > List Archives, Info, FAQ: 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 > ----------------------------------------------------------------------- >
This archive was generated by hypermail 2b29 : Thu Feb 06 2003 - 05:56:07 PST