Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: dgehringer@sun.com (Doug Gehringer) Newsgroups: comp.sys.sun Subject: Re: Sun Phigs lighting model Keywords: Software Message-ID: <4934@brazos.Rice.edu> Date: 10 Feb 90 00:13:15 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 39 Approved: Sun-Spots@rice.edu X-Refs: Original: v9n16 X-Sun-Spots-Digest: Volume 9, Issue 34, message 8 In article <4530@brazos.Rice.edu> phill@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