[comp.graphics] Arbitrarily-Shaped Light Sources

hollasch@enuxha.eas.asu.edu (Steve Hollasch) (09/17/90)

    How do raytracers make light sources out of arbitrary objects?  I
thought a while back that one approach would be to find the direction to
the object from the illuminated point, fire a random cone of rays at the
object, and assign some fraction of the object's light to the point for
each unobstructed ray.

    The main drawback of this approach, as I see it, is that it would
yield a mottled illuminated area, and the mottling would vary in a
random manner.

    About five minutes ago I had an idea for another approach:

    -  Find the 2D bounding box (from the illuminated point's view) of the
       illuminating object.

    -  From this box, get the two orthogonal basis vectors.

    -  Now subdivide this bounding box (using the basis vectors), just
       as you would the original raytrace grid.

    -  For each light ray fired, determine if the ray intersects the
       illuminating object.  If it does, increment the `silhouette'
       counter.  If the light ray intersects no other object, then
       increment the `light' counter.

    -  Once done, the light that shines on the illuminated point is
       (light_counter/silhouette_counter) * object_light.

    This technique would also lend itself to numerous optimizations.
For example, if you assume that all light objects cast a convex
silhouette, then you could use binary search techniques to locate the
edges of the silhouette.  That is, you can assume that all scan lines
will be runs of space-silhouette-space intersections, hone in on the
edges, and then multiply the resulting silhoette width by the scanline
height to get the relative area.

    Is there a better way to do this?  I haven't come across this
problem in any of the graphics texts I've read.

______________________________________________________________________________
Steve Hollasch                       Arizona State University @ Tempe, Arizona
hollasch@enuxha.eas.asu.edu  |  uunet!mimsy!oddjob!noao!asuvax!enuxha!hollasch
-- 
______________________________________________________________________________
Steve Hollasch                       Arizona State University @ Tempe, Arizona
hollasch@enuxha.eas.asu.edu  |  uunet!mimsy!oddjob!noao!asuvax!enuxha!hollasch

pjs@basalt.pa.dec.com (Philip Schneider) (09/18/90)

Steve Hollasch writes :


>    How do raytracers make light sources out of arbitrary objects?  I
>thought a while back that one approach would be to find the direction to
>the object from the illuminated point, fire a random cone of rays at the
>object, and assign some fraction of the object's light to the point for
>each unobstructed ray .......


    Get in touch with the University of Washington Department of Computer
Science.  Two or three years ago Dan O'Donnell wrote an M.S. thesis
on what he called "solid light sources".  (Sorry, my copy is in a box
right now, so I don't recall the exact title :-(  

    Real nice work, as I recall, and the resulting pictures were pretty 
interesting -- one of them featured a coffee mug, with steam rising from it
that turned into a glowing "neon sign" light formed into the shape of 
the word "Espresso" (of course, I'm biased from having worked alongside him 
at the UW graphics lab :-)












--
Philip J. Schneider			| pjs@decwrl.dec.com
DEC Advanced Technology Development	| decwrl!pjs
100 Hamilton Avenue			| (415)853-6538
Palo Alto, CA  94301			| (415)386-8232