home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / raytrace / radiance / doc / radiance.v12 < prev    next >
Encoding:
Text File  |  1993-09-03  |  54.1 KB  |  1,316 lines

  1. ~s Radiance Digest, v1n2
  2. Hello Everyone,
  3.  
  4. Sorry that it's been so long since my last digest mailing.  Rather a lot
  5. of mail has piled up.  I've keyed the subjects so that you can skip to
  6. the one you're interested in more quickly.  Just search for /^PAT/, where
  7. PAT is a topic key from the list below.  You can skip to the next section
  8. with /^==/. The topics in this issue are as follows:
  9.  
  10.     LIB    Setting up the library path variable RAYPATH
  11.     OCONV    Oconv parameters and errors
  12.     PART    Partitioned ray tracing using -vs and -vl
  13.     ASPECT    Aspect ratios and pfilt options
  14.     LUM    Computing luminance and daylight factors
  15.     SIG    Questions about `88 Siggraph paper
  16.     COLOR    Dealing with different color formats
  17.     RPICT    Rpict options
  18.     OUT    Using Radiance to compute a simple outdoor scene
  19.     ARCH    Architrion file translator
  20.     ALG    Secondary source calculations and new algorithms
  21.  
  22. -Greg
  23.  
  24. ======================================================================
  25. LIB    Setting up the library path variable RAYPATH
  26.  
  27. Date: Thu, 18 Oct 90 15:58:35 -0400
  28. From: spencer@cgrg.ohio-state.edu (Stephen N. Spencer)
  29. To: greg@hobbes.lbl.gov
  30. Subject: RADIANCE question
  31.  
  32. I'm working through the RADIANCE tutorial (got as far as adding the window
  33. to the sample room before, have some time to go farther today for some
  34. reason) and I have run into a problem.
  35.  
  36. I'm at the point in the tutorial where I've done:
  37.  
  38. $ oconv sky.rad outside.rad window.rad room.rad > test.oct
  39.  
  40. and am generating a picture with:
  41.  
  42. $ rpict -vp 2.25 0.375 1.5 -vd -0.25 0.125 -0.125 -av 0.5 0.5 0.5 test.oct > 
  43.                                       test.pic
  44.  
  45. and it gives me:
  46.  
  47. rpict: fatal - cannot find function file "rayinit.cal" 
  48. rpict: 30296 rays, 49.22% done after 0.0141 CPU hours
  49.  
  50. after working a bit (two, three minutes on a Sun 4/110).
  51.  
  52. Any idea(s) as to why this is dying?  All my previous images have been 
  53. generated without trouble.
  54.  
  55. thanks...
  56.  
  57. steve spencer
  58.  
  59. ps: I'm reasonably certain that I have entered all of the data files from
  60. the tutorial document correctly.
  61.  
  62. Date: Thu, 18 Oct 90 13:14:31 PDT
  63. From: greg (Gregory J. Ward)
  64. To: spencer@cgrg.ohio-state.edu
  65. Subject: Re:  RADIANCE question
  66.  
  67. Hi Steve,
  68.  
  69. The problem appears to be that your Radiance library files are not in
  70. their standard location, which is "/usr/local/lib/ray".  In the README
  71. file in the distribution it describes where to put things.  The files
  72. in ray/lib should go in the library location.  It's OK not to put them
  73. there, but you need to assign the environment variable RAYPATH if they're
  74. somewhere else.  For example, if the Radiance distribution is sitting
  75. in /usr/local/src/ray, then you can put the following in your .login:
  76.  
  77.     setenv RAYPATH .:/usr/local/src/ray/lib
  78.  
  79. and everything should work.  Note that RAYPATH is like the Bourne shell's
  80. PATH variable, since it can take any number of directories to search in
  81. order.  Typically, you want to have "." first, and you may have your own
  82. private library to use before the system directory, plus someone else's
  83. library at the end.
  84.  
  85. Good luck.  Let me know if you have any more problems.
  86.  
  87. -Greg
  88.  
  89. ======================================================================
  90. OCONV    Oconv parameters and errors
  91.  
  92. Date: Wed, 24 Oct 90 14:54:25 EST
  93. From: Eric Ost <emo@cica.indiana.edu>
  94. To: greg@hobbes.lbl.gov
  95. Subject: oconv parameter question
  96.  
  97. Greetings Greg,
  98.  
  99. This message concerns parameters to 'oconv'.
  100. In particular the '-n' and '-r' options.
  101. I think I mentioned that we have modeled the new Computer Science building
  102. from the blueprints and I have begun building Radiance versions of all
  103. the geometry files.  During the course of converting the polygonal data files
  104. into octtree format files I ran into the following error message:
  105.  
  106. oconv: internal - set overflow in addobject (TOP.187)
  107.  
  108. I traced its source to 'oconv.c'.  The manual page for 'oconv' states
  109. that by increasing the setlimit ('-n') and resolution ('-r') parameters
  110. this message may be avoided.  The file f3n.rad (the 3rd floor geometry)
  111. only contains 1408 discrete polygons, yet even when I use 'oconv' as:
  112.  
  113. oconv -n 10000 -r 16384 -f f3n.rad > f3.oct
  114.  
  115. I still get the 'set overflow' error message.
  116. I also have tried scaling the entire geometry up by a factor of 10.0,
  117. which increases the inter-object spacing.  Even so, the error still occurs.
  118. Do you have any ideas?  BTW: I can send you the geometry file if you wish.
  119.  
  120. Thanks.
  121.  
  122. eric
  123.  
  124. Date: Wed, 24 Oct 90 13:09:32 PDT
  125. From: greg (Gregory J. Ward)
  126. To: emo@cica.indiana.edu
  127. Subject: Re:  oconv parameter question
  128.  
  129. First, increasing n cannot eliminate this error.  I checked the manual page,
  130. and it doesn't say to increase -n when you encounter this message.  Since
  131. -r doesn't seem to help, though, I would guess that you have many surfaces
  132. (more than 128) piled on top of each other causing the error.  You must
  133. eliminate this problem in the scene description first.  (Perhaps it is due
  134. to a translator bug.)
  135.  
  136. -Greg
  137.  
  138. Date: Wed, 24 Oct 90 15:20:26 EST
  139. From: Eric Ost <emo@cica.indiana.edu>
  140. To: greg@hobbes.lbl.gov
  141. Subject: Re: oconv parameter question
  142.  
  143. You're correct about the manual page not mentioning an increase in '-n'.
  144. Sorry for the confusion.
  145.  
  146. This could be a bug in the translator.  I am going to re-check the code
  147. I wrote yesterday.  It is a program to translate from WaveFront .obj
  148. to Radiance .rad format.  Pretty simple, but it's possible that I have
  149. an 'off-by-one' error... though, the first floor looked ok when I rendered
  150. it.  The output file consists of triangles only.  I am using a simple 
  151. method of splitting rectangles, etc., into several triangles.
  152.  
  153. What does it 'mean' for two objects to be piled on top of one another?
  154. More than two objects sharing an edge in common?
  155.  
  156. Thanks.
  157.  
  158. eric
  159.  
  160. Date: Wed, 24 Oct 90 13:31:55 PDT
  161. From: greg (Gregory J. Ward)
  162. To: emo@cica.indiana.edu
  163. Subject: Re: oconv parameter question
  164.  
  165. If you are willing to share your translator, I'd love to distribute it!
  166. By "piled up" I mean coincident.  In other words, overlapping coplanar
  167. polygons.  I have seen this error before and it almost always comes from
  168. this type of problem.
  169.  
  170. Date: Wed, 24 Oct 90 16:16:47 EST
  171. From: Eric Ost <emo@ogre.cica.indiana.edu>
  172. To: greg@hobbes.lbl.gov
  173. Subject: partitioned ray-tracing
  174.  
  175. I started compiling Radiance on our Stardent but ran into a nasty
  176. NFS bug which caused the machine to actually crash.
  177. I'll probably get back to it after I finish with this next batch
  178. of client requests.
  179.  
  180. My, perhaps naive, idea was to sub-divide the image into equal areas
  181. per-processor and let it run.  For example, with a 4 processor
  182. machine, a 1024x1024 image would be split into 4 256x256 sub-images.
  183. What kind of speed-up could we expect?  4 times?
  184. And, is Radiance amenable to this kind of modification of its
  185. run-time architecture?
  186.  
  187. eric
  188.  
  189. ======================================================================
  190. PART    Partitioned ray tracing using -vs and -vl
  191.  
  192. Date: Wed, 24 Oct 90 14:39:48 PDT
  193. From: greg (Gregory J. Ward)
  194. To: emo@ogre.cica.indiana.edu
  195. Subject: Re:  partitioned ray-tracing
  196.  
  197. Yes, 4-way image partitioning yields a 4 times speed improvement, and yes,
  198. Radiance is amenable to such a procedure.  The only time this would
  199. not result in a linear speedup is if you were using the indirect (ambient)
  200. calculation capability, which is a global calculation.
  201.  
  202. To split up your rendering into 4 pieces, you should determine the view
  203. you want, then reduce the horizontal and vertical size (-vh and -vv) by
  204. two.  (For perspective views, this means: newsize = 2*atan(tan(oldsize/2)/2).)
  205. Then, use the -vs and -vl parameters like so:
  206.  
  207.     Upper left:    rpict -vs -.5 -vl .5 -x 512 -y 512 [args] > ul.pic
  208.     Upper right:    rpict -vs .5 -vl .5 -x 512 -y 512 [args] > ur.pic
  209.     Lower left:    rpict -vs -.5 -vl -.5 -x 512 -y 512 [args] > ll.pic
  210.     Lower right:    rpict -vs .5 -vl -.5 -x 512 -y 512 [args] > lr.pic
  211.  
  212. Then combine the images with pcompos thusly:
  213.  
  214.     pcompos ul.pic 0 512 ur.pic 512 512 ll.pic 0 0 lr.pic 512 0 > full.pic
  215.  
  216. Note that a 1024x1024 images splits into four 512x512 images, not four
  217. 256x256 ones.  The reason for using -vs and -vl is to get the correct
  218. skewed perspective in each quadrant.  These options were designed for
  219. creating panoramic views a piece at a time, as might be needed for a
  220. mural or something.
  221.  
  222. -Greg
  223.  
  224. ======================================================================
  225. ASPECT    Aspect ratios and pfilt options
  226.  
  227. Date: Thu, 25 Oct 90 14:17:11 -0400
  228. From: spencer@cgrg.ohio-state.edu (Stephen N. Spencer)
  229. To: GJWard@Csa1.lbl.gov
  230. Subject: re: aspect ratios (again)
  231.  
  232.  
  233. Something's not right here.
  234.  
  235. I'd like generate a 640 by 484 pixel image (ratio is 1.322314) with a 50-degree
  236. horizontal view angle.  I used the following command (a fragment of it...):
  237.  
  238. -x 640 -y 484 -vh 50.0 -vv 37.8125
  239.  
  240. The ratios 640/484 and 50.0/37.8125 are identical, 1.3223140495.
  241.  
  242. The image produced is only 640 pixels by 470 pixels.
  243.  
  244. Any idea where my last 14 scanlines went?  Thanks.
  245.  
  246. steve
  247.  
  248. ps: oh, the output was the same whether I had "-p 1.0" in the command line 
  249. or not.
  250.  
  251. Date: Thu, 25 Oct 90 11:38:22 PDT
  252. From: greg (Gregory J. Ward)
  253. To: spencer@cgrg.ohio-state.edu
  254. Subject: re: aspect ratios (again)
  255.  
  256. The ratios between angles in a perspective view do not give the aspect
  257. ratio of the image, unfortunately.  It all has to do with tangents.
  258. The actual aspect ratio is given by:
  259.  
  260.     view aspect = y/x = tan(vv/2)/tan(vh/2)
  261.  
  262. This is a large part of why I introduced the -p option to the programs --
  263. it was simply too difficult to do this calculation every time.  Generally,
  264. you can give the maximum resolution in both x and y that you will allow,
  265. then it will fit an image with the proper aspect ratio within those bounds.
  266. If you must have absolute control over the x and y resolution, just give
  267. a -p of 0, and make sure you know what you're doing.  In any case, getinfo
  268. will report the PIXASPECT of the image if it differs from 1.
  269.  
  270. -Greg
  271.  
  272. Date: Wed, 31 Oct 90 08:35:32 -0500
  273. From: spencer@cgrg.ohio-state.edu (Stephen N. Spencer)
  274. To: greg@hobbes.lbl.gov
  275. Subject: re:RADIANCE
  276.  
  277. Any quick answer to 'nice picture, Steve, but what about anti-aliasing'?
  278. I'm looking at the parameters and have a couple of ideas, but nothing is
  279. jumping out at me right now.  (Given the date, that's probably best.)
  280. What parameters should be changed to anti-alias the image produced?
  281. (As if 'anti-alias' was a verb....jeez.)
  282.  
  283. thanks...
  284.  
  285. steve
  286.  
  287. Date: Wed, 31 Oct 90 08:41:43 PST
  288. From: greg (Gregory J. Ward)
  289. To: spencer@cgrg.ohio-state.edu
  290. Subject: re:RADIANCE
  291.  
  292. Use pfilt for anti-aliasing (in computer science, we're verbing words all
  293. the time).  First you should generate an image at higher resolution than
  294. you'll need for the final result.  Then, reduce the resolution with something
  295. like:
  296.  
  297.     pfilt -x /2 -y /2 input > output
  298.  
  299. For the best results, use an input resolution that is three times what you
  300. want in the final image, and employ the -r option of pfilt for Gaussian
  301. filtering:
  302.  
  303.     pfilt -x /3 -y /3 -r .67 input > output
  304.  
  305. The argument to -r sets the amount of "defocusing", larger numbers resulting
  306. in less focused images.  A value of .67 seems to be about optimal for most
  307. purposes.  (Note that the -r option takes somewhat longer than the default
  308. "box" filtering.  Also, you can use the -1 option of pfilt to speed things
  309. up if you know how to adjust or have already adjusted the exposure.)
  310.  
  311. -Greg
  312.  
  313. Date: Wed, 31 Oct 90 12:04:21 -0500
  314. From: spencer@cgrg.ohio-state.edu (Stephen N. Spencer)
  315. To: greg@hobbes.lbl.gov
  316. Subject: re:RADIANCE
  317.  
  318. Thanks.  I guess I was looking in the rpict documentation instead of the
  319. pfilt documentation.  
  320.  
  321. steve
  322.  
  323. ======================================================================
  324. LUM    Computing luminance and daylight factors
  325.  
  326. Date: 6 December 90, 10:28:38 MEZ
  327. From: MICHAEL.SZERMAN.00497119703322.KKAC%ds0rus1i.bitnet@Csa3.lbl.gov
  328. To: GJWARD@Csa3.lbl.gov
  329.  
  330. Hi Greg,
  331. Thanks a lot for your last information about RTRACE. Allthough it
  332. is running well now, one problem still remains.
  333. How do we have to convert the three radiance/irradiance values
  334. of the RTRACE-output to get final luminance/illuminance in cd/m2 ?
  335.  
  336. Next we intend to make a parameter study on a simple scene.
  337. Therefore we need values of illuminance and daylight factor. Is it
  338. possible to receive the daylight factor directly from RADIANCE or
  339. must we calculate it from illuminance by hand ?
  340.  
  341. Last we want to know, whether we have understood the following
  342. expression in the right way. You have said "an 88% transmittance
  343. glass window has a transmission of 96% ". Does this mean, that from
  344. the outside radiation 96% goes into the glass and 88% from the glass
  345. into the room ?
  346. If that's right, then we would like to know if the difference of 8%
  347. is dependent on your definition of the material glas or if we can choose
  348. it
  349. ourselves.
  350.  
  351. Michael+Gernot
  352.  
  353. Date: Thu, 6 Dec 90 08:58:19 PST
  354. From: greg (Gregory J. Ward)
  355. To: kkac@ds0rus1i.bitnet
  356.  
  357. Hello Michael and Gernot,
  358.  
  359. The conversion from spectral radiance or irradiance (rgb) to luminance
  360. or illuminance is:
  361.  
  362.     (.3*r + .59*g + .11*b) {watts} * 470 {lumens/watt} 
  363.  
  364. To get the daylight factor, you must divide by the external irradiance,
  365. which is pi times the "ground ambient level" printed by gensky.  There
  366. is a program called rcalc that performs these types of calculations
  367. handily.  For example, you can get luminance (or illuminance) from
  368. radiance (or irradiance) like so:
  369.  
  370.     getinfo - < rtrace.out | rcalc -e '$1=141*$1+277*$2+52*$3' > outputfile
  371.  
  372. Note that you could have piped the output of rtrace directly into rcalc.
  373. Getinfo with the - option reads from standard input and gets rid of the
  374. first few info lines from the rtrace run.  The -h option of rtrace does
  375. the same thing, but if you wish to keep the rtrace file, this information
  376. can come in handy.
  377.  
  378. To compute the daylight factor for Feb. 10th at 14 standard time in San
  379. Francisco, gensky gives:
  380.  
  381. # gensky 2 10 14
  382. # Ground ambient level: 5.256781
  383.  
  384. (I trust you remember to use the -l, -a and -m options for your location.)
  385. We then use this value in rcalc to get daylight factors from irradiance like so:
  386.  
  387.     rtrace -h -i octree | rcalc -e '$1=(.3*$1+.59*$2+.11*$3)/(PI*5.257)'
  388.  
  389. I hope this gives you enough information to do what you want to.
  390.  
  391. As for glass, the 8% difference between 96% (transmission through the
  392. medium itself) and 88% (transmissivity) is due to reflection, and it
  393. varies with incident angle.  This value is determined absolutely by the
  394. index of refraction, which for glass is 1.52.  I debated about making N
  395. a parameter, but decided not to.  If you want to change the index of
  396. refraction, you will need to go to two parallel but opposing dielectric
  397. surfaces.
  398.  
  399. -Greg
  400.  
  401. [I modified the numbers in this message as part of a correction for
  402.     lumens/watt.  -G]
  403.  
  404. Date: 21 January 91, 11:41:01 MEZ
  405. From: MICHAEL.SZERMAN.00497119703322.KKAC%ds0rus1i.bitnet@Csa3.lbl.gov
  406. To: GJWARD@Csa3.lbl.gov
  407.  
  408. Hi Greg,
  409. One new question about RADIANCE:
  410. We've heard that there could be difficulties by transforming computed
  411. luminance values into screen luminance, because in reality esometimes a
  412. greater absolute difference of luminance density, as a
  413. monitor is able to reproduce.
  414. We've got a publication, which shows that a combinated linear
  415. (for luminance less than 200 cd/m*2) and log grading (for luminance
  416. greater than 200 cd/m*2) transformation should be used.
  417. How does RADIANCE solve this problem ?
  418. And therefore, how realistic is the brightness of a RADIANCE picture?
  419.  
  420. We would be glad for quick answer, because we need the information
  421. for a report in two days.
  422.  
  423. Thanks a lot,
  424. Michael+Gernot.
  425.  
  426. Date: Mon, 21 Jan 91 16:32:51 PST
  427. From: greg (Gregory J. Ward)
  428. To: kkac@ds0rus1i.bitnet
  429. Subject: display intensities
  430.  
  431. Hi Michael and Gernot,
  432.  
  433. I make no attempt in any of the Radiance display programs to map the
  434. monitor intensities to anything other than a linear scale.  As far as
  435. I'm concerned, none of the arguments that has been given for using a
  436. logarithmic or a power law mapping of intensities is the least bit
  437. compelling.  Radiance images and displays are similar to photographs
  438. in their relatively hard clipping of intensities outside the displayable
  439. range.  If a spot is too bright, it comes out white.  If it is too dark,
  440. it comes out black.  Brightnesses inbetween have a brightness with a
  441. linear proportion to the actual computed brightnesses.  I feel that
  442. the only way to get a better display is to increase the dynamic range.
  443.  
  444. There are ways to compensate for lack of dynamic range in displayed
  445. images.  Ximage and x11image have commands for displaying the numeric
  446. value over selected image locations, and this number is not limited
  447. by the display.  Also, the user can readjust the exposure by picking
  448. a spot to normalize against and entering '='.  This way, the viewer
  449. can dynamically adjust the displayed brightness range without having
  450. to rerun pfilt.
  451.  
  452. I hope this has answered your question.  I think that people may
  453. eventually agree on the best, most appropriate brightness mapping
  454. for displays, but the debate is still raging.
  455.  
  456. -Greg
  457.  
  458. P.S.  I have tried logarithmic mappings, and I think they are much
  459. more difficult to interpret since contrast is lost in the image.
  460.  
  461. ======================================================================
  462. SIG    Questions about `88 Siggraph paper
  463.  
  464. From: ARIR@IBM.COM
  465. To: greg@hobbes.lbl.gov
  466. Subject: questions
  467.  
  468. Greg,
  469.  
  470. Could you answer some questions regarding the [`88 Siggraph] paper?
  471. Here they are...
  472.  
  473. 1. Why is the correction term for surfaces in "front" not symmetric,
  474. i.e. why can we use a back light value to evaluate illuminance in front
  475. of it but not vice-versa?
  476.  
  477. 2. Are secondary values also computed for higher generation sampling?
  478.  
  479. 3. How many rays have you used to compute diffuse illuminance values
  480. (using the primary method)?
  481.  
  482. 4. Is the simulation done in terms of actual physical units (could you
  483. define a light bulb of 60 Watts) or do you use just numbers that turn out
  484. right?
  485.  
  486. 5. Are these superquadrics? Where did you get the textures?
  487.  
  488. Hope you will find the time to answer..
  489. Thanks, Ari.
  490.  
  491.  
  492. Date: Tue, 11 Dec 90 20:41:37 PST
  493. From: greg (Gregory J. Ward)
  494. To: ARIR@IBM.COM
  495. Subject: Re:  questions
  496.  
  497. Hi Ari,
  498.  
  499. Sure, I'd be happy to answer your questions.  One by one:
  500.  
  501. 1. Why is the correction term for surfaces in "front" not symmetric,
  502. i.e. why can we use a back light value to evaluate illuminance in front
  503. of it but not vice-versa?
  504.  
  505. A: The reason I allow surfaces in front of a value to make use of it is
  506. because the proximity calculated to other surfaces will consider things
  507. in front as obstructions.  Therefore, it will be excluded by the other
  508. accuracy conditions if there is a problem.
  509.  
  510. 2. Are secondary values also computed for higher generation sampling?
  511.  
  512. A: If by secondary values you are referring to the interpolation method,
  513. the answer is yes.  In fact, this is where interpolation really starts
  514. to pay off, since the number of rays would increase exponentially otherwise.
  515. When the first ray is cast, it spawns a few hundred interreflection
  516. samples as part of a new primary calculation.  These in turn spawn
  517. more primary calculations at the next level and so on.  But, since
  518. the results of each primary calculation are cached and reused for
  519. neighboring samples, the actual number of primary calculations is
  520. limited by the total surface area sampled.  This fails to bring
  521. dramatic savings only when the geometric complexity is so great
  522. that most samples result in a new primary calculation (a dense forest
  523. scene for example).
  524.  
  525. 3. How many rays have you used to compute diffuse illuminance values
  526. (using the primary method)?
  527.  
  528. A: This parameter varies quite a bit from one scene to another.  I
  529. cannot answer in general except to say that you must have enough
  530. rays in the initial sample to produce a value within your desired
  531. tolerance.  For a simple rectangular space, you can get away with
  532. a hundred rays or so for 5-10% accuracy.  A typical furnished office
  533. with daylight may take several hundred or even a thousand rays for
  534. the primary calculation.  (This number can be reduced for subsequent
  535. reflections with no loss in accuracy.)
  536.  
  537. 4. Is the simulation done in terms of actual physical units (could you
  538. define a light bulb of 60 Watts) or do you use just numbers that turn out
  539. right?
  540.  
  541. A: Yes, physical units are used throughout.  Total output is defined
  542. for light sources as well as directionality.  I even have a program
  543. to import light fixture data from manufacturers.
  544.  
  545. I am going to Lausanne to work on daylight simulation.  It should be
  546. fun, except I don't speak a word of French!
  547.  
  548. -Greg
  549.  
  550. ======================================================================
  551. COLOR    Dealing with different color formats
  552.  
  553. Date: Fri, 4 Jan 91 14:02:27 EST
  554. From: Ken Rossman <ken@watsun.cc.columbia.edu>
  555. To: greg@hobbes.lbl.gov (Gregory J. Ward)
  556.  
  557. Yeah, I think twice now (well, once from the last distribution, several
  558. months ago, and once just yesterday).  :-)
  559.  
  560. I have a couple of questions and comments, though, since I have you "on the
  561. line" here:
  562.  
  563.   - I have yet to make rview work right on my display.  I had thought it
  564.     was having problems with my 24-bit display originally (I have a
  565.     Sun-4/110 with a cg8 frame buffer, which is 24-bit color), but the same
  566.     thing happens on 8-bit color displays.  I tried 'rview'-ing some of the
  567.     sample octrees that are included with the distribution, and I generally
  568.     get just a square in the upper righthand corner of the window that is
  569.     created by rview (using '-o x11'), and I see that it seems to be trying
  570.     to resolve the picture in successive quandrants and all that, but
  571.     that's about all I can tell of what it is doing.  Sometimes I only see
  572.     a completely white square, on other images I see a larger, gray one,
  573.     but the result is never quite what I thought it should be.  I take it
  574.     that might mean I'm just not using the right defaults at runtime?  If I
  575.     give it no defaults on the command line, does it pick reasonable ones
  576.     that should show me something of what is going on?
  577.  
  578.   - I tried out ra_pr24, and noticed that it has the same ailment as many
  579.     other pieces of code I have played with over the years in conjuncture
  580.     with this particular 24-bit display.  A Sun 24-bit raster is stored in
  581.     either XBGR order (for 32-bit rasters, where X is currently undefined),
  582.     or in BGR order (for 24-bit rasters).  In either case, though, most
  583.     folks would expect the channels to appear in RGB order, but they are,
  584.     instead, the reverse of that.  When I view some of the images using
  585.     ra_pr24, I get blues and reds reversed.
  586.  
  587.   - Just happened to notice in the man page for ra_bn, that in the text, it
  588.     is referred to as ra_t16 instead.
  589.  
  590. FYI, /Ken
  591.  
  592. P.S. -- Thanks for this distribution!!!
  593.  
  594. [Ken included my response in his following letter. -G]
  595.  
  596. Date: Fri, 4 Jan 91 15:26:58 EST
  597. From: Ken Rossman <ken@watsun.cc.columbia.edu>
  598. To: greg@hobbes.lbl.gov (Gregory J. Ward)
  599.  
  600. Hi Greg,
  601.   
  602.   There are probably one of two (or two of two) things wrong with
  603.   running rview -- the exposure and the viewpoint.  Neither one is
  604.   set to a reasonable default, since this varies considerably from
  605.   one scene to another.
  606.  
  607. Well, that'll do it.  I was just playing dumb and not setting these
  608. parameters at all when running rview before.  I tried messing with the
  609. exposure a bit in rview, and that changes things a bit, but I know now that
  610. the viewpoint isn't right (I don't know how to properly change that around
  611. right now, because I don't know what relative units I am working with, and
  612. what values might be reasonable -- these must also be picture dependent).
  613.  
  614.   The view parameters (particularly -vp and -vd) should be set according to
  615.   where you want to be looking in the scene.
  616.  
  617. Right...  by the way, what is the equivalent command (if there is one) in
  618. the interactive shell part of rview for this?
  619.  
  620.   There is often a view parameters file associated with an octree, which
  621.   ends in a .vp suffix in general.  You may give this to rview with the -vf
  622.   option.  The exposure is a problem that is easily solved after the
  623.   rendering starts using the "exposure" command.  Just type "e 1" once you
  624.   are in rview and it does the rest.  (It may be necessary to use ^R as
  625.   well to redraw the screen and get a better color table allocation on an
  626.   8-bit display.)
  627.   
  628. OK, I'll try all of those suggestions out.  I'm really starting to use this
  629. software now, because I'm coming to the point where I will be having some
  630. real applications for it (I think I mentioned a long time ago that one
  631. thing I wanted to do was to do some *very* fancy presentation graphics (for
  632. things like slide shows), and while this package isn't really aimed at that
  633. kind of application, assuming I can get things like your 3D fonts working
  634. right, it sure could look good for this kind of application!)...
  635.  
  636.   I'm really disturbed if 24-bit rasterfiles are actually BGR instead of
  637.   RGB!
  638.  
  639. Sorry, but they area, in the case of Sun raster files.  Sun defines a
  640. 24-bit and a 32-bit file format, and they are, as I said before BGR and
  641. XBGR order, respectively.
  642.  
  643.   I wrote the translator to hand files to another program, which must have
  644.   this same confusion, since they work together so well.  I guess the only
  645.   solution is to add an option to ra_pr24 to tell it to put out RGB
  646.   sequences instead of BGR (which should be the default if it is correct!).
  647.  
  648. I had thought ra_pr24 was supposed to write out a standard Sun raster file.
  649. If that's the case, then you do need to write out the files in BGR or XBGR
  650. order.  What other program did you expect ra_pr24 to "feed"?
  651.   
  652.   Thank you for spotting the problem in the ra_bn manual page.
  653.  
  654. You're welcome.  And as always, thanks for all your efforts on this software!
  655.  
  656. /Ken
  657.  
  658. Date: Fri, 4 Jan 91 15:44:03 EST
  659. From: Ken Rossman <ken@watsun.cc.columbia.edu>
  660. To: greg@hobbes.lbl.gov (Gregory J. Ward)
  661.  
  662. That's got it!  I issued the following command (as per some of your
  663. instructions in the previous message):
  664.  
  665.   rview -vf examp.vp -o x11 examp.oct
  666.  
  667. and the thing fired right up, and is looking good!
  668.  
  669. I'm curious, though.  Does rview know it is working in the 24-bit domain,
  670. or does it operate in an 8-bit domain internally, and upward expand the
  671. resulting image for 24-bit planes?  /Ken
  672.  
  673.  
  674. Date: Fri, 4 Jan 91 13:29:15 PST
  675. From: greg (Gregory J. Ward)
  676. To: ken@watsun.cc.columbia.edu
  677.  
  678. The program I was feeding with ra_pr24 is yet another converter for
  679. a Kodak color printer.  I don't have access to any 24-bit color
  680. Suns, so I've never tried ra_pr24 there.
  681.  
  682. The internal color calculations are floating point.  They use 4 bytes
  683. per color within the program, and are converted to 3 1-byte mantissas
  684. with a common exponent when written out to a Radiance picture file.
  685. In every case, there is better accuracy available than can be displayed
  686. on any existing hardware.  The drivers for true color under X11 still
  687. need some work, since I have never gained access to a 24-bit machine
  688. running X11 and have not debugged the code for x11image or rview there.
  689.  
  690. -Greg
  691.  
  692. ======================================================================
  693. RPICT    Rpict options
  694.  
  695. Date: Wed, 9 Jan 91 17:45:04 -0500
  696. From: spencer@cgrg.ohio-state.edu (Stephen N. Spencer)
  697. To: greg@hobbes.lbl.gov
  698. Subject: Radiance parameters
  699.  
  700. Quick question:  What parameters and values would YOU use to 'rpict' if you
  701. wanted to make an image which did a good bit of interreflection of light
  702. and distribute the light sources (give light sources some penumbra)?
  703.  
  704. steve
  705.  
  706. Date: Wed, 9 Jan 91 14:50:47 PST
  707. From: greg (Gregory J. Ward)
  708. To: spencer@cgrg.ohio-state.edu
  709. Subject: Re:  Radiance parameters
  710.  
  711. I'm not sure I can give you a good answer about parameters, since it
  712. depends a lot on the scene.  Could you describe it for me briefly,
  713. including the number and types of light sources and if there is any
  714. daylight in the space?  How long are you willing to wait?  What machine
  715. are you using?  Unfortunatly, setting the calculation paramters is
  716. more of an art than a science right now...
  717.  
  718. -Greg
  719.  
  720. Date: Wed, 9 Jan 91 17:56:39 -0500
  721. From: spencer@cgrg.ohio-state.edu (Stephen N. Spencer)
  722. To: greg@hobbes.lbl.gov
  723. Subject:  Radiance parameters
  724.  
  725. Assume an interior.  No daylight.  Small spherical light sources either 
  726. recessed in the ceiling or in lamp(s) with shades (like a Luxo lamp though
  727. more crudely modeled, at least for now).  Tables, chairs.  Perhaps (later)
  728. a few area sources simulating fluorescent light boxes in the ceiling.
  729. (Jeez, I've just described my office.  Oh well...)
  730.  
  731. Is that enough description?
  732.  
  733. steve
  734.  
  735. Date: Wed, 9 Jan 91 15:19:45 PST
  736. From: greg (Gregory J. Ward)
  737. To: spencer@cgrg.ohio-state.edu
  738. Subject: Re:  Radiance parameters
  739.  
  740. Steve,
  741.  
  742. For penumbras, make sure that your sources are round, or if they are
  743. polygons that they are roughly square.  This ensures that sampling over
  744. their area will not result in inappropriate misses.  (In future
  745. releases, you will be warned when this happens.)  You should also turn
  746. off image sampling, since source sampling requires that every pixel be
  747. calculated.  (You should probably render at a higher resolution, then
  748. reduce the picture size and anti-alias with pfilt.)  Here are a
  749. reasonable set of rpict parameters for source sampling:
  750.  
  751.     -dj .5        # Direct jitter set to .5 (1 is maximum)
  752.     -sp 1        # Turn off image plane sampling
  753.  
  754. For interreflection, the first thing to remember is that you should save
  755. the "ambient" values in an overature run to populate the scene.  I suggest
  756. the following parameters to rpict:
  757.  
  758.     -ab 1        # Calculate 1 interreflection bounce
  759.     -ad 256        # Use 256 divisions in initial hemisphere sampling
  760.     -as 128        # Sample 128 directions for variance reduction
  761.     -aa .15        # Set the interreflection interpolation error tolerance
  762.     -ar 10        # Rolloff accuracy at 1/10th global boundary scale
  763.     -af ambfile    # Save "ambient" values in a file
  764.     -av v0 v0 v0    # YOU have to figure out a good value for v0!
  765.  
  766. The way to figure out v0 is to run rview without setting -av first, then
  767. pick a point that's kind of in shadow, but not completely, and use the
  768. trace command to get the value.  Use the same value for red green and blue,
  769. unless you want a colored ambient component.
  770.  
  771. Run rpict at low resolution first as an overture to the main rendering,
  772. and discard the resulting picture like so:
  773.  
  774.     rpict -dj .5 -sp 1 -ab 1 -ad 256 -as 128 -aa .15 -ar 10 -af ambfile \
  775.         -av v0 v0 v0 -x 64 -y 64 octree >/dev/null
  776.  
  777. This stores some ambient values in ambfile to populate the scene and improve
  778. the appearance of the final run:
  779.  
  780.     rpict -dj .5 -sp 1 -ab 1 -ad 256 -as 128 -aa .15 -ar 10 -af ambfile \
  781.         -av v0 v0 v0 -x 1024 -y 1024 octree >picture.raw
  782.  
  783. Then, you can use pfilt to set the exposure, anti-alias and reduce the
  784. resolution:
  785.  
  786.     pfilt -x /2 -y /2 -r .67 picture.raw > picture.done
  787.  
  788. Since rpict is likely to take a long time for such a rendering, I 
  789. find it useful to have it write progress reports every hour to a
  790. separate error file using the following options:
  791.  
  792.     -t 3600 -e errfile
  793.  
  794. That way, when you log out with rpict running in the background, you can
  795. always find out what's going on.
  796.  
  797. -Greg
  798.  
  799. Date: Wed, 9 Jan 91 18:21:43 -0500
  800. From: spencer@cgrg.ohio-state.edu (Stephen N. Spencer)
  801. To: greg@hobbes.lbl.gov
  802. Subject:  Radiance parameters
  803.  
  804. Wow.  Thanks for the well-commented information.  I'll let you know how it
  805. turns out.  
  806.  
  807. steve
  808.  
  809. ======================================================================
  810. OUT    Using Radiance to compute a simple outdoor scene
  811.  
  812. Date: Thu, 10 Jan 91 12:38:10 PST
  813. From: djones@awesome.berkeley.edu (David G. Jones)
  814. To: greg@hobbes.lbl.gov
  815. Subject: cloudy day
  816.  
  817. A student wants to create an image of a sphere sitting on a plane
  818. as it would look on a very cloudy day.  ie illuminated by a
  819. uniform hemi-sphere (the sky).  He does not want to consider
  820. inter-reflections (so he doesn't need to use your ambient calculation)
  821.  
  822. Is the only way of doing this to have very many point sources of light
  823. on a hemi-sphere, or does RADIANCE have another way to handle this?
  824.  
  825. thanks,
  826.   Dave
  827.  
  828. P.S.  He's a computer vision student and wants to compare
  829. the appearance of a scene under various lighting situations.
  830.  
  831.  
  832. Date: Thu, 10 Jan 91 14:31:19 PST
  833. From: greg (Gregory J. Ward)
  834. To: djones@awesome.berkeley.edu
  835. Subject: Re:  cloudy day
  836.  
  837. Hi Dave,
  838.  
  839. You can use the -c option to gensky to produce a cloudy sky distribution,
  840. which is not the same as a uniform sky distribution.  (Nature does not
  841. usually produce uniform skies.)  He should use the interreflection
  842. calculation, though, since that's by far the best way to account for
  843. the sky's contribution.  Try the following description to get started:
  844.  
  845.     #
  846.     # A cloudy sky at 4pm (standard time) on March 13th
  847.     #
  848.  
  849.     !gensky 3 13 16 -c
  850.  
  851.     # the glow type for the sky
  852.  
  853.     skyfunc glow skyglow
  854.     0
  855.     0
  856.     4 1 1 1 0
  857.  
  858.     # the actual source for the sky dome
  859.  
  860.     skyglow source sky
  861.     0
  862.     0
  863.     4 0 0 1 180
  864.  
  865.     # the glow type for the ground and its source
  866.  
  867.     skyfunc glow groundglow
  868.     0
  869.     0
  870.     4 1.3 .8 .6 0
  871.  
  872.     groundglow source ground
  873.     0
  874.     0
  875.     4 0 0 -1 180
  876.  
  877. The parameters I recommend for rpict are as follows:
  878.  
  879.     set rparams="-ab 1 -ad 256 -aa .1 -av 4 4 4"
  880.  
  881. Note that the value for -av is that suggested by gensky.  Then, he should
  882. run an overture calculation to save up some ambient values in a file,
  883. like so:
  884.  
  885.     rpict $rparams -af ambfile -x 64 -y 64 octree >/dev/null
  886.  
  887. The final rendering is done with the same parameters, but at a higher
  888. resolution:
  889.  
  890.     rpict $rparams -af ambfile -x 512 -y 512 octree > picture.raw
  891.  
  892. -Greg
  893.  
  894. ======================================================================
  895. ARCH    Architrion file translator
  896.  
  897. Date:  Wed, 13 Mar 91 16:24 MST
  898. From: JALove%uncamult.bitnet@csa3.lbl.gov
  899. Subject:  Architrion Front-end for Radiance
  900. To: GJWard@csa3.lbl.gov
  901.  
  902. Several months ago, you informed me that an Architrion interface was
  903. under development for Radiance.  Is it completed?  Are interfaces
  904. available other than the McDonnell-Douglas BDS-GDS?  Thanks.
  905.  
  906. Date: Thu, 14 Mar 91 08:25:05 +0100
  907. From: greg (Greg Ward)
  908. To: JALove@uncamult.bitnet
  909. Subject: Re:  Architrion Front-end for Radiance
  910.  
  911. The interface currently works only for Architrion text files, which is
  912. the package we've been using on the MacIntosh where it runs.  Did you
  913. have some other CAD program in mind?
  914.  
  915. Jennifer Schuman (jennifer@hobbes.lbl.gov) is the one working on it,
  916. so you might want to ask her directly.  It is in pretty good shape
  917. as far as I'm concerned.
  918.  
  919. -Greg
  920.  
  921. Date: Thu, 14 Mar 91 16:46:33 PST
  922. From: jennifer@hobbes.lbl.gov (Jennifer Schuman)
  923. To: JALove%uncamult.bitnet@csa3.lbl.gov
  924. Subject: Architrion-to-Radiance
  925.  
  926.  
  927. Greg and I are working together on an interface/translator/preprocessor to
  928. make Architrion files usable as Radiance scene descriptions.  It is available
  929. to anyone who has the patience to work with it in its current "alpha" form. I'm
  930. not too eager to release it just yet (better to wait a few months), but if
  931. you're game then I'm willing.
  932.  
  933. The details are as follows.  Greg has written a translator called "arch2rad"
  934. which takes an architrion 3d text file and, together with a "mapping" file, 
  935. creates a Radiance scene description.  The mapping file is a text file which
  936. assigns materials to the surfaces created in Architrion.
  937.  
  938. I have written an interface with HyperCard, to create this mapping file. The 
  939. interface can also be used to create or modify materials.  Users map materials
  940. onto surfaces by creating a series of rules based on Architrion object 
  941. identifiers.  For example, if I have some blocks called "floor" in
  942. Architrion, and have drawn some of them in red and some in blue, then I might
  943. make 2 mapping rules to tell Radiance that I want my material called "marble"
  944. applied to all red "floor" blocks and "carpet" applied to all blue "floor"
  945. blocks.  It's pretty simple.  It just requires a little forethought when 
  946. creating the original Architrion model, since how you name, layer, color and
  947. place (i.e. position of reference face) blocks is important for locating
  948. materials.
  949.  
  950. If you run the interface under A/UX, then it can also automatically generate
  951. the Radiance octree.  If you are using the mac linked to a Unix machine, then
  952. you must do some ftp-ing of files back and forth.
  953.  
  954. Arch2rad currently runs on the Unix side of this, while the interface is on the
  955. Mac finder side.  This is a pretty inconvenient set-up at the moment, but I
  956. expect to have arch2rad running on the mac, from within the interface, very
  957. soon.  So if you're eager for the interface, I'd highly recommend waiting at
  958. least until that task is finished.
  959.  
  960. As for documentation, unfortunately all we have is Greg's brief write-up of
  961. the arch2rad procedure and my very messy scribbled notes.  Since I am my own
  962. alpa tester for this (I'm currently doing a small design project with these
  963. new tools), I jot down notes as I go.  There are little idiosyncracies in
  964. Architrion that are critical with respect to Radiance rendering, and I would
  965. like to have a small user's manual/handbook of "tips" for people working with
  966. the interface.  Unfortunately, this project only gets worked on in my non-
  967. existant spare time, so who knows when we'll have a polished release version.
  968.  
  969. I'm happy to send the software to you over the net.  Or call if you'd like to
  970. chat about it.
  971. (415)486-4092
  972.  
  973. Jennifer Schuman
  974.  
  975. ======================================================================
  976. ALG    Secondary source calculations and new algorithms
  977.  
  978. Date: Mon, 1 Apr 91 21:14:57 PST
  979. From: chas@hobbes.lbl.gov (Charles Ehrlich)
  980. To: greg@hobbes.lbl.gov
  981. Subject: Another Rad Idea
  982.  
  983. Greg,
  984.  
  985. I've been cogitating on the "problem" of backward ray tracing,
  986. that being that only direct shadow rays to sources will be
  987. computed for illumination levels, except when ambient bounces
  988. are in effect.  In other words, no light bouncing off mirrors
  989. will cast shadows, right?
  990.  
  991. What the scenario in which the user has the option of defining
  992. any number of "virtual sources" by material name either on
  993. the command line or by another material definition that cross
  994. references to the specified materials as potential contributors
  995. to radiance levels.  The thought here is that at every point
  996. in the scene, rays would be traced to each light source (statistics
  997. permitting) including each "virtual source."  When the virtual
  998. direct ray hits its mark (only if, statistics permitting) it
  999. then traces X number of additional rays to the light sources,
  1000. considers the material properties of the virtual source (like
  1001. if it is highly polished metal) and then figures out any
  1002. additional contribution the reflected images of sources should
  1003. have on the original scene location.  In this manner, it
  1004. would seem, the effect of light bouncing off of mirrors could
  1005. be acheived.
  1006.  
  1007. Realizing that this method potentially greatly increases the
  1008. number of shadow rays to be calculated, I've thought of one
  1009. way that the virtual sources could be implemented with potential
  1010. speed improvements.  Perhaps in the definition of the virtual
  1011. source, the material names of the sources to be considered
  1012. as potential reflects could be named.  Another possibility
  1013. might be to somehow "project" all pertinent light sources
  1014. onto the plane of the virtural source so that when a virtual
  1015. source ray strikes, it already knows which other sources 
  1016. would possibly be "in view" of the scene location.
  1017.  
  1018. Boy I hope this makes sense.  I put a lot of thought into it
  1019. because the project I'm currently working on has many, many
  1020. mirrors in it with sources projecting directly onto them. 
  1021.  
  1022. Take care,
  1023. Chas
  1024.  
  1025. From greg Tue Apr  2 11:31:14 1991
  1026. Date: Tue, 2 Apr 91 11:31:08 +0200
  1027. From: greg (Greg Ward)
  1028. To: chas@hobbes.lbl.gov
  1029. Subject: Hello Hello!
  1030.  
  1031. Hi Chas,
  1032.  
  1033. Nice to hear from you again.  Yes, I've had problems with the Macintosh
  1034. not writing out its files completely.  Often, I'll compile something
  1035. and everything looks OK, no error messages, but when I go to run
  1036. the program -- SPLAT!  Jennifer is now set up to make Mac distributions,
  1037. so she can get you fresh copies of all the binaries on floppies, or
  1038. you can get slightly older binaries from the distribution using:
  1039.  
  1040.     tar xf ~greg/ray/dist/ray1R3.1.tar ray/bin.mac
  1041.     
  1042. I can also upload the newest and grooviest versions as soon as I
  1043. recompile them on the IIfx at home.  (Fortunately, the IIfx doesn't
  1044. seem to have the same trouble writing out its files.)  I can probably
  1045. upload them as soon as (my) tomorrow.
  1046.  
  1047. I don't know what to say about your light source without examining
  1048. the files myself.  I assume that you are being careful to put endcaps
  1049. on your cylinders, watch the surface normal directions of all surfaces,
  1050. and be sure that the antimatter does not intersect the illum sphere.
  1051. For a sine surface distribution on the sphere, you can try something like:
  1052.  
  1053.     hive_bright = 1+A1*sin(Pz*2*PI);
  1054.  
  1055. A1 sets the degree of variation (1 being zero to 2 times the original
  1056. brightness), and the scale factor determines the frequency of the variation.
  1057.  
  1058. I have thought about various hacks for secondary sources such as those
  1059. you suggested, and all have failed my basic tests for inclusion in a
  1060. simulation:
  1061.  
  1062.     1.  Must be general enough to be useful.
  1063.     2.  Must not be so complicated that it introduces nasty bugs.
  1064.  
  1065. Examples of borderline cases for the above tests that I have included
  1066. are instances and antimatter.  Both have been real pains in the hiney,
  1067. but essential for certain types of models.
  1068.  
  1069. I think you see the problem already with secondary sources.  Besides
  1070. being very complicated, it is not very general if you treat only
  1071. planar mirrors.  Also, what do you do about small mirrors and mirrors
  1072. that see each other?  Both cases can lead to an astronomical growth
  1073. in the calculation if you do indirect source testing.
  1074.  
  1075. Rather than dig into this can of worms, I am going to be trying what
  1076. I hope is a more general approach to secondary contributions.  I will
  1077. write a separate ray tracing procedure to follow rays from the light
  1078. sources and compute secondary source distributions at user-specified
  1079. locations.  This approach also has the advantage of not introducing
  1080. bugs into a working program.  I don't see how to get away from the
  1081. user-specification requirement at this point, since it requires a
  1082. fair amount of intelligence to know where the significant sources
  1083. of secondary illumination will show up.  However, the user will have
  1084. the capability to enclose objects and declare secondary emitting
  1085. "volumes" in this way.  Thus, even something as complex as a glass
  1086. chandelier could be tagged as a secondary source by enclosing with
  1087. a big "illum" and handing it to this other program.
  1088.  
  1089. Unfortunately, it will take me some time to implement all of this.
  1090. I don't expect to be really finished before the end of my stay
  1091. in Switzerland, which may be too late for your particular project.
  1092.  
  1093. I don't mind if you send this discussion yourself to the ray list.
  1094. If you don't, I will next time I make a digest.  (It's a bit overdue --
  1095. I was just waiting to announce 1.4 at the same time.)
  1096.  
  1097. -Greg
  1098.  
  1099. Date: Mon, 15 Apr 91 22:58:33 PDT
  1100. From: chas@hobbes.lbl.gov (Charles Ehrlich)
  1101. To: greg@hobbes.lbl.gov
  1102. Subject: What else can't Radiance do?
  1103.  
  1104. Greg,
  1105.  
  1106. I'm excited about your current plans/action to write
  1107. a forward ray tracing pre-processor.  I think that it
  1108. will greatly enhance Radiance's ability to simulate
  1109. more complex lighting schemes.  I  have questions,
  1110. however, as to just how general of a solution it is
  1111. going to turn out to be.  I also don't like the
  1112. fact that it requires an additional time-consuming
  1113. step in the ray tracing process.  It seems like
  1114. the pre-processor is very well suited for tasks like
  1115. modelling light sources with lots of refracting/reflecting
  1116. elements, but much less well suited for the kind of
  1117. application I described earlier, that of a room with
  1118. mirrors on the wall.
  1119.  
  1120. My first question is in what ways would the implementation
  1121. of a "smart backward ray tracing (SBRT)" solution as I described
  1122. before not be a general solution?  I've thought about this
  1123. for the last two weeks and could not think of one geometric
  1124. scenario in which the SBRT wouldn't work.  Was my presentation
  1125. of how it might be implemented clear?
  1126.  
  1127. My thoughts about the use of a SBRT in the scenario in question--
  1128. a room with mirrors--are that it seems like the SBRT would
  1129. be a much more efficient approach to determining secondary
  1130. contributions because the secondary source ray already
  1131. has a good idea of which sources to do shadow testing of
  1132. because it has a "favored direction" as determined by the
  1133. angle of incidence with the reflective/refractive surface.  In other
  1134. words, only those sources within a defined solid angle around
  1135. the incident ray's direction need to be shadow tested.  The 
  1136. secondary shadow testing would follow the actual path that 
  1137. the light would follow from the source to the originating point
  1138. in the scene.   In other words, the convention of doing
  1139. shadow testing to the geometric center of a polygonal source would
  1140. not prevent other parts of the polygonal secondary source from 
  1141. potentially reflecting light onto the originating point in the scene.
  1142. The same would hold true for cylinders and spheres as secondary
  1143. sources.  A completely different way of thinking about this
  1144. whole shadow ray thing is that there is more than one solution
  1145. to the equation of the light's path.  The first solution is
  1146. the shortest path whereas additional solutions exist where there
  1147. are reflective surfaces.
  1148.  
  1149. What is the feasibility of implementing the SBRT into
  1150. Radiance?  Just a quick guess about the number of additional
  1151. lines of code written and/or the percentage of existing
  1152. code that would have to be modified would be great.
  1153.  
  1154. My second question surrounds the RGB issue?  How much of
  1155. a problem is it that not all of "reality" is describeable
  1156. with the RGB color model...what percentage of real world
  1157. phenomenon are left out?
  1158.  
  1159. My thoughts on this one are that if accurate measurements
  1160. of a material's color and reflectance are going to be made
  1161. with expensive equipment, how much more difficult is it
  1162. to extract full-spectrum color reflectance information than
  1163. simply RGB?  Specularity?
  1164.  
  1165. What is the feasability and usefulness of implementing
  1166. new material types that used full-spectrum samplings of
  1167. a material's color instead of RGB?  I'm imagining a material
  1168. that uses an external data file not unlike the data files
  1169. used for illum distrubutions which contain iterpolatable
  1170. values at defined intervals along the spectrum.  Again, 
  1171. rough estimates of number of lines needed to be written/modified 
  1172. would be great.
  1173.  
  1174. The next question is an easy one.  What about cylindrical
  1175. sources?  You've given me reasons why they don't make sense,
  1176. but I continue to hang onto this idea based on an alternate
  1177. way of calcuating shadow rays.  The idea is to trace a shadow
  1178. ray to the "nearest point" along the centerline of the cylinder
  1179. rather than to say the midpoint of the centerline as you've
  1180. mentioned to me before as being the "only reasonable way" and
  1181. as such, it didn't make sense.  Again, how feasible is this idea?
  1182.  
  1183. My last few questions are much more general in nature.  If
  1184. you had unlimited funds and desire to make Radiance simulate
  1185. "reality" to the "nth" degree, what other things would you
  1186. implement?  And, is there a theoretical limit to the greatest
  1187. degree of accuracy (with unlimited processing power)
  1188. that a ray tracing solution (forward and/or backward) can
  1189. acheive?  What is Radiance's theoretical limit?
  1190.  
  1191. Yum, yum.  Food for thought.
  1192. Chas
  1193.  
  1194. Date: Tue, 16 Apr 91 14:48:03 +0200
  1195. From: greg (Greg Ward)
  1196. To: chas@hobbes.lbl.gov
  1197. Subject: digesting... digesting... BURP!!
  1198.  
  1199. Hi Chas,
  1200.  
  1201. Thanks for all of your "food for thought".  I'll do my best to answer
  1202. your queries, but I'm not always perfectly clear on your ideas when
  1203. I read them.  I think that these discussions would go much easier in
  1204. person, but that's not going to be possible for at least a while...
  1205.  
  1206. First, the smart backward ray tracing idea.  I'm not sure I understand
  1207. this one fully.  I think I get the basic tenet of searching for sources
  1208. during the normal ray tracing process, and I think the idea has merit
  1209. for large planar mirrors.  As I understand it, you call each mirror a
  1210. window into a virtual world, where you again look at each light
  1211. source.  The costs would be significant, especially for multiple
  1212. reflections in facing mirrors where the calculation could grow 
  1213. exponentially.  Using solid angles to limit tests would avoid some
  1214. of these costs, but even checking such a list if it's long takes
  1215. time.  I don't know how to make the method work for mirrors that have
  1216. texture or curvature.  The idea as given here would take a couple hundred
  1217. lines of code and a month or more of my time to implement.  I would
  1218. be interested to try it if I have the time.
  1219.  
  1220. Second, the cylindrical light source question.  I may do something with
  1221. this.  Not cylinders specifically, but I think it would be good to
  1222. generalize the light source testing procedures to be more forgiving
  1223. of geometry.  Also, I would like the calculation to adaptively sample
  1224. sources based on their proximity.  For example, nearby sources should
  1225. get more samples than a distant source of the same size.  Intensity should
  1226. also be used to determine sampling.  I don't see why I couldn't work
  1227. shape into such a scheme.  The main problem is complexity in the source
  1228. calculation, which should be avoided wherever possible since it is the
  1229. most heavily used part of the program next to intersection testing.
  1230. It has to be dirt cheap.  That's why I can't currently model cylindrical
  1231. sources -- I use a simple extended volume model that can't handle
  1232. surfaces with holes in them.  My guess for this one is 200 lines of code
  1233. and 5 week's time.  I will very probably tackle this along with the
  1234. forward ray tracer, since proper source sampling is critical to the
  1235. success of this effort.
  1236.  
  1237. I am not sure how well the forward ray tracing preprocessor would
  1238. perform in a house of mirrors.  It sort of depends on the source
  1239. sampling scheme I use.  If I specified each mirror as a secondary
  1240. source (illum), and the output distributions were all highly peaked,
  1241. source sampling would critical to obtaining an accurate result.
  1242.  
  1243. In general, I beleive the preprocessing time would not add nearly
  1244. as much to the rendering time as would be required without it.  This
  1245. is the basic precept of creating such a preprocess to begin with.
  1246. If it's not going to save time, then it's a mistake to use it.
  1247. The forward approach is not that good if the final surface is a
  1248. mirror.  For such cases, the SBRT method you suggest sounds better
  1249. to me also.
  1250.  
  1251. And now for color.  I wish I knew the answer to this question.  Since
  1252. I haven't played around with real spectral reflectance data, I can't
  1253. really give you an opinion.  It is not that difficult to implement
  1254. better spectral sampling in Radiance.  It would only require redefining
  1255. the color operations I've built in as macros.  Special programming
  1256. would be required in a few spots where the macros weren't used.  I'd
  1257. estimate a couple of weeks time.  The main reason I haven't done it is
  1258. because I don't have the spectral data.  You should first talk to a student
  1259. who has been working with Gary Meyer at the University of Oregon in Eugene.
  1260. He's been using Radiance to test various spectral sampling schemes.
  1261. He hasn't modified the code, just used multiple runs to increase the number
  1262. of spectral samples from 3 to 3*N.  His name is Roy Ramberg and you can
  1263. send e-mail to him at ramberg@cs.oregon.edu.  I'd be interested in getting
  1264. copies of your correspondance as well.
  1265.  
  1266. I have considered separate scaling factors for x, y and z, and decided
  1267. that it wasn't worth it.  Implementing all of the resultant surface
  1268. types, especially with sorts of skewed slices that would be
  1269. left at the end of elliptical cones, is very nasty.  Many months, many
  1270. headaches.  Also, you destroy the consistency of the lighting calculation
  1271. if you perform non-uniform scaling.  I think that any such operations
  1272. should happen before the file is imported to Radiance.  It's too
  1273. non-physical for my taste.  In the limited case of fitting doors and
  1274. things like that, it's OK, so it might be worth having a special
  1275. program called "xfscale" or something similar to do it.  I wouldn't
  1276. want to add it directly to xform, though.
  1277.  
  1278. I don't know how to answer your general question about what I would
  1279. implement or like implemented in Radiance given unlimited resources.
  1280. As far as the simulation itself, I can only do what I know to do, what
  1281. occurs to me along the way, and what you tell me I should do!  I could
  1282. make a long list of shit work that I would like done writing interfaces
  1283. to various CAD programs, material and object libraries, image file
  1284. formats, and so on.  Mostly, I would like to see completed a nice
  1285. front-end that would run Radiance and connect to one or more CAD
  1286. systems that could really do a decent job modeling architectural
  1287. environments.  Personally, I'm not sure Architrion on the Mac is it,
  1288. but it seems like a good place to start.
  1289.  
  1290. One theoretical limit to light simulation using ray tracing is its
  1291. inability to directly model diffraction and other wave effects.  Ray
  1292. tracing simulates light only as far as its particle behavior.  You can
  1293. fake wave interactions with surfaces, however, and this is usually where
  1294. they are most significant.  At any rate, diffraction is not so important
  1295. to lighting.  I would say that modeling polarization would be an
  1296. interesting addition to Radiance, and not too difficult to implement.
  1297. This has the most effect on multiple specular interactions, although
  1298. skylight is also polarized to some degree and this can affect the
  1299. amount of light entering windows at different angles.  (Note that small
  1300. inaccuracies are generally overwhelmed by the variability of daylight
  1301. in general.)
  1302.  
  1303. The main practical limitation of ray tracing (or any global illumination
  1304. calculation for that matter) is finding all sources of illumination with
  1305. a small sample set.  You must figure out where to look, since you can't
  1306. duplicate nature's feat of sending trillions of samples into the eye
  1307. every second.  In general, it is impossible to guarantee a solution to
  1308. within a fixed tolerance.  You can only say that you have some degree
  1309. of certainty that your error is not greater than some amount.  There
  1310. is no guarantee that you won't miss that solar ray that hit your watch
  1311. and bounced off a satellite, blinding some old woman in Leningrad.
  1312.  
  1313. Well, it's three o'clock and time to get to work!!!
  1314.  
  1315. -Greg
  1316.