home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sgi / 16395 < prev    next >
Encoding:
Internet Message Format  |  1992-11-14  |  1.3 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!hal.com!olivea!sgigate!odin!fido!bedlam.asd.sgi.com!davis
  2. From: davis@bedlam.asd.sgi.com (Tom Davis)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: Hidden line removal...
  5. Message-ID: <1e0l5jINNdr7@fido.asd.sgi.com>
  6. Date: 13 Nov 92 16:29:39 GMT
  7. References: <BxnnxK.CCK@cs.dal.ca>
  8. Organization: Silicon Graphics, Inc.
  9. Lines: 24
  10. NNTP-Posting-Host: bedlam.asd.sgi.com
  11.  
  12. Hidden line removal is pretty easy with stencil planes.
  13.  
  14. The basic idea is to draw each polygon first as its
  15. outline in the wire-frame color, and then draw the
  16. interior (filled) polygon in the background color.  This
  17. will clobber any lines behind it (assuming you're using
  18. Z buffering, of course).
  19.  
  20. The problem is that the polygon interior may also
  21. clobber some of the outline and your picture will look
  22. pretty raspy.
  23.  
  24. To get it right, for each polygon, clear the stencil
  25. plane, draw the outline in both the stencil plane and
  26. in the framebuffer, then draw the polygon's interior
  27. at only those points where the stencil plane is still
  28. clear.  Thus the outline can't be clobbered by the
  29. interior.
  30.  
  31. This will be pretty slow if you clear the stencil
  32. planes after each polygon, but note that they can be
  33. cleared after the first time by simply drawing the
  34. outline again, and erasing the stencil plane whereever
  35. the outline occurs.
  36.