Sun Phigs lighting model
Doug Gehringer
dgehringer at sun.com
Sat Feb 10 11:13:15 AEST 1990
In article <4530 at brazos.Rice.edu> phill at med-image.compsci.bristol.ac.uk (Phill Everson) writes:
>X-Sun-Spots-Digest: Volume 9, Issue 16, message 12 of 18
>
>We're having a number of problems with Sun Phigs (v1.1) here running on
>SS1s and Sparc370's under SunOS4.03. Sun UK answer centre is baffled, but
>I'm sure someone somewhere can help ...
>
>If anyone could give any pointers to solutions or any sample code of
>greater complexity (and usefulness) than the demos included with the
>package please contact me. I will summarize to the net if there is
>significant reponse.
>
> [... problems with lighting not working... }
The on-line-tutorial, included with SunPHIGS has some nice examples of
lighting (as well as all of the other PHIGS and PHIGS+ features). It has
both FORTRAN and C examples and its a really good tool for learning how
things work.
Other things to try: make sure that you are using the correct workstation
type (a true colour workstation, no indexed, see INTRO_PHIGS+), and the
correct reflectance equation (ambient, diffuse, specular).
>2) Attenuation Coefficients. What are sensible values to plug in to get a
>noticable effect on the rendered model from the light source?
The coefficients attenuate the affect of lights based on the distance from
the light to the object. The attenuation is 1 / (c1 + c2 * d) where c1
and c2 are the coeficents, and d is the distance from the light to your
object. c1= 1 and c2 = 0 gives no attenuation for distance.
>3) Rendering to pixrects. Is there *any* way of rendering a model into a
>pixrect directly rather than a workstation/canvas using Sun Phigs so that
>we can the do a pw_stencil() of that pixrect on top of another image?
Sorry, this is not possible with SunPHIGS 1.2.
Doug Gehringer
Sun Microsystems
More information about the Comp.sys.sun
mailing list