kaufman@delta.eecs.nwu.edu (Michael L. Kaufman) (09/10/90)
This may be a stupid question, but why can't radiosity be handled by ray tracers? Also, are there any archives that contain code/papers on radiosity that I can learn from? Michael
spl@cs.nps.navy.mil (Steve Lamont) (09/10/90)
In article <11930@accuvax.nwu.edu> kaufman@delta.eecs.nwu.edu (Michael L. Kaufman) writes: >This may be a stupid question, but why can't radiosity be handled by ray >tracers? Also, are there any archives that contain code/papers on radiosity >that I can learn from? They're essentially different techniques. Ray tracing is, at its core, a quasi-optical technique and radiosity is approaches the problem from an electromagnetic standpoint, solving the entire scene at once. That, of course, is a gross oversimplification (Hi Gene :-) ). See the Siggraph proceedings from about 1983 or 1984. Are there any PD radiosity codes out there? spl (the p stands for pondering photons) -- Steve Lamont, SciViGuy -- (408) 646-2752 (subject to change at random) NPS Confuser Center / Code 51 / Naval Postgraduate School / Monterey, CA 93940 "You're okay," said Honeysuckle. "The dogs like you." - Charles Bukowski, "How to Get Published"
shirley@iuvax.cs.indiana.edu (peter shirley) (09/10/90)
kaufman@delta.eecs.nwu.edu (Michael L. Kaufman) writes: >This may be a stupid question, but why can't radiosity be handled by ray >tracers? Also, are there any archives that contain code/papers on radiosity >that I can learn from? >Michael Ray Tracers can indeed do radiosity. Check out the Sillion and Puech paper or the Wallace et al. paper in Siggraph '89. Also the Airey et al. paper in proceedings of the symposium of Interactive 3D graphics (Computer Graphics 24 (2)), and my Graphics Interface 90 paper. Also Heckbert's Siggraph 90 paper. If all you want is a brute force radiosity code (and this code works pretty well), then start with N polygons. Each polygon will have reflectivity Ri and will emit power Ei. Assume you want to send R rays on the first pass. We will now do what amounts to physical simulation: T = 0 // T is total emitted power For i = 1 to N Ui = Ei // Ui is unsent power Pi = Ei // Pi is total power estimate T = T + Ei dP = T / R // dP is the approximate power carried by each ray For b = 1 to NumReflections For i = 1 to N r = int(Ui / dP) // patch i will send power Ui in r rays dPi = Ui / r Ui = 0 for j = 1 to r choose random direction with cosine weighting and send ray with until it hits polygon p (see Ward et al. Siggraph 88 paper equation 2 p 87) Up = Up + Rp * dPi Pp = Pp + Rp * dPi // Once this is done, we will have the power Pi coming from each surface, // Now we should convert to radiance (see my GI 90 paper or Kajiya's // Course notes in Siggraph 90 Advanced RT notes) For i = 1 to N Li = Pi / (pi * Ai) // Li is radiance, pi is 3.14..., Ai is area This ignores interpolation to polygon vertices to give a smooth image (see Cohen & Greenberg siggraph 85 figure 8A). You might also want to check out Ward et al.'s Siggraph 88 paper. Not true radiosity, but is ray tracing based and has some of the best features of ray tracing methods. If your scene is all diffuse, that method may be the way to go. Enjoy, Pete Shirley shirley@cs.indiana.edu