Re: Shading

New Message Reply Date view Thread view Subject view Author view

Ran Yakir (rany++at++++at++sgi.com)
Thu, 21 Aug 1997 09:24:54 +0000


On Aug 20, 2:59pm, Sasikumar Kutti wrote:
> Subject: Shading
> Hi
>
> I am having a trouble with getting smooth shaded models.
>
> I imported a Multigen flight model in 'trackball.c'. It looks badly
> shaded. So I inserted the following lines in the code
>
>
> pfShadeModel( PFSM_GOURAUD);
>
> pfOverride(PFSTATE_SHADEMODEL, PF_ON);
>
>
>
> Further the model doesn't look different even if change to flat shading.
>
> The model looks good in Multigen so I guess there is little chance that
> it has very few polygons.
>

The problem is not the shading mode, but the normals. You propobaly have one
normal per polygon, which results in a 'faceted' shading. To have smooth
shading, each vertex should have its own normal. If several vertices are having
the same location they should share the same normal value.

Ran

-- 
 __                                  | Ran Yakir
 /_)  _  __   \  / _   / o __        | RT-SET Ltd.
/ )_ (_(_) )   \/ (_(_/<_(_)(        | 
              _/                     |   
-------------------------------------+--------------------------------
Phone :                              | E-mail : rany++at++rtset.co.il
  Work : 972-9-9552236  Ext #119     |          rany++at++netvision.net.il
  Res. : 972-9-7489974               |
Fax    : 972-9-9552239               |

http://rtset.co.il/rany ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:45 PDT

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