SV: SV: [info-performer] help with drawing backmaterial !

New Message Reply Date view Thread view Subject view Author view

From: Johan Stenlund (johan.stenlund++at++Opticore.com)
Date: 01/31/2003 06:46:08


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-----
Från: 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'
Ämne: 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-----
> Från: Goncalo Carvalho [mailto:g.carvalho++at++gsa.ac.uk]
> Skickat: Friday, January 31, 2003 11:06 AM
> Kopia: 'info-performer++at++sgi.com'
> Ämne: 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


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Jan 31 2003 - 06:48:16 PST

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