home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / NEWS / RADIANCE / DOC / RADIANCE.V15 < prev    next >
Encoding:
Text File  |  1993-10-07  |  41.3 KB  |  1,146 lines

  1. ~s Radiance Digest v1n5
  2. Dear Radiance Users,
  3.  
  4. For those of you still with us after last week's fiasco, here is a culling
  5. of electronic mail exchanged between me and some of you over the last month.
  6. Once again, I have given headings by subject to make it easier to browse
  7. without reading everything.
  8.  
  9. A couple of reminders.  First, you may pick up previous issues of the
  10. Radiance Digest at hobbes.lbl.gov (128.3.12.38) with anonymous ftp
  11. from the pub/digest directory.  Second, you must write to me if you want
  12. your name removed from this mailing list -- please take a few minutes now
  13. to express your outrage at getting such unwelcomed junk mail so that
  14. the tension doesn't build up and make the blood vessels on your forehead
  15. bulge out in an unbecoming fashion.
  16.  
  17. I particularly recommend looking at the section on the Radiance picture
  18. format to anyone interested in translating Radiance images.
  19.  
  20. -Greg
  21.  
  22.     MAC        - MacIntosh and Radiance
  23.     PICTURE        - Radiance Picutre file format
  24.     HPUX        - Hewlett-Packard UNIX and Radiance 1.4
  25.     DAYLIGHT    - Radiance and Daylight Simulation
  26.     AMIGA        - Radiance on the Amiga 2000
  27.     COLORPICT    - Using the Colorpict primitive
  28.     DOS        - Radiance under DOS?
  29.     RVIEW        - Rview and memory
  30.     LIGHTS        - Non-standard Light Sources
  31.  
  32. ============================
  33. MAC    MacIntosh programs with Radiance and A/UX
  34.  
  35. Date: Fri, 23 Aug 91 13:07:34 NZT
  36. From: pdbourke%ccu1.aukuni.ac.nz@Csa2.lbl.gov
  37. Subject: Fractal Landscape generator
  38. To: GJWard@Csa2.lbl.gov
  39.  
  40. I've just written the "old fractal landscape" generator using the subdivision
  41. technique (as opposed to spectral techniques). A Mac II application!
  42.  
  43. It does the following:
  44. - surface parameters, x,y range and typical z variation
  45. - roughness parameter
  46. - sea (lake) level
  47. - seed specification, lets the same landscape be generated on request
  48. - 3 point colour ramp mapped to height
  49. - DXF, Super3D, RayShade, and Radiance
  50. - view on the Mac screen of wireframe coloured model
  51. - variable resolution up to 256x256 cells
  52. - automatic triangulation of non-planar facets
  53.  
  54. ------------------------------
  55. Paul D. Bourke
  56. pdbourke@ccu1.aukuni.ac.nz
  57.  
  58.  
  59. Date: Sun, 25 Aug 91 15:54:59 EDT
  60. From: David Brainard  <brainard@cvs.rochester.edu>
  61. To: greg@lesosun1.epfl.ch
  62. Subject: Re:  Mac version
  63.  
  64. I see.  I will definitely have a Big Mac (as it were)
  65. and am trying to decide whether to load it with A/UX
  66. or not.  You are the first person I've had any contact
  67. with who seems to be using it.  Do you find it a reasonable
  68. Unix?  Do you find that native Mac applications run on
  69. top of it without too many problems?   My prior was that
  70. running Unix on the MAC would provide the worst of both
  71. worlds, rather than the best.  But I am willing to be 
  72. convinced otherwise.  Thanks for any advice you can give.
  73.  
  74. David
  75.  
  76. Date: Mon, 26 Aug 91 09:40:37 +0200
  77. From: greg (Greg Ward)
  78. To: brainard@cvs.rochester.edu
  79. Subject: Re:  Mac version
  80.  
  81. Hi David,
  82.  
  83. My advice is free, and it's worth what you pay for it!
  84.  
  85. I won't claim that A/UX is the best of both worlds.  I have certainly
  86. had my share of frustrations trying to get around little annoying
  87. compiler bugs and poor virtual memory performance on the UNIX side,
  88. but I've dealt with worse UNIX implementations, certainly.  The
  89. worst thing I can say about A/UX is that it's a System V derivative,
  90. with all the associated problems.  Berkeley, Berkeley, yeah, yeah, yeah!
  91.  
  92. As for the Mac side, I haven't tried it out with every software package.
  93. I have tried Microsoft Word 4.0, which seems fairly stable, MacDraw II,
  94. Adobe Photoshop (excellent software in my opinion), Aldus Freehand,
  95. Studio/8, Versaterm, Mathematica, HyperCard, and a few others I can't
  96. think of right now.  I haven't tried Excel or any database systems, but
  97. WingZ seems to work (though I haven't used it really at all).  Programs
  98. that I've tried which failed are MacWrite, SuperPaint and Architrion II.
  99. Sometimes you'll get a warning if the 32-bit clean bit isn't set on the
  100. application and it will run anyway, but only if the code actually is
  101. 32-bit clean and they just forgot to set the bit, as is the case with
  102. HyperCard 2.0.  In general, 24-bit applications don't work, even in the
  103. special 24-bit mode A/UX Finder.  I don't see this as being much of a
  104. drawback, since all applications have to be 32-bit clean to run under
  105. System 7, anyway.
  106.  
  107. The other loss (that I don't really consider a loss) is all the
  108. OS utilities and INIT's and so forth that work under the MacOS.
  109. You will be very sorry if you install any of these under A/UX.
  110. Also, specialty programs for formatting hard drives and other
  111. hardware-specific tasks must be run under the regular OS.
  112.  
  113. Keep in mind that installing A/UX doesn't mean giving up your
  114. regular MacIntosh.  All you really give up is about 100 Mbytes of
  115. disk space somewhere.  You can still run without A/UX, only
  116. booting it when you have some UNIX program you need to run.
  117. Also, since A/UX is cognizant of the Mac volumes, it's not
  118. necessary to install your Mac applications or data in two places.
  119.  
  120. In conclusion, I think the A/UX development team have done a
  121. decent job getting these two very different systems to cooperate
  122. with each other, and I've been generally satisfied with the
  123. improvements that come with each new release -- something I
  124. can't say for the Sun operating system!
  125.  
  126. -Greg
  127.  
  128. [A sad postscript to this message -- it seems that the new Adobe
  129.     Photoshop version 2.0 doesn't like A/UX.]
  130.  
  131. ================================
  132. PICTURE        Radiance Picture Format
  133.  
  134. Date: Fri, 13 Sep 91 16:56:02 NZT
  135. From: russells@ccu1.aukuni.ac.nz
  136. Subject: Radiance picture format
  137. To: greg@lesosun1.epfl.ch
  138.  
  139. Hi,
  140.  
  141. Can you supply the format of the Radiance picture files, as produced
  142. by rpict etal. I am planning to write an Macintosh application
  143. to display them, using MacTCP to bring them from the Unix system
  144. without intermediate FTPing and conversions.
  145.  
  146. Also, is it possible for Radiance to do parametric models. For instance
  147. you set a variable and use instances of that variable throughout
  148. your model files. This would be good for my Super 3D (a Mac modeller)
  149. to Radiance translator for handling "one-pixel wide" lines.
  150.  
  151. Thanks in advance,
  152.  
  153. Russell Street
  154. russells@ccu1.aukuni.ac.nz
  155. (arch2 in a former life)
  156.  
  157. Date: Fri, 13 Sep 91 09:19:31 +0200
  158. From: greg (Greg Ward)
  159. To: russells@ccu1.aukuni.ac.nz
  160. Subject: Re:  Radiance picture format
  161.  
  162. Hi Russell,
  163.  
  164. Thanks for writing the Super 3D translator.  Paul just wrote to me
  165. about it, but I haven't had a chance yet to try it out.  I need to
  166. find a copy of Super 3D first!
  167.  
  168. At the end of this mail I will put a shar file of the routines you
  169. need to read and write Radiance pictures.  The format has been
  170. enhanced slightly for the next release (in an upward compatible
  171. way), so you should definitely use these newer routines.
  172.  
  173. The file format, like most binary files used by Radiance, contains
  174. an ascii information header that is terminated by an empty line.
  175. This header typically contains the commands used to generate the
  176. file along with variables indicating exposure, view parameters, and
  177. so on.  Next there is a single line that indicates the resolution and
  178. pixel scanning order of the image.  For Radiance pictures, the pixels
  179. are order as English text, left to right and top to bottom.  This is
  180. indicated with a line of the form:
  181.  
  182. -Y M +X N
  183.  
  184. Where M and N are the y and x resolutions, respectively.  The x and y
  185. image coordinates are always the same, starting with (0,0) at the lower
  186. left corner, (N,0) at the lower right, and (0,M) at the upper left.
  187. The y resolution appears first in our specification because it is the
  188. major sort, and is preceded by a minus sign because it is decreasing in
  189. the file.
  190.  
  191. Finally, the floating point scanlines follow.  Each pixel is represented by
  192. at most 4 bytes.  The first three bytes are the red, green and blue mantissas
  193. (in that order), and the fourth byte is a common exponent.  The floating point
  194. color (R,G,B)=(1.,.5,.25) would be represented by the bytes (128,64,32,129).
  195. The conversion back to floating point is possible using the ldexp() library
  196. routine, or it's better to use the colr_color() routine included in color.c.
  197.  
  198. The scanlines are usually run-length encoded.  My previous scheme (release 1.4
  199. and earlier) used a simple count for repeated pixels.  My new scheme is
  200. more complicated and encodes the four components separately.  I don't
  201. recommend writing your own routine to decode it -- use what's in color.c.
  202.  
  203. A skeletal program to read a Radiance picture file and convert to 24-bit
  204. gamma-corrected color looks like this:
  205.  
  206. #include <stdio.h>
  207. #include "color.h"
  208. main(argc, argv)
  209. int argc;
  210. char *argv[];
  211. {
  212.     char *fname;        /* Radiance input file name */
  213.     FILE *fp;        /* input stream pointer */
  214.     int xres,yres;        /* x and y image resolution */
  215.     int y;
  216.     register COLR *scanin;
  217.     register int x;
  218.  
  219.     if (argc < 2) {
  220.         fp = stdin;
  221.         fname = "<stdin>";
  222.     } else if ((fp = fopen(fname=argv[1], "r")) == NULL) {
  223.         perror(fname);
  224.         exit(1);
  225.     }
  226.     if (checkheader(fp, COLRFMT, NULL) < 0 ||
  227.             fgetresolu(&xres, &yres, fp) != (YMAJOR|YDECR))
  228.         fprintf(stderr, "%s: not a Radiance picture\n", fname);
  229.         exit(1);
  230.     }
  231.     if ((scanin = (COLR *)malloc(xres*sizeof(COLR))) == NULL) {
  232.         perror(argv[0]);
  233.         exit(1);
  234.     }
  235.     setcolrgam(2.2);        /* set appropriate gamma correction */
  236.     for (y = yres-1; y >= 0; y--) {
  237.         if (freadcolrs(scanin, xres, fp) < 0) {
  238.             fprintf(stderr, "%s: read error\n", fname);
  239.             exit(1);
  240.         }
  241.         colrs_gambs(scanin, xres);
  242.         for (x = 0; x < xres; x++) {
  243.             /*
  244.              * Do something with the bytes:
  245.              *    scanin[x][RED]
  246.              *    scanin[x][GRN]
  247.              *    scanin[x][BLU]
  248.              */
  249.         }
  250.     }
  251.     free((char *)scanin);
  252.     exit(0);
  253. }
  254.  
  255. You will find all the routines you need in ray/src/common.  The
  256. checkheader() routine is in the module header.c, fgetresolu is in resolu.c,
  257. freadcolrs() is in color.c, and setcolrgam() and colrs_gambs() are
  258. in the module colrops.c.
  259.  
  260. If you want to convert the file to 8-bit color, the process is quite a
  261. bit more complicated.  I suggest you take a look at the ra_pr program
  262. in the ray/src/px directory to get a better idea of what is involved.
  263.  
  264. For communicating with another program across MacTCP, I suggest reading
  265. and unpacking the scanlines on the remote (UNIX) host and transferring
  266. fixed-length packets (perhaps a scanline at a time) to your MacIntosh
  267. display program.
  268.  
  269. As for a macro facility to replace variables with values in a Radiance
  270. scene file, Paul asked me also about this earlier in the context of
  271. pixel-thick lines.  You can certainly use a macro program such as
  272. cpp or m4 to replace variables with values in a file, but the real
  273. problem is that pixel-thick lines do not exist.  They should be
  274. converted to cylinders with a non-zero radius corresponding to the
  275. physical objects the lines were meant to represent.  This may end
  276. up being a pixel wide in the final image, but usually it is not.
  277. Radiance actually has no notion of pixel size in its rendering
  278. routines, so variable replacement with the pixel size is impossible
  279. anyway.
  280.  
  281. -Greg
  282.  
  283. ------------------------------
  284. #! /bin/sh
  285. # This is a shell archive, meaning:
  286. # 1. Remove everything above the #! /bin/sh line.
  287. # 2. Save the resulting text in a file.
  288. # 3. Execute the file with /bin/sh (not csh) to create:
  289. #    color.h
  290. #    header.c
  291. #    resolu.c
  292. #    color.c
  293. #    colrops.c
  294. # This archive created: Fri Sep 13 09:19:19 1991
  295. [Deleted for the sake of brevity.]
  296.  
  297. ============================================
  298. HPUX        Hewlett-Packard UNIX and Radiance 1.4
  299.  
  300. From: jaf@beauty.graphics.cornell.edu (James A. Ferwerda)
  301. Subject: Radiance installation on HP9000/835
  302. To: GJWard@Csa2.lbl.gov
  303. Date: Thu, 29 Aug 91 14:53:05 EDT
  304.  
  305. Hi,
  306.  
  307. I'm a potentially new user of Radiance, but I'm having a little trouble
  308. getting it to compile on my HP9000/835. Included below is a copy of the
  309. output of the makeall script. I'm writing to you for assistance before
  310. I make any major changes to the distributed version because I'd like to
  311. remain compatible with any updates or bug fixes, and because I figure
  312. you know your software better than I ever will and might know a quick
  313. fix which would save me hours of hacking. I compiled the package using
  314. the "HP workstation" option in the makeall script, and so far the only
  315. code change I've made was to change the line
  316.  
  317. #include <sys/var.h> 
  318.  
  319. in malloc.c to
  320.  
  321. #include <var.h>
  322.  
  323. because there is no var.h in usr/include/sys on the HP system.
  324.  
  325. I'm not a hardware or a systems person (or even a very good programmer)
  326. but to the best of my knowledge the HP9000/835 is a RISC based machine
  327. running a modified version of System V. (But the makeall script gave
  328. similar messages when I used the "Other" option and indicated a RISC based
  329. non-BSD machine).
  330.  
  331. Any insights you can give me on how to get the package up and running
  332. on my HP machine would be greatly appreciated. Radiance looks like a
  333. great tool for my work on surface lightness/ illumination perception
  334. and I'd really like to be able to use it. By the way, I first heard about
  335. Radiance from Holly Rushmeier from Georgia Tech who gave it rave reviews.
  336. Thanks in advance for any help, and keep up the good work.
  337.  
  338. -Jim Ferwerda
  339. jaf@graphics.cornell.edu
  340.  
  341. Date: Fri, 30 Aug 91 10:38:00 +0200
  342. From: greg (Greg Ward)
  343. To: jaf@beauty.graphics.cornell.edu
  344. Subject: Re:  Radiance installation on HP9000/835
  345.  
  346. Hello Jim,
  347.  
  348. OK, so I admit that I haven't actually compiled the distribution on all
  349. these different machines.  I'm still running on a Sun 3/60 myself.
  350.  
  351. Thanks for sending me the compilation errors.  It really is the best
  352. way for me to correct portability problems in the code.  I recommend
  353. the following changes:
  354.  
  355.     1) Change the #ifdef lines to #ifndef BSD at:
  356.         line 78 of src/cv/dxfcvt/config.h and
  357.         line 22 of src/cal/calc/calc.c
  358.  
  359.     2) Change the COMPAT=malloc.o to COMPAT=bmalloc.o in:
  360.         src/ot/Makefile and
  361.         src/rt/Makefile
  362.  
  363. These fixes will appear in the next release, thanks to you.
  364. -Greg
  365.  
  366. From greg Thu Sep  5 11:03:53 1991
  367. Date: Thu, 5 Sep 91 11:03:52 +0200
  368. From: greg (Greg Ward)
  369. To: jaf@beauty.graphics.cornell.edu
  370. Subject: Re: Radiance installation on HP9000/835
  371. Status: R
  372.  
  373. Hi Jim,
  374.  
  375. I took a look at the core and oconv is hitting a bus error in the scanf()
  376. procedure.  I suspect the problem is memory alignment, and that the HP
  377. is a RISC machine and we need to define ALIGN=double for bmalloc to
  378. be compiled properly.  I recommend doing this manually and I will
  379. correct the entry for HP workstations in the makeall script for
  380. the next distribution.  Do:
  381.  
  382.     % cd ray/src/ot
  383.     % rm bmalloc.o
  384.     % cc -O -DALIGN=double -c bmalloc.c
  385.     % cd ../rt
  386.     % rm bmalloc.o
  387.     % cc -O -DALIGN=double -c bmalloc.c
  388.  
  389. Then rerun makeall from the top and the fixed compilations of bmalloc.o
  390. will be included.  Hopefully, this will fix your problems.
  391.  
  392. -Greg
  393.  
  394. P.S.  I didn't do it myself because of file permissions obviously.
  395.  
  396. From daemon Fri Sep  6 00:24:34 1991
  397. From: James A. Ferwerda <jaf@beauty.graphics.cornell.edu>
  398. Subject: Success!
  399. To: greg@lesosun1.epfl.ch
  400. Date: Thu, 5 Sep 91 18:26:33 EDT
  401. Mailer: Elm [revision: 64.9]
  402. Status: R
  403.  
  404.  
  405. Greg, 
  406.  
  407. Thanks for the fixes. I'm off and running, working my way through the
  408. tutorial. Thus far I'm really impressed with how comprehensive your 
  409. package looks and how easy it's been to get things to come up. You've
  410. really done a great job. I'll keep you posted on how things are coming
  411. along. Thanks.
  412.  
  413. -Jim
  414.  
  415. From: nfotis%theseas.ntua.gr@Csa2.lbl.gov (Nikolaos)
  416. Subject: Troubles with Radiance1R4
  417. To: gjward@Csa2.lbl.gov (Greg Ward)
  418. Date: Sat, 7 Sep 91 8:33:14 EET DST
  419.  
  420. Dear Mr. Ward,
  421.  
  422. I just set to play with Radiance, but with bad results
  423. (on a HP-9000/720. Here's its `uname -a` output:
  424. HP-UX kentayro A.B8.01 A 9000/720 29904182  )
  425.  
  426. The first trouble: malloc.c doesn't compile with the 5th option
  427. of makeall:
  428.  
  429. cc: "malloc.c", line 270: error 1588: "v_pageshift" undefined.
  430. cc: "malloc.c", line 270: error 1531: Invalid member of struct or union.
  431. *** Error code 1
  432.  
  433. I did the following changes:
  434.  
  435. --
  436. #ifndef NOVMEM
  437. #ifndef BSD
  438. /* For HP-UX 8.01, I changed the line:
  439.  
  440. #include <sys/var.h>
  441. to: 
  442. #include <var.h>
  443.  
  444. ARRGH!! This damned machine has not .v_pageshift structure!?! .
  445.  
  446. I have checked the /usr/include directory, and much to my horror, I have found
  447. various page sizes:
  448.  
  449. /usr/include > fgrep "page size" *
  450. a.out.h:#define EXEC_PAGESIZE   4096 not always the same as the MMU page size
  451.  
  452. /usr/include/sys > fgrep "page size" *
  453. sys/framebuf.h: locked page size = 2 ** 11 
  454. sys/unistd.h:#  define _SC_PAGE_SIZE   3001  PAGE_SIZE: Software page size
  455.  
  456. /usr/include/machine > fgrep "page size" machine
  457. machine/param.h:#define NBPG_PA83 2048      2kb page size for PA-RISC 1.0 
  458. */
  459.  
  460. /* So I try with the following test: */
  461. int
  462. getpagesize()
  463.  
  464. {            /* I think that machine/param.h has the right number */
  465. #include <machine/param.h>
  466.  
  467. return(NBPG_PA83);    /* This is supposed to be ok for PA-RISC 1.0, but
  468.                 I don't know about 1.1 (i.e. Snakes) */
  469.  
  470. }
  471.  
  472. /* I played with various combinations, but the examples on "Radiance tutorisl"
  473. keep crashing (the examples with rview give bus error/core dumps. Fighting
  474. with HP's debugger showed that the program was inside readobj.c, immediately
  475. after line 165 :
  476.  
  477.    165                          if (fscanf(fp, "%lf", &fa->farg[i]) != 1)
  478.  
  479. #ifdef REALSYSV
  480. int
  481. getpagesize()            /* use SYSV var structure to get page size */
  482.  
  483. etc...
  484.  
  485.  
  486. That's all I can do for the moment (I should go to the bed, you see... )
  487.  
  488. Have a nice weekend,
  489. Nick.
  490. -- 
  491. Nikolaos Fotis            National Technical Univ. of Athens, Greece
  492. 16 Esperidon St.,        UUCP:    mcsun!ariadne!theseas!nfotis
  493. Halandri, GR - 152 32        or InterNet : nfotis@theseas.ntua.gr
  494. Athens, GREECE            FAX: (+30 1) 77 84 578
  495.  
  496. Date: Thu, 12 Sep 91 09:11:54 +0200
  497. From: greg (Greg Ward)
  498. To: nfotis%theseas.ntua.gr@Csa2.lbl.gov
  499. Subject: Re:  Troubles with Radiance1R4
  500.  
  501. Yes, someone else has had trouble with HP workstations and my version
  502. of malloc.  The truth is, you don't need my version of malloc and it
  503. would probably make life simpler if you replaced the appearance of
  504. malloc.o with bmalloc.o in the Makefiles of the ot and rt directories.
  505. Also, you should compile bmalloc.c with the option -DALIGN=double for
  506. RISC architectures, something I should have included for HP workstations
  507. in the makeall script but didn't out of ignorance.  I recommend compiling
  508. bmalloc.c by hand in the ot and rt subdirectories, replacing malloc.o with
  509. bmalloc.o in the associated Makefile's, and rerunning makeall afterwards.
  510.  
  511. I hope that this fixes your problems.
  512. -Greg
  513.  
  514. ========================================
  515. DAYLIGHT    Radiance and Daylight Simulation
  516.  
  517. Date: Wed,  4 Sep 91 11:57:27 Z
  518. From: Environmental Design Unit <edu@leicester-poly.ac.uk>
  519. To: greg@lesosun1.epfl.ch
  520. Subject: Radiance
  521.  
  522. Dear Greg,
  523.  
  524. I have some more questions about Radiance and daylight factor calculation.
  525.  
  526. a) What is the latest version of Radiance currently avialable, and how
  527.    does is it differ from v1.3.1 with respect to df calc?
  528.  
  529. b) Any joy yet in dealing with adjacent spaces?
  530.  
  531. c) Is there a way of modelling external structures so that both the direct
  532.    AND diffuse daylight entering a space is modified? (A "fudge factor"
  533.    in the sky model?).
  534.  
  535. d) Specular reflections from (pseudo?) glazing elements - are they a
  536.    function of incidence angle?  (Reflections at grazing incidence
  537.    dominate for deep-well atria with glass 'walls').
  538.  
  539. Thanks in advance.
  540.  
  541. -John Mardaljevic
  542.  
  543. ps.  I realise I might be asking some difficult questions.
  544.  
  545. pps. It might not be a bad thing to warn any Radiance users moving in
  546.      the direction of df calcs about the dangers of using insufficiently
  547.      small source polygons for window elements (df>100% !!).
  548.  
  549. Date: Wed, 4 Sep 91 15:53:25 +0200
  550. From: greg (Greg Ward)
  551. To: edu@leicester-poly.ac.uk
  552. Subject: Re:  Radiance
  553.  
  554. Hi John,
  555.  
  556. a)
  557. I think it's really the next release of Radiance that you want.  Version 1.4
  558. has relatively few advantages in the daylight area over 1.3.1.  The release
  559. on which I am currently laboring (probably 2.0), has many more of the
  560. calculation capabilities that are needed for difficult daylight modeling
  561. and analysis.  In particular, there is a daylight factor calculation and
  562. visualization script that produces contour plots of the workplane (hallelujah)
  563. and additional capabilities built into Radiance itself for the simulation
  564. of daylight reflected from mirrored surfaces and so on.
  565.  
  566. b)
  567. I have not tried it out yet, but I think Radiance is now ready to tackle
  568. adjacent spaces to atria.  The key is a new program called mkillum that
  569. calculates in a separate pass the distribution of light from windows or
  570. other such "secondary" light sources.  In the process, mkillum accounts
  571. for all interactions including external obstructions and interreflections.
  572.  
  573. c)
  574. In older releases of Radiance, the only way to account properly for
  575. external obstructions (other than computing the distribution yourself)
  576. is to use the interreflection calculation to compute the contribution
  577. from the window, ie. do not make the windows into type illum.  This
  578. is even still the best method for offices with very large windows.
  579. (Avoiding the problem you mentioned in your P.S.)
  580.  
  581. d)
  582. Radiance surfaces obey Fresnel's laws where reflection goes
  583. to one and transmission goes to zero at grazing for specular surfaces.
  584. However, to properly account for reflected sunlight from atria walls,
  585. you must use the next release of Radiance with code for finding virtual
  586. light sources.  Previous releases cannot find secondary rays from such
  587. tiny sources as the sun.
  588.  
  589. If you want to be a beta test site for version 2.0, you need only ask.
  590. I would be happy to put together a current distribution for you to
  591. test.  I plan to make an official release near the end of this year.
  592.  
  593. -Greg
  594.  
  595. =======================================
  596. AMIGA        Radiance on the Amiga 2000
  597.  
  598. Date: Thu, 29 Aug 91 13:51:24 MED
  599. From: bojsen@dc.dth.dk (Per Bojsen)
  600. To: greg@hobbes.lbl.gov
  601. Subject: Distribution of a port of the RADIANCE package
  602.  
  603. Greg,
  604.  
  605. I'm currently porting your RADIANCE package to the Amiga.  I would
  606. like to distribute at least the binaries along with the data files
  607. necessary, but preferably the whole package including the patched
  608. sources.  Is it permitted to redistribute the package with pacthed
  609. sources?  If not, what parts of the package may be redistributed, if
  610. any?
  611.  
  612. --------------------------------------------------------------------------------
  613. Per Bojsen                The VLSI Research Group        EMail: bojsen@dc.dth.dk
  614. MoDAG                 Technical University of Denmark
  615. --------------------------------------------------------------------------------
  616.  
  617. Date: Thu, 29 Aug 91 14:02:57 +0200
  618. From: greg (Greg Ward)
  619. To: bojsen@dc.dth.dk
  620. Subject: Re:  Distribution of a port of the RADIANCE package
  621.  
  622. Hello Per Bojsen,
  623.  
  624. First off, let me thank you for porting the software.  I haven't used
  625. an Amiga myself, but I like what I've seen on it and it sounds like
  626. a great value.
  627.  
  628. Could you tell me a little about your experience bringing the software
  629. over?  Did you have to throw much out?  Do you have a display driver?
  630. Did you get rview to work?
  631.  
  632. Since no one has asked to redistribute a modified version of Radiance
  633. before, I think I will have to ask around and find out if it would
  634. be acceptable.  Our main concern I suppose is protecting the reputation
  635. of Lawrence Berkeley Lab (if it has one) against irresponsible changes.
  636. I'll try and get back to you by the end of next week.
  637.  
  638. -Greg
  639.  
  640. Date: Wed, 4 Sep 91 15:42:26 +0200
  641. From: her%compel.dk%dkuug.dk@Csa2.lbl.gov (Helge Egelund Rasmussen)
  642.  
  643. New RADIANCE 1R4 user...
  644. Mail address:
  645.     Helge E. Rasmussen
  646.     Compel A/S
  647.     Hvidovrevej 80
  648.     DK-2610 Roedovre
  649.     Denmark
  650. Phone: +45 36 72 33 00
  651. E-mail: her@compel.dk
  652. Machine: 386, Amiga
  653. System: Interactive Unix, AmigaDos
  654. Application:
  655.     Hobby, I've been working with lots of different renderes on the
  656.     Amiga.
  657.     I'm in the process of porting Radiance to the Amiga.
  658.     At the moment, nearly everything works except programs which use
  659.     the pipe system call (f.ex. pinterp). I've created a rview device 
  660.     driver for the Amiga HAM-E 'framebuffer', and created a picture 
  661.     converter to the Amiga IFF24 bit graphics format.
  662.     At the moment, I'm working on a converter which can convert 
  663.     Imagine objects and scenes to Radiance scenes (Imagine is a commercial
  664.     Amiga based render/animation package which has a rather good 
  665.     'triangle' based 3d editor).
  666.  
  667.     I can upload the patches for the Amiga version to hobbes if you are
  668.     interested.
  669.  
  670. Date: Wed, 4 Sep 91 17:17:48 +0200
  671. From: greg (Greg Ward)
  672. To: bojsen@dc.dth.dk, her@compel.dk
  673. Subject: Re:  Distribution of a port of the RADIANCE package
  674.  
  675. Dear Per Bojsen and Helge Rasmussen,
  676.  
  677. Thank you both for your work porting Radiance to the Amiga.  It is a shock
  678. to me that anyone has attempted this, let alone two people from the same
  679. country at the same time!
  680.  
  681. I have asked those in the know at LBL about the official policies on
  682. redistribution of software, and there don't appear to be any.  Therefore,
  683. I am going to make up my own policies, which I hope will be acceptable to
  684. everyone.
  685.  
  686. First off, I don't think we really need TWO ports of Radiance to the
  687. Amiga, so I would like the two of you to have a little discussion and
  688. fight it out among you to decide which and what to include in a distribution.
  689.  
  690. Second, I would like hobbes.lbl.gov to be used as the distribution site,
  691. at least for the time being.  Before the end of the year, I hope to set
  692. up a site here in Switzerland for distribution on the European continent
  693. that is identical to the one in California.  I have created a new directory
  694. in the anonymous ftp pub/ports subdirectory called "amiga".  I would like
  695. it very much if you (collectively) would deposit your patches for
  696. the Amiga plus any driver programs or routines you have written.  Please
  697. do not duplicate the main distribution as I would like people to continue
  698. to draw from the original for the sake of future compatibility.  Please also
  699. include a README file describing the contents of your directory so that other
  700. folks who are not so gifted (including myself) can figure out what to
  701. do with it.
  702.  
  703. Third, I don't really want the Amiga binaries all stored on hobbes because
  704. it would put quite a burden on my disk space and potentially on the network
  705. if everybody and his brother wants a copy.  Therefore, I would be delighted
  706. if you would distribute the executables yourself to interested parties via
  707. floppy disk or whatever transfer medium you prefer.  (I have been using
  708. floppies myself to distribute the MacIntosh A/UX version.)  I have no
  709. objection if you want to redistribute the source code as well, so long as
  710. you make it clear what version you are distributing and that the main site
  711. has the most recent version.
  712.  
  713. Thanks again guys.  Bravo!  Good work!  (And all that.)
  714.  
  715. -Greg
  716.  
  717. Date: Mon, 9 Sep 91 17:36:40 MED
  718. From: bojsen@dc.dth.dk (Per Bojsen)
  719. To: greg@lesosun1.epfl.ch
  720. Cc: her@compel.dk
  721. Subject: Distribution of a port of the RADIANCE package
  722.  
  723. Hello Greg,
  724.  
  725. > Thank you both for your work porting Radiance to the Amiga.  It is a shock
  726. > to me that anyone has attempted this, let alone two people from the same
  727. > country at the same time!
  728. >
  729. In fact it is a surprise for me too!  I don't know Helge personally,
  730. but I have seen him appear on USENET.
  731.  
  732. > First off, I don't think we really need TWO ports of Radiance to the
  733. > Amiga, so I would like the two of you to have a little discussion and
  734. > fight it out among you to decide which and what to include in a distribution.
  735. >
  736. I agree with that.  The discussion has started.  One thing we have to
  737. agree upon is whether we will support old versions of the Amiga
  738. operating systems, or only the newest.  As soon as we have compared
  739. our ports and agreed upon the patches we'll let you know!
  740.  
  741.                         Per.
  742.  
  743. ========================================
  744. COLORPICT    Using the Colorpict primitive
  745.  
  746. Date: Wed, 4 Sep 91 15:01:52 -0700
  747. From: chet@cs.uoregon.edu (Chet Haase)
  748. To: GJWard@Csa2.lbl.gov
  749. Subject: Colorpict function
  750.  
  751. Hi.  I'm trying to get the Colorpict pattern to work right now and can't
  752. seem to manage it.  I see it being used in example pictures (such as
  753. model.new), but the source for those pictures is not in our distribution
  754. (1.2?).  Is there more documentation or examples elsewhere that
  755. I could get ahold of?   The main error that's occurring is:
  756.     rview: rfuncname: undefined function,
  757. where rfuncname is the rfunc I've defined in the .cal file (which it is
  758. finding).   But then, I'm not really sure what I should be using for these
  759. functions without a good example to work from (all I want to do is a straight 
  760. mapping of the image onto a polygonal surface in another image, so I'm not
  761. sure what parameters I should be using), so the source of the problem
  762. may be elsewhere.
  763.  
  764. Thanks for your help.
  765.  
  766. Incidentally, I've been using your Architrion translator that you sent me help
  767. on last Fall and it works great.  Thanks.
  768.  
  769. Chet Haase
  770. CIS Department
  771. University of Oregon
  772.  
  773. Date: Thu, 5 Sep 91 10:28:04 +0200
  774. From: greg (Greg Ward)
  775. To: chet@cs.uoregon.edu
  776. Subject: Re:  Colorpict function
  777.  
  778. Hi Chet,
  779.  
  780. You've discovered the worst documented part of Radiance -- function files!
  781. One day, I hope to make all this clear to people, but as you can see it
  782. is very muddy water.
  783.  
  784. First off, rfuncname is just an example to get you to pick your own name
  785. as appropriate for your material.  Each of the primary color functions is
  786. a function of the three input primaries, thus allowing any mapping.  A
  787. straightfoward mapping (as defined in rayinit.cal) is:
  788.  
  789.     red(r,g,b) = r;
  790.     green(r,g,b) = g;
  791.     blue(r,g,b) = b;
  792.  
  793. You may want to use the clip_r, clip_g and clip_b functions instead to
  794. prevent reflectances greater than one (a no-no in any physical simulation).
  795.  
  796. An example of this should be contained in the file "picture" in the directory
  797. model.new.  The actual files used, picture.cal and pine.pic, should be found
  798. in the Radiance library location (ray/lib in the distribution).  The additional
  799. arguments at the end of the colorpict define a transformation to get from
  800. the world coordinates to the coordinates desired for the picture, pic_u and 
  801. pic_v.
  802.  
  803. If you can't find the files or have other specific questions, I'll be happy to
  804. help.  Otherwise, you could tell me exactly what you want and I could do it
  805. for you as the most appropriate example.
  806.  
  807. -Greg
  808.  
  809. Date: Thu, 5 Sep 91 13:27:40 -0700
  810. From: chet@cs.uoregon.edu (Chet Haase)
  811. To: GJWard@Csa2.lbl.gov
  812. Subject: colorpict revisited
  813.  
  814. I couldn't find any of the examples you listed except picture.cal and the 
  815. picture only for model.new; I couldn't find the model.new directory or
  816. the pine file in either the radiance directory on the system or the latest distribution tape we have (1.3.1).  So while I kind of understand what
  817. I'm supposed to do, I'm apparently not getting the format or usage right
  818. because I keep getting the same errors.  
  819.  
  820.  
  821.  
  822.  
  823. I'll describe my situation a bit more clearly (hopefully):
  824.  
  825. I've got a picture called rgb.pic of a monitor screen and I'd like to map
  826. it into a scene in which I've defined a monitor.  Using the functions in
  827. rayinit.cal and picture.cal as models, I've defined my own functions in
  828. rgbpic.cal:
  829. {
  830.     rgbpic.cal
  831. }
  832.  
  833. clip_r(r,g,b) = min(r,1);
  834. clip_g(r,g,b) = min(g,1);
  835. clip_b(r,g,b) = min(b,1);
  836. rgb_u = 1;
  837. rgb_v = 1;
  838.  (Note - these are perhaps silly functions for doing what I want, but at this
  839. stage I just want to get the thing to compile)
  840.  
  841. I then try to map the picture with colorpict using this .cal file like so
  842. void colorpict rgbpic
  843. 7
  844.     clip_r(0,0,0) clip_g(0,0,0) clip_b(0,0,0) rgb.pic
  845.     rgbpic.cal rgb_u rgb_v 
  846. 0
  847. 0
  848.  
  849. rgbpic plastic rgbimage
  850. 0
  851. 0
  852. 5 1 1 1 .05 0
  853.  
  854. rgbimage polygon rgbpicture
  855. 0
  856. 0
  857. 12
  858.     .13 .481 .13
  859.     1.21 .481 .13
  860.     1.21 .481 .96
  861.     .13 .481 .96
  862.  
  863.  
  864. When I attempt to run rview on the .oct file, however, I get the error:
  865. rview: clip_r(0,0,0): undefined function
  866.  
  867. Since it does find the .cal file (I've got RAYPATH defined correctly),
  868. I don't understand why it's not using the function I've defined.
  869.  
  870.  
  871.  
  872. SO, the main problems I'm having are:
  873. 1) the above function error and how to avoid it
  874. 2) what functions/values I should be using for this purpose - I don't really
  875. want to do anything funky with textures or colors, I simply want to map
  876. the picture directly over what's in the scene.
  877.  
  878. If that model.new file would show me more about how to do this, I'd love to
  879. see it.  The closest example I've found here is the source for the tennis
  880. ball picture, but it wasn't quite enough for me to get the colorpict usage
  881. down...
  882.  
  883.  
  884. Thanks for your help.
  885.  
  886. Chet.
  887.  
  888. Date: Fri, 6 Sep 91 10:05:26 +0200
  889. From: greg (Greg Ward)
  890. To: chet@cs.uoregon.edu
  891. Subject: Re:  colorpict revisited
  892.  
  893. Hi Chet,
  894.  
  895. I'll offer the following changes to the file, and hopefully you can
  896. get this to work.
  897.  
  898. ----------------------
  899. rgbpic.cal:
  900. {
  901.     rgbpic.cal
  902. }
  903.  
  904. clip_r(r,g,b) = min(r,1);
  905. clip_g(r,g,b) = min(g,1);
  906. clip_b(r,g,b) = min(b,1);
  907. rgb_u = (Px-.13)/(.96-.13);     { was rgb_u = 1; }
  908. rgb_v = (Pz-.13)/(.96-.13);    { was rgb_v = 1; }
  909.  
  910. ----------------------
  911. Radiance file:
  912.  
  913. #
  914. # Took out the arguments for the following:
  915. #
  916. void colorpict rgbpic
  917. 7
  918.     clip_r clip_g clip_b rgb.pic
  919.     rgbpic.cal rgb_u rgb_v 
  920. 0
  921. 0
  922.  
  923. rgbpic plastic rgbimage
  924. 0
  925. 0
  926. 5 1 1 1 .05 0
  927.  
  928. rgbimage polygon rgbpicture
  929. 0
  930. 0
  931. 12
  932.     .13 .481 .13
  933.     1.21 .481 .13
  934.     1.21 .481 .96
  935.     .13 .481 .96
  936.  
  937. -------------------------
  938.  
  939. The coordinate mapping I have made is based on the location, orientation,
  940. and size of the polygon in your file.  If any of these things change, you
  941. will have to change the coordinate mapping.  The simpler way to do this
  942. is to use picture.cal and add a transformation to the colorpict primitive,
  943. but since you're just trying to get it to work for now, I wanted to stay
  944. as close to your original as possible.
  945.  
  946. The scalefactors for pictures is determined based on the aspect ratio.  I'm
  947. assuming that your picture has square pixels and will fill the polygon you
  948. have supplied, thus the horizontal (x) dimension is larger.  Quoting from
  949. the Radiance reference manual (ray.1):
  950.  
  951.     The dimensions of the image data are determined by the picture
  952.     such that the smaller dimension is always 1, and the other
  953.     is the ratio between the larger and the smaller.
  954.     For example, a 500x338 picture would have coordinates (u,v)
  955.     in the rectangle between (0,0) and (1.48,1).
  956.  
  957. Hope this works!
  958. -Greg
  959.  
  960. Date: Fri, 6 Sep 91 16:31:05 -0700
  961. From: Chet Haase <chet@cs.uoregon.edu>
  962. To: greg@lesosun1.epfl.ch
  963. Subject: Re: colorpict revisited
  964.  
  965. That was the kind of help I needed - problem solved.
  966.  
  967. Thanks,
  968. Chet.
  969.  
  970. ===============================================
  971. DOS        Radiance under DOS?
  972.  
  973. Date: Thu, 5 Sep 91 17:26:24 PDT
  974. From: Donald Yett <dyett@phad.hsc.usc.edu>
  975. To: greg@hobbes.lbl.gov
  976. Subject: Radiance questions
  977.  
  978. Hi, I just grabbed the Radiance package and related files from the ftp site.. 
  979. I do have a few questions in hand.
  980.  
  981. 1). Has this ever been ported to (please don't flame me!) DOS?
  982.  
  983. 2). Is there a translator to convert the output to (yea I know it's limited
  984. format) GIF?
  985.  
  986. In this day and age of 40-MIPS / 160 MFLOPS PC's I think it is a valid
  987. question, even though I don't condone people wasting their money just to run
  988. DOS!
  989.  
  990. (Yea I said 160 MFLOPS!  Although that board would cost the end-user about
  991. $15k...)
  992.  
  993. Date: Fri, 6 Sep 91 09:22:26 +0200
  994. From: greg (Greg Ward)
  995. To: dyett@phad.hsc.usc.edu
  996. Subject: Re:  Radiance questions
  997.  
  998. No, no one I know of has ported it to DOS yet, but there is now an Amiga
  999. version they tell me and I use it on the Mac under A/UX and plenty of
  1000. folks have gotten it on their IBM RS/2 running AIX.
  1001.  
  1002. You are not the first to ask me this question, but since DOS is limited
  1003. in so many ways with virtually no standard graphics interface, I
  1004. haven't felt it was worth my time to attempt a port.  Even if I did
  1005. port the software to a DOS platform that could handle it, I'then get
  1006. hundreds of people coming to me with questions like, "I tried to get
  1007. Radiance to run on my IBM AT and it said something about a memory
  1008. error.  Do I need a hard drive?"  So, I don't think I'll be porting
  1009. Radiance to MS-DOS in my lifetime.  Any takers?
  1010.  
  1011. I have done some work on translators lately, but have not written anything
  1012. for GIF.  I have now a Poskanzer Pixmap translator and one for the TIFF
  1013. format, but gave up on Utah RLE format because it was too complicated and
  1014. GIF because it's only 8 bits and rather nasty itself.
  1015.  
  1016. My best advice is to pick up the pbmplus package which offers translation
  1017. between many different image format "standards", including Targa and GIF,
  1018. so you can get from Radiance to the format you want.  The pbmplus distribution
  1019. is available via anonymous ftp from export.lcs.mit.edu (18.30.0.238)
  1020. in the file "contrib/pbmplus.tar.Z".  Not everything works perfectly,
  1021. but it's the best package I know of in the public domain.  Personally,
  1022. I prefer PhotoShop from Adobe, which does image manipulation as well as
  1023. import/export from many formats.
  1024.  
  1025. -Greg
  1026.  
  1027. ==========================================
  1028. RVIEW        Rview and memory
  1029.  
  1030. Date: Thu, 5 Sep 91 09:04:54 EST
  1031. From: vanwyk@arc.cmu.edu (Skip Van Wyk)
  1032. To: greg@lesosun1.epfl.ch
  1033. Status: RO
  1034.  
  1035. Greg, I got the conf model up and running.  I have 16MB on this
  1036. Sparc2.  Though it is also configured as a server for 8 accounts, right
  1037. now they are inactive.
  1038.  
  1039. Anyway, the conf scene cooked away for about 2.5 hours before I went
  1040. home last night; it looked good, even in 8bit.  Sometime during the
  1041. night, I got the message
  1042.  
  1043. rview: system - out of memory in refine:  Not enough memory
  1044. *** Error code 2
  1045.  
  1046. What kind of memory do you have?  And would everything have worked if I
  1047. logged out?
  1048.  
  1049. --Skip
  1050.  
  1051. Date: Fri, 6 Sep 91 10:11:57 +0200
  1052. From: greg (Greg Ward)
  1053. To: vanwyk@arc.cmu.edu
  1054. Subject: rview and memory
  1055.  
  1056. Hi Skip,
  1057.  
  1058. The problem is that you shouldn't be using rview to do your rendering.
  1059. You should use it to figure out what view you want, write it out with
  1060. the view command, then use rpict with the -vf option to read the view
  1061. and render the file in the background.  Rview is meant to be a previewer,
  1062. and uses up tons of memory as it goes to higher resolutions.  I've made
  1063. an enhancement for the next release that keeps rview from bombing when
  1064. it runs out of memory, but it will still run out of memory if you haven't
  1065. enough swap space on your disk.  A simple example of an rpict command is:
  1066.  
  1067.     % rpict -vf myview.vp -av .04 .04 .04 electric.oct > myview.pic &
  1068.  
  1069. Afterwards, you can logout and come back in the morning to see if the
  1070. process is still running (using ps).  The values for -av I selected for
  1071. the conference room model in particular, and they would be different for
  1072. a different scene.  (I'm also assuming that you did a "view myview.vp"
  1073. command in rview or you can use one of the provided view files in the
  1074. vf subdirectory instead.)
  1075.  
  1076. -Greg
  1077.  
  1078. ===================================================
  1079. LIGHTS        Non-standard Light Sources
  1080.  
  1081. Date: Sat, 7 Sep 1991 15:18 EDT
  1082. From: elci@pluto.gs.com (Reha Elci)
  1083. Subject: radiance 4.0 questions + problems
  1084. To: GJWARD@Csa2.lbl.gov
  1085.  
  1086. First, I'd like to say that this is really a great package for learning and
  1087. production! Thanks for making this available on the net. I have a DECStation
  1088. with a PXG card; and the only problem I had so far is that ximage does not
  1089. work (probably does not recognize the visual); it produces no picture and
  1090. a lot of XServer errors (bad value). Currently I do a pvalue the pic file into
  1091. an rle file to display it.
  1092.  
  1093. But I have a question as well; cylinders as light sources are not supported
  1094. neither is "glow" applied to plastic or dielectric. So how does one go 
  1095. about doing neon lights or glowing rubys? Those examples would truly
  1096. demonstrate the power of radiosity. Testing for a maximum radius for shadow
  1097. testing (like you support on glow) would even make it better! Is there a
  1098. work around? Thanks for all your help.
  1099.  
  1100. Reha Elci
  1101.  
  1102. PS: Please add me to the newuser list; the automatic mailing failed since
  1103. my mail does not go thru to internet directly. Thanks.
  1104.  
  1105. Date: Thu, 12 Sep 91 11:19:22 +0200
  1106. From: greg (Greg Ward)
  1107. To: elci@pluto.gs.com
  1108. Subject: Re:  radiance 4.0 questions + problems
  1109.  
  1110. Dear Reha,
  1111.  
  1112. I am sorry but I don't think I can help you with your ximage problems.
  1113. I have found it very difficult to debug such things remotely, and X11
  1114. servers seem to be particularly flakey when it comes to color.  For
  1115. example, I know very well that 24-bit color does not work properly
  1116. in ximage, but I have no hardware to test it on and the hardware I
  1117. have tried seems unreliable.
  1118.  
  1119. I do plan to make cylinders usable as light sources in the near future,
  1120. but until then the only way to model neon tubes is to break the tubes
  1121. into many small polygons.  You can use gensurf to help you with that.
  1122. An example to create a tube of length 1 and radius .05:
  1123.  
  1124.     gensurf neon lamp '.05*sin(2*PI*t)' '.05*cos(2*PI*t)' 's' 20 6
  1125.  
  1126. You would then define the neon material using type glow with a maximum
  1127. radius of .5 (if you only wanted to illuminate nearby objects):
  1128.  
  1129.     void glow neon
  1130.     0
  1131.     0
  1132.     4 20 1 2 .5
  1133.  
  1134. As for glowing jewels, I'm not sure what you suggest is really physical.
  1135. Gems usually "glow" because of light reflected many times within the
  1136. stone and scintillation processes (in rubies for example).  You can
  1137. simulate this in Radiance by giving the red transmission coefficient
  1138. for a dielectric a value greater than one.  Note that giving values
  1139. greater than one for all three coefficients would mean that the
  1140. material was generating radiation -- which would be wrong in the
  1141. case of non-radioactive materials.
  1142.  
  1143. Hope this helps.
  1144. -Greg
  1145.  
  1146.