[comp.graphics] Re; Sun PHIGS Object 1.1 CAD Package

ddg@ubu.Eng.Sun.COM (Doug Gehringer) (06/29/90)

In article an article in comp.graphics Gunter Ahrendt (g_ahrendt@vaxa.uwa.oz)
asks:

>If someone could tell me how to produce a shaded object (i.e. which commands 
>are needed from Sun PHIGS Object 1.1) from a wire frame, please Email me! If 
>there is a simple command, we've surely tried everything!!!!!

It isn't clear from your posting exactly what needs to be done.  Here
is a checklist of possible problems (this is a general guide to setting
up lighting in PHIGS+):

1) Is the object being displayed with fill area commands (fill areas,
triangle strips, quad meshes, polyhedrons or NURB surfaces)?

1a) (If you want the object to have "smooth" shading) Are you passing
vertex normals? If not, the object will still be lit and shaded, but
the faces will have "flat" shading.

2) Is the interior style PSOLID.  Setting this should stop it from
being wireframe.

3) Is the shading method PSD_COLOUR?  This turns on colour
interpolation across the primitive.

4) Is the reflectance equation PREFL_AMB_DIFF_SPEC (ambient, diffuse
and specular enabled)? This turns on the lighting.

5) Are the light(s) defined correctly and turned on?

For good, simple examples of lighting and just about everything else in
SunPHIGS, see the on line tutorial.  It should be in
/usr/lib/phigs/phigs1.1/examples (/usr/lib/phigs/phigs1.2/examples if
you have SunPHIGS 1.2).

Good Luck

Doug Gehringer 
dgehringer@sun.com
SunPHIGS Engineer