home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / sgi / 12632 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  2.6 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!mips!darwin.sura.net!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!olivea!mintaka.lcs.mit.edu!ai-lab!fibula!ringrose
  2. From: ringrose@fibula.ai.mit.edu (Robert Ringrose)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: SGI shadows/help
  5. Keywords: n
  6. Message-ID: <26798@life.ai.mit.edu>
  7. Date: 20 Aug 92 00:01:44 GMT
  8. References: <1992Aug10.153515.14594@husc3.harvard.edu> <1992Aug19.015046.22997@odin.corp.sgi.com>
  9. Sender: news@ai.mit.edu
  10. Distribution: usa
  11. Organization: MIT Artificial Intelligence Lab
  12. Lines: 49
  13.  
  14. In article <1992Aug10.153515.14594@husc3.harvard.edu>, basu@scws4.harvard.edu (Archan Basu) writes:
  15. > Hi!
  16. >     I'm working on a Vision application on the SGI Iris Indigo.
  17. > The current problem is to render a human face (from lazer rangefinder data)
  18. > including cast shadows, say across the left eye due to occlusion by the 
  19. > nose, of incident light from the right. The face is an 86x31 rectangle
  20. > represented as a polygonal mesh (~5000 triangles) or perhaps as a NURB
  21. > with ~2600 control points. 
  22. >     The shadows, ofcourse, are the stumbling block. One idea I had was
  23. > (assuming access to SGI's internal data representations, including
  24. > transform's, zbuffer's, etc): Place eye at light source. Perform hidden
  25. > surface elimination, and save zbuffer. Now transform to actual eye frame.
  26. > Determine, for each viewport pixel, whether its corresponding scene point 
  27. > was visible to light source. Hence, shade bright or dark.
  28. >     Have others tried this? Are there other approaches? Where can I get
  29. > the info I need to access SGI memory, etc? I need your help BADLY. Please
  30. > respond with any relevant thoughts to basu@zeus.harvard.edu
  31.  
  32. Yes, we did precisely this in _On_The_Run_, at last year's siggraph.
  33.  
  34. Take a picture "from the sun's point of view".  Grab the transformation matrix
  35. which will take global coordinates to the sun's POV and the z-buffer (look at
  36. lrectread to get the Z buffer).  Beware - the PI has some bugs dealing with
  37. getting the modelview matrix.  They're subtle and nasty.
  38.  
  39. Take two pictures from the camera's point of view and get the transformation
  40. matrix which will take global coordinates to the camera's POV.  The two views
  41. should be with lights on and lights off.
  42.  
  43. Invert the camera matrix (there's a routine in Numerical Rec. in C), multiply
  44. the two, and you've got a matrix which will (pretty much) go from points on the
  45. screen to points in the Z-buffer.
  46.  
  47. Oh, check to see if your Z-buffer is signed or not, and where the sign bit is.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.     - Robert Ringrose
  57.       (ringrose@ai.mit.edu)
  58.  
  59. "There's always one more bu6."
  60.