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

  1. ~sRadiance Digest, v2n3
  2. Dear Radiance Users,
  3.  
  4. Here is the latest culling of mail messages from users with questions
  5. about Radiance.  The topics are as follows:
  6.  
  7.     CYLINDER SOURCES    What kind of cylinder may be a light source?
  8.     GETTING STARTED        Documentation and modeling without CAD
  9.     NUMERICAL OUTPUT    Calculating point illuminances
  10.     PCOMPOS            Overcoming pcompos input limits
  11.     USER INTERFACE        Advice on creating a user interface
  12.     OCONV SET OVERFLOW    What causes "set overflow" error in oconv?
  13.     HEIGHT FIELDS        How to use gensurf to create height fields
  14.     COMPILATION QUESTIONS    Problems compiling on NeXT and with GNU-C
  15.     ANIMATION SPLINES    Using Catmull-Rolm splines for camer animation
  16.     RA_PICT            Transferring output of ra_pict to Macintosh
  17.     LIGHT SOURCES        Problems with light sources
  18.     HARTMANN CONSTANT    What is it?
  19.     SPOTLIGHTS        Questions about spotlight type
  20.  
  21. I hope you find the information useful.
  22.  
  23. -Greg
  24.  
  25. =============================================
  26. CYLINDER SOURCES
  27.  
  28. Date: Tue, 2 Jun 92 14:46:48 NZT
  29. From: pdbourke@ccu1.aukuni.ac.nz
  30. Subject: cylinders & lights
  31. To: GJWard@lbl.gov
  32.  
  33. In section 2.1.2 of the Radiance manual in the section on materials
  34. and the light material you say...
  35. "..., cylinders (provided they are long enough),...can act as light sources.
  36.  
  37. What exactly (or inexactly) does "long enough" mean?
  38. ------------------------------
  39. Paul D. Bourke                             School of Architecture
  40. pdbourke@ccu1.aukuni.ac.nz                 Auckland University
  41.  
  42. Date: Tue, 2 Jun 92 12:36:38 PDT
  43. From: greg (Gregory J. Ward)
  44. To: pdbourke@ccu1.aukuni.ac.nz
  45. Subject: Re:  cylinders & lights
  46.  
  47. Well, it's not a fatal error if the cylinder is too short, but cylinders
  48. in general are imperfect as light sources because I send a ray to the
  49. center of the object, and if it comes in axially, then it can pass right
  50. through the source.  You will get warnings if your cylindrical sources are
  51. too short.  I recommend a ratio of length to diameter of 4 or more.
  52.  
  53. -Greg
  54.  
  55. =========================================================
  56. GETTING STARTED
  57.  
  58. Date: Wed, 3 Jun 92 04:19:06 PDT
  59. From: logan%cs@hub.ucsb.edu (Bruns)
  60. To: GJWard@lbl.gov
  61. Subject: The "Radience Reference Manual"
  62.  
  63. I printed out the Mac document files in which there are many references
  64. to said manual.  Where could I obtain this from?  Or do I already have it
  65. and don't know it?
  66.  
  67. Also, I would appreciate any advice for people who do not have access to
  68. CAD.  Currently I plan to write short C rountines which would create objects
  69. in various positions based upon input parameters.  (for example I might
  70. have a program which would generate a flexible desk lamp and would
  71. accept parameters to determine relative positions of its pieces.)
  72.  
  73. However, I am new to this and would appreciate any advice you could give
  74. me.
  75.                     Sincerely yours,
  76.                     Logan O'Sullivan Bruns
  77.  
  78. Date: Wed, 3 Jun 92 14:16:09 PDT
  79. From: greg (Gregory J. Ward)
  80. To: logan%cs@hub.ucsb.edu
  81. Subject: Re:  The "Radience Reference Manual"
  82.  
  83. Hi Logan,
  84.  
  85. The "Radiance Reference Manual" is distributed in the form of a troff
  86. document in the ray/doc directory.  It is the file "ray.1" in that directory.
  87. There is also a short tutorial, called "tutorial.1".  You should at least have
  88. nroff on your system, and you can print out these files like so:
  89.  
  90.     % nroff -ms ray.1 | lpr
  91.     % nroff -ms tutorial.1 | lpr
  92.  
  93. Most sytems also have a more sophisticated text formatter, such as ditroff or
  94. psroff or troff or some such.  Ask your system administrator about how to get
  95. decent troff output.
  96.  
  97. I wish I could offer some helpful insights to you about modeling without CAD.
  98. I have done it for many years myself, and it's not all that easy.  You can
  99. get some distance using the Radiance generators (genbox, genrev, gensurf, 
  100. genprism, etc) in conjunction with the scene transformer, xform.  The Mac
  101. user's manual does a pretty good job describing how this is done.
  102.  
  103. Best of luck!
  104. -Greg
  105.  
  106. ==============================================================
  107. NUMERICAL OUTPUT
  108.  
  109. [The following is in response to some faxed questions from Xabier Gorritxategi
  110.  (good thing this isn't voice-mail) about using Radiance to compute values.]
  111.  
  112. Date: Fri, 5 Jun 92 09:38:43 PDT
  113. From: greg (Gregory J. Ward)
  114. FAXnumber: 01134943796944
  115. FAXto: "Xabier Gorritxategi, IKERLAN"
  116. Status: R
  117.  
  118. Dear Xabier,
  119.  
  120. I am glad that you have been using Radiance so successfully in your work.
  121. You can use the program "rtrace" to get numerical output, such as luminance
  122. and illuminance values, from numerical input such as point locations.  Since
  123. Radiance uses radiometric units, such as radiance and irradiance, conversion
  124. is necessary if you want to get results in photometric units.  This is:
  125.  
  126.     photometric unit = (.3*r + .59*g + .11*b) * 179 lumens/watt
  127.  
  128. The value of 179 is the luminous efficacy of uniform white light, which
  129. is the default value used by programs that take photometric units and
  130. produce Radiance source descriptions (such as ies2rad and gensky).  The
  131. three coefficients, .3, .59 and .11 are the relative contributions of
  132. the standard red, green and blue to luminance.  (There is actually a
  133. slightly more accurate conversion stored in ray/src/common/color.h, but
  134. this more common approximation is good enough for most applications.)
  135.  
  136. As an example of producing illuminance values at regularly spaced points
  137. on a 4x5 workplane, you might use the following command:
  138.  
  139.     % cnt 3 4 | rcalc -e '$1=$1+.5;$2=$2+.5;$3=1;$4=0;$5=0;$6=1' \
  140.         | rtrace -h -I [options] octree \
  141.         | rcalc -e '$1=179*(.3*$1+.59*$2+.11*$3)' > outfile
  142.  
  143. Note that rcalc was used to massage both the input and the output to
  144. rtrace.  Rcalc is a standard program distributed with Radiance, and
  145. it has quite a number of mathematical functions not found in the
  146. standard UNIX program "awk", plus it is easier to use.  (I think.)
  147. Note that the output file will not contain the point locations.
  148. If you want them, you can add them with a post-process like so:
  149.  
  150.     % cnt 3 4 | rcalc -e '$1=$1+.5;$2=$2+.5' | lam - outfile > values
  151.  
  152. Lam is another program distributed with Radiance, and it merely concatenates
  153. lines from multiple files (one of which is the standard input in this example).
  154.  
  155. I hope that this helps you with some of the more esoteric features of Radiance.
  156. I want to make these sorts of calculations more straightforward for designers,
  157. if I can only get the funding from Washington, D.C.
  158.  
  159. -Greg
  160.  
  161. =========================================================
  162. PCOMPOS
  163.  
  164. Date: Thu, 11 Jun 92 9:16:29 NZT
  165. From: pdbourke@ccu1.aukuni.ac.nz
  166. Subject: question
  167. To: GJWard@lbl.gov
  168.  
  169. Before I start pawing over the code can you give me an idea of how hard it
  170. might be to increase the maximum frames for pcompos from 32 to a larger number.
  171. I am creating 64x64 renderings as tests for animation flightpaths and it would
  172. be useful to be able to pcompos larger matrices, for example 10x10.
  173. ------------------------------
  174. Paul D. Bourke                             School of Architecture
  175. pdbourke@ccu1.aukuni.ac.nz                 Auckland University
  176.  
  177. Date: Thu, 11 Jun 92 12:18:03 PDT
  178. From: greg (Gregory J. Ward)
  179. To: pdbourke@ccu1.aukuni.ac.nz
  180. Subject: Re:  question
  181.  
  182. There is a macro called MAXFILE near the top of pcompos.c that you can
  183. easily change to be whatever you want.  You may have another problem though
  184. if you run into the system limit on the number of open files a process can
  185. have.  Another way to construct large matrices of images is of course to
  186. create several small matrices and put them all together with pcompos at
  187. the end.
  188.  
  189. -Greg
  190.  
  191. ================================================================
  192. USER INTERFACE
  193.  
  194. Date: Wed, 10 Jun 92 19:18:49 -0400
  195. From: Jim Callahan <jmc@ugrad.ee.ufl.edu>
  196. To: GJWard@lbl.gov
  197. Subject: Radiance as a tool for Architecture
  198.  
  199.     I just recently acquired the 2.0 version of Radiance and was *very*
  200. impressed with it.  I am interested in using this program to render some of
  201. my designs for school and thought you might have some experience with this
  202. sort of thing.  
  203.  
  204.     Have you or others developed any generator programs which are
  205. specific to architectural design?  Texture functions?  Objects?  If so,
  206. where can I find them? 
  207.  
  208.     Also, I am in the process of developing a Graphic User Interface
  209. (GUI) to the oconv, rpict, pcompos, and pfilt programs using the InterViews
  210. C++ library written by Mark Linton of Stanford (it is available via
  211. anonymous at interviews.stanford.edu). Like you, he has developed a very
  212. powerful program and is willing to share it for free.  We all owe you for
  213. your generosity.  If you are willing, I'd like to distribute my interface
  214. at your site as soon as it is up and running (and bug free I hope).
  215.  
  216.     I may soon be purchasing a SGI machine if I can scrape up the
  217. money and my next project will be to write a 3d interactive "front end" for
  218. designing scenes.  It would allow the user to design in 3d enviroment
  219. rather than using clumsy 2d orthagonal views and allow the construction of
  220. agregate object libraries. Radiance seems to be the best "free" tool for
  221. producing the final images I have seen.  Could you suggest features/options
  222. that you would like to see in something like this.  I would be willing to
  223. distribute this software for no charge.  I believe that the best software
  224. is written by people who need a solution to a problem NOT by money hungry
  225. programmers.  These kind of tools should be shared so that we can build on
  226. each others work (but I guess you don't need to be told all this).
  227.  
  228.     Once again, GREAT JOB!  Thanks for the program and the help.
  229.  
  230.                         - Jim
  231. Date: Sat, 13 Jun 92 09:48:35 PDT
  232. From: greg (Gregory J. Ward)
  233. To: jmc@ugrad.ee.ufl.edu
  234. Subject: Re:  Radiance as a tool for Architecture
  235.  
  236. Dear Jim,
  237.  
  238. Thank you for your nice letter, and for your interest in our software.  I
  239. have wanted for some while to work on a user interface for Radiance, but
  240. have had neither the time nor the funds to pursue it.  Of course, I would
  241. be delighted if you would work on a GUI and make it available to people.
  242. The thing that I have found to be most important in distributing software
  243. is to make sure that there is a common base.  In my case, that means UNIX
  244. and K&R C (boring as that may be).  I have not played with the library you
  245. mentioned, partly because I don't get around the network much so I hadn't
  246. heard of it, and partly because I don't have and cannot afford a C++
  247. compiler.  (Actually, maybe the compiler's not so expensive, but I would
  248. have to buy a new machine to run it on!)
  249.  
  250. There is much work to be done before Radiance is truly useful as a design
  251. tool, I think.  The main problem is that it is too general a lighting
  252. simulation, and doesn't know a thing about architecture or architectural
  253. design.  Radiance has no notion of human scale or what a door is or a
  254. window or a space.  It only knows geometry and materials, placing all
  255. the burden of description and interpretation on the user.  This may be
  256. all right for the user with time on his hands, but it's unacceptable
  257. for the practicing designer, who needs to talk to a design tool in his
  258. or her own language.  That is what a user interface is all about.
  259.  
  260. I need to get to work talking to practicing architects and designers so
  261. I can start to bridge this gap between design and simulation.  I may not
  262. get to the graphical part of the user interface for some time.  Most of
  263. my work will entail writing programs and scripts to perform particular
  264. design evaluation tasks and take some of the burden of description and
  265. interpretation off of the user.  I'm not sure I'm even the best person
  266. to work on the final graphical user interface, so I am quite open to
  267. working with someone else on that part of it.
  268.  
  269. I, too, have a lot of respect for people who work long and hard on
  270. a program for little or no money, then make it available for free
  271. to others.  Many would even cast such people in the role of heroes,
  272. though I might not go that far.  But I'm not one of those people.
  273. I was paid well for my efforts by the Department of Energy, and
  274. have been very lucky to work on something I enjoy and get money
  275. for it besides.  The reason Radiance is "free" is because it has
  276. already been paid for by government taxes!
  277.  
  278. I agree with you that programs are best developed by those who are
  279. very familiar with the task involved.  I wish I knew more about lighting
  280. design and architecture for that reason.  My hope is to get people like
  281. you to do the real work of user interface design for me, but I don't
  282. expect you to do it for nothing.  You should expect some sort of
  283. compensation for your efforts.  Don't devalue yourself.  Programmers
  284. doing interesting work rarely make much money -- there's no reason
  285. for the MicroSofts and IBMs of the world to take it all with our consent.
  286. Even if you're not a money-grubbing bastard, you've still got to eat.
  287.  
  288. The only models and programs that I have are on the hobbes.lbl.gov ftp
  289. server in the pub subdirectories.  Help yourself, and please do add to
  290. our little collection if you can.
  291.  
  292. -Greg
  293.  
  294. P.S.  Hobbes address is 128.3.12.38.  Also note that Radiance is now
  295. in release 2.1.  Where is everyone getting these outdated copies?!
  296.  
  297. =======================================================
  298. OCONV SET OVERFLOW
  299.  
  300. From: phils@Athena.MIT.EDU
  301. Date: Mon, 15 Jun 92 11:59:43 -0400
  302. To: greg@hobbes.lbl.gov
  303. Subject: overflow problem.
  304.  
  305. Hi Greg,
  306.  
  307. We're trying to trace a BIG model are getting the following error: 
  308. <79> oconv -w sky.rad plot.rad > plot.oct
  309. oconv: internal - set overflow in addobject (poly12914)
  310.  
  311. This is the Washington D.C. monumental core (about 21,000) polygons.
  312. But this is a BIG Vax 9000 with 500 meg. RAM so memory should not be a
  313. problem.  Any ideas?
  314.  
  315. Thanks,
  316.  
  317. Philip
  318.  
  319. Date: Mon, 15 Jun 92 09:34:06 PDT
  320. From: greg (Gregory J. Ward)
  321. To: phils@Athena.MIT.EDU
  322. Subject: Re:  overflow problem.
  323.  
  324. Hi Phil,
  325.  
  326. The cause of this error is either many overlapping surfaces (ie. coincident),
  327. which would probably mean an error in the model, or that the enclosing global
  328. cube is too large with respect to the detail in the model.  Check out the
  329. manual page for oconv.  You can try increasing the octree resolution with
  330. the -r option.  Set it to the maximum overall dimension of your scene
  331. divided by the size of a relatively small surface, and you should be OK.
  332.  
  333. -Greg
  334.  
  335. ======================================================================
  336. HEIGHT FIELDS
  337.  
  338. To: greg@hobbes.lbl.gov
  339. Subject: Gensurf file in Radiance
  340. Date: Wed, 17 Jun 92 09:45:31 EDT
  341. From: Gilbert Leung <gleung@Athena.MIT.EDU>
  342.  
  343. Hi,
  344.  
  345.     We are running your program Radiance and want to use the gensurf
  346. command.  But there is little, if any then unclear, information about the
  347. coordinate files that gensurf reads.  Can you send us some more details
  348. about this or at least point us to the right direction?  A/some sample file(s)
  349. that gensurf reads will be great.
  350.  
  351. Sincerely yours,
  352. Gilbert Leung
  353.  
  354. To: greg@hobbes.lbl.gov
  355. Subject: freadscan vs freadcolr
  356. Date: Wed, 17 Jun 92 18:29:54 EDT
  357. From: Philip  Thompson <phils@Athena.MIT.EDU>
  358.  
  359. Hi,
  360.  
  361. I'm trying to update my ra_xim code and have noticed that you
  362. now use freadcolr a lot more often.  Is freadscan now obsolete?
  363.  
  364. Also, we're trying to get DEMs (Digital Elevation Maps) into
  365. radiance.  Do you have an example of a height field in action?
  366. or sample input to gensurf?
  367.  
  368. Thanks,
  369. Philip
  370.  
  371. Date: Wed, 17 Jun 92 15:52:16 PDT
  372. From: greg (Gregory J. Ward)
  373. To: gleung@Athena.MIT.EDU, phils@Athena.MIT.EDU
  374. Subject: Re: gensurf height functions
  375.  
  376. Dear Gilbert and Philip,
  377.  
  378. Here is a simple example of gensurf using height information from a file:
  379.  
  380.     gensurf dirty ground '40*s' '30*t' height.data 4 3 -s
  381.  
  382. Where height.data contains the following:
  383.  
  384.     10.35    15.78    13.33    12.15    10.72
  385.     11.77    14.55    14.15    13.37    12.20
  386.     12.21    14.31    14.93    13.75    13.71
  387.     11.35    14.05    14.75    12.91    13.35
  388.  
  389. The formatting of the data file is irrelevant, but the number and ordering
  390. of points matters.  Since I have specified 20 points, which is (4+1)*(3+1),
  391. gensurf will interpret these as vertex heights rather than centroid heights.
  392. If I had given anything other than 12 or 20 points, gensurf would have
  393. reported an error.  The -s option performs surface normal interpolation
  394. for smoothing the data, but in any case 12 polygons would have been produced.
  395.  
  396. If I wanted to take x and y coordinates from a data file as well, I would
  397. have used a command like:
  398.  
  399.     gensurf ugly object object.data object.data object.data 4 3
  400.  
  401. The file "object.data" should contain either 12 or 24 triplets (ie. 36 or
  402. 72 floating point values) corresponding either to the centroid or vertex
  403. locations of each surface, respectively.  The triplets would appear as:
  404.  
  405.     x0 y0 z0    x1 y1 z1    x2 y2 z2    ...
  406.  
  407. in the input file.  The repetition of the file name, although awkward,
  408. was done that way to avoid more compilcated argument specification and
  409. so that I could without too much trouble allow for separate coordinate
  410. input files if someone needed that in the future.
  411.  
  412. In response to Philip's question about freadcolrs(), it is much faster than
  413. freadscan(), and when combined with setcolrgam() and colrs_gambs(), can do
  414. gamma correction as well on 24-bit pixels.  You can look at ra_skel.c in
  415. the src/px directory to see how this is done.
  416.  
  417. -Greg
  418.  
  419. =============================================================
  420. COMPILATION QUESTIONS
  421.  
  422. From: desilva@ced.berkeley.edu
  423. Subject: compile
  424. To: greg@hobbes.lbl.gov
  425. Date: Thu, 18 Jun 92 21:12:52 PDT
  426.  
  427. Hello again,
  428.  
  429. I'm trying compile the new version on Irix 4.0 and I can't 
  430. get ximage to work. The error message I'm receiving is:
  431.  
  432. X Error of filed request: BadMatch (invalid parameter attributes)
  433.   Major opcode of failed request: 1 (X_CreateWindow)
  434.   Serial number of failed request: 4
  435.   Current serial number in output stream: 18
  436.  
  437. Rview appears to working just fine. Do any of the X app-defaults
  438. need to be set? 
  439.  
  440. All of our irises have at least 16 megs of ram and a few have
  441. more than 24 megs. Should answer yes or no the "more than 24 megs?"
  442. question. We also just got one of the new SGI Crimsons with
  443. the 64bit R4000 CPU. I was using the Crimson to compile Radiance
  444. on it. I'm still in the process of setting it up and installing
  445. Irix 4.04 on all the other machines.
  446.  
  447. Deanan
  448.  
  449. Date: Fri, 19 Jun 92 08:45:21 PDT
  450. From: greg (Gregory J. Ward)
  451. To: desilva@ced.berkeley.edu
  452. Subject: Re:  compile
  453.  
  454. Hi Deanan,
  455.  
  456. You should pick up the revised files in the pub/patch directory to get
  457. rview and ximage to work better with the SGIs.  I would answer "yes" to
  458. the question about "more than 24 megs".  The only difference between
  459. version 3.x and 4.x of IRIX is the compiler switch to get K&R C and
  460. the fact that 3.x doesn't fully support X11.
  461.  
  462. -Greg
  463.  
  464. Date: Fri, 19 Jun 92 13:37:15 +0200
  465. From: pralong@gismo.cnet-pab.fr (Frederic PRALONG)
  466. To: greg@hobbes.lbl.gov
  467. Subject: Solicitation from a Radiance user on NeXTStation
  468.  
  469. Hi greg,
  470.  
  471. Do you know someone who have compile radiance2R1 on a NextStation ?
  472.  
  473. Thanks
  474. FReD
  475.  
  476. Date: Fri, 19 Jun 92 08:48:24 PDT
  477. From: greg (Gregory J. Ward)
  478. To: pralong@gismo.cnet-pab.fr
  479. Subject: Re:  Solicitation from a Radiance user on NeXTStation
  480.  
  481. Hello Fred,
  482.  
  483. Yes, I just recently exchange e-mail with someone struggling with Radiance
  484. 2.1 on a NeXT.  There are a few bugaboos in the NeXT C compiler.  Following
  485. is my response:
  486.  
  487. >From greg Mon Jun 15 16:25:44 1992
  488. Return-Path: <greg>
  489. Date: Mon, 15 Jun 92 16:25:41 PDT
  490. From: greg (Gregory J. Ward)
  491. To: linde@physics.Stanford.edu
  492. Subject: NeXT compilation
  493. Status: RO
  494.  
  495. Well, what can I say?  The NeXT is not a very standard compiler.  I'm still
  496. amazed that it cannot manage to accept redefined library functions.  This
  497. runs counter to the very spirit of the C language.  Anyway, you can just
  498. add a -lrt to all the Rmakefile lines that resulted in the ld: Zstrcmp undef.
  499. errors.  The only other serious errors were the -n: unknown option problems,
  500. which can be resolved by removing -n from the corresponding lines in
  501. Rmakefile.  The rest is just bitching you can ignore.
  502.  
  503. By the way, it seems that you do not have X11 installed on your NeXT machine.
  504. You need to read the instructions in noX11.help and follow them to avoid
  505. compiling the programs that won't work without it.
  506.  
  507. Date: Wed, 1 Jul 1992 13:18:27 -0500
  508. From: guy@guy.b30.ingr.com (Guy Streeter)
  509. To: greg@hobbes.lbl.gov (Gregory J. Ward)
  510. Subject: Re:  how was textures.pic generated?
  511.  
  512. Gregory J. Ward writes:
  513.  > Hello Guy,
  514.  > 
  515.  > Indeed, anything that reports a consistency error is highly suspicious.
  516.  > In theory, you should never get such an error, and it indicates an internal
  517.  > bug in the program.  What machine was your version of Radiance compiled on?
  518.  
  519. I'm running Radiance on an Intergraph InterPro 2020, which is a RISC
  520. architecture (Intergraph Clipper C300 processor: 32-bit integer,
  521. 64-bit float) SYSV R3 system.  I compiled it with GNU C v2.2.
  522. Although the system libraries are compiled with a different compiler,
  523. I've never encountered a compatibility problem.  rmake looks like:
  524.  
  525. #!/bin/sh
  526. exec make "SPECIAL=" \
  527.     "CC=gcc -mc300 -fwritable-strings" \
  528.     "OPT=-O -s" \
  529.     "MACH= -DALIGN=double" \
  530.     ARCH= "COMPAT=bmalloc.o erf.o" \
  531.     INSTDIR=/usr/local/bin \
  532.     LIBDIR=/usr/local/lib/ray "$@" -f Rmakefile
  533.  
  534. The only part of this I'm unsure of is the COMPAT definition.  I don't
  535. know what those modules are supposed to do.  I haven't changed any of
  536. the definitions (-DSMLFLT, etc.) so there couldn't be any internal
  537. compatibility problems there.
  538.  
  539. I tried it again with the updated commandline you sent.  The results
  540. were the same.
  541.  
  542. Among the peculiarities of my system, one that strikes me as a
  543. possible problem is the way subroutine arguments are passed.  The
  544. compiler always puts the first two integer or pointer arguments and
  545. the first two floating-point arguments into registers, and passes the
  546. rest on the stack.  This means that variable argument lists can only
  547. be handled by the varargs (or stdarg) facility.
  548.  
  549. Date: Wed, 1 Jul 92 13:42:10 PDT
  550. From: greg (Gregory J. Ward)
  551. To: guy@guy.b30.ingr.com
  552. Subject: Re:  how was textures.pic generated?
  553.  
  554. Hmmm.  I'm starting to suspect the GNU C compiler now.  The other fellow
  555. who was having troubles was also using GNU C.  I have never managed to
  556. compile anything using GNU C, so I gave up trying.  It's too nonstandard
  557. for my taste.  Do you have an alternative compiler available?
  558.  
  559. The argument list strangeness shouldn't trip up Radiance, though I'll have
  560. to check and make sure.  The only time I ever play with the number of
  561. function arguments is when there are optional arguments at the end of the
  562. list.  They are always declared but only accessed under some conditions,
  563. when they must be passed by the caller.  This basic mechanism is described
  564. in K&R, so it is supported by all C compilers I've used.
  565.  
  566. What happens when you pass fewer arguments than are declared in a GNU-compiled
  567. program?
  568.  
  569. -Greg
  570.  
  571. Date: Wed, 1 Jul 1992 16:09:20 -0500
  572. From: guy@guy.b30.ingr.com (Guy Streeter)
  573. To: greg@hobbes.lbl.gov (Gregory J. Ward)
  574. Subject: Re:  how was textures.pic generated?
  575.  
  576. I believe I've discovered my problem.  There are a number of places in
  577. the Rmakefiles where an explicit command is used to compile a source
  578. file.  In those commands, 'cc' is used instead of '$(CC)', so my
  579. definition of 'CC' in rmake didn't matter.  A different compiler was
  580. used for those source files.  I don't know if there is something
  581. broken in that compiler, or a compatibility problem with other modules
  582. compiled with GNU C, but I changed all the Rmakefiles and rebuilt
  583. everything, making sure that all files were compiled with GNU.  I'm
  584. rerunning 'texture' right now, and it's at:
  585.  
  586. 2163454 rays, 18.33% done after 1.0092 hours
  587.  
  588. which is better than twice as far as it got before.  So, unless you
  589. hear from me again you can assume the problem is fixed.
  590.  
  591. thanks,
  592. Guy Streeter
  593.  
  594. Date: Wed, 1 Jul 92 14:56:28 PDT
  595. From: greg (Gregory J. Ward)
  596. To: guy@guy.b30.ingr.com
  597. Subject: Re:  how was textures.pic generated?
  598.  
  599. Great!  I should have thought of this myself, I suppose, but I'm glad that
  600. someone did!  I will go through my Rmakefile's and make sure they all
  601. reference $(CC) instead of cc, so future users don't have the same
  602. troubles.
  603.  
  604. -Greg
  605.  
  606. =============================================================
  607. ANIMATION SPLINES
  608.  
  609. To: greg@hobbes.lbl.gov (Gregory J. Ward)
  610. Subject: animations w/ splines
  611. Date: Tue, 30 Jun 92 15:37:02 EDT
  612. From: Philip  Thompson <phils@Athena.MIT.EDU>
  613.  
  614. Hi Greg,
  615.  
  616. We're trying to borrow your spline animation technique from the
  617. cabin, and have figured out everything but the time parameter
  618. T().   In our first example we're just trying to fly through 4
  619. points.  My question is, if T is the time between keyframe i and i-1
  620. why are there an equal number as there are frames?
  621.  
  622. Second, if we want the speed to be fairly constant, should this
  623. time be proportional to the distance?  When we set T() equal to the
  624. distance between points the animation started in the middle of the
  625. path, went to one end and doubled back.  Anyway here is what we are
  626. trying in keys.cal now -  but it seems awfully hit or miss.
  627.  
  628. Px(i) = select(i, -6130, -4390, -2800, -2430);
  629. Py(i) = select(i, 1440, 740, 100, -40);
  630. Pz(i) = select(i, 500, 500, 500, 500);
  631. Dx(i) = select(i, 0.4, 0.4, 0.4, 0.4);
  632. Dy(i) = select(i, 0.9, 0.9, 0.9, 0.9);
  633. Dz(i) = select(i, -0.5, -0.5, -0.5, -0.5);
  634. Ux(i) = select(i, 0, 0, 0, 0);
  635. Uy(i) = select(i, 0, 0, 0, 0);
  636. Uz(i) = select(i, 1, 1, 1, 1);
  637. E(i) = select(i, 50, 50, 50, 50);
  638. T(i) = select(i, 0, 2, 2, 0);
  639.  
  640. Thanks, Phil
  641.  
  642. ps. I also noticed that in the cabin keys file you have "rview .... -t
  643. .35"
  644. where -t .35 seems to correspond to the T() values.  How did you
  645. get these?
  646.  
  647. Date: Tue, 30 Jun 92 16:34:14 PDT
  648. From: greg (Gregory J. Ward)
  649. To: phils@Athena.MIT.EDU
  650. Subject: Re:  animations w/ splines
  651.  
  652. Hi Phil,
  653.  
  654. Yes, why indeed does T() have the same number of points as keyframes?  Because,
  655. the first one doesn't count!  I did it this way for convenience, I think.  A
  656. zero value is appropriate there.
  657.  
  658. Yes, the value for each frame should be proportional to the distance, though
  659. I would slow down a bit when making turns if you don't want to get sick.  The
  660. viewfiles I created with the "view" command of rview, which allows you to tack
  661. whatever you like after the end of the view file name and it will be appended
  662. to the view line in the file.  This is merely for the convenience of annotating
  663. multiple views (eg. keyframes) written out to a single file.  The -t option is
  664. just what I decided to use for time.  Within rview, when I had found a view
  665. I thought would work for the next keyframe, I typed:
  666.  
  667.     : view keyframes -t SECS
  668.  
  669. where SECS was the decimal number of seconds I thought would work between the
  670. last view and this one.  You're right, it's a bit of a hit and miss process.
  671. I usually do an extremely low resolution (both in time and image size) 
  672. animation before starting the real thing just to check that I haven't done
  673. anything stupid.
  674.  
  675. Good luck!
  676. -Greg
  677.  
  678. ==========================================================
  679. RA_PICT
  680.  
  681. Date: Wed, 8 Jul 92 18:45:14 -0400
  682. From: Jim Callahan <jmc@ugrad.ee.ufl.edu>
  683. To: greg@hobbes.lbl.gov
  684. Subject:  PIC to PICT problems...
  685.  
  686. Greg-
  687.  
  688.     I think you mentioned that you use a Mac, so I thought you might
  689. know what I'm doing wrong.  I am trying to view some images produced by
  690. Radiance on a Mac II-fx.  These are the steps I took:
  691.  
  692. 1> in UNIX: "ra_pict test.pic test.pict"
  693.     
  694. 2> Moved the PICT file via ftp (in bin mode) to the Mac
  695.  
  696. 3> Tried to view with many different viewers...
  697.  
  698.     It seem that the Mac thinks "test.pict" is a document and refuses
  699. to load it.  Am I overlooking a step here?  Do I need some program which
  700. will make the OS realize it is a PICT?  Thanks for the help...
  701.  
  702.     Anyway, I am going to send my GUI (based on InterViews) for
  703. Radiance to a number of beta testers this weekend.  Would you like to see
  704. it?  It allows the user to set all command line options for OCONV, RVIEW,
  705. and RPICT with sliders and other widgets.  In addition, it provides detailed
  706. control of image division and remote shelling over a network.  I hope it
  707. will make using Radiance easier, especially for new users.
  708.  
  709.     Are you going to attend SIGGRAPH'92 later this month? It looks like
  710. a real "disney world" experience for the computer graphics addict...
  711.  
  712.                     -Jim
  713.                                 (jmc@ugrad.ee.ufl.edu)
  714.  
  715. Date: Wed, 8 Jul 92 18:06:55 PDT
  716. From: greg (Gregory J. Ward)
  717. To: jmc@ugrad.ee.ufl.edu
  718. Subject: Re:  PIC to PICT problems...
  719.  
  720. Hi Jim,
  721.  
  722. Yes, you need to modify the creator and type of the file before any tools
  723. will load it directly.  The desk accessory called "disktop" allows you to
  724. make such changes.  The type should be PICT and a good creator is 8BIM
  725. (used by Photoshop, I think).  If you have Photoshop, you can always use
  726. the "Open as..." dialog box to load the file, even without setting the type
  727. beforehand.
  728.  
  729. I would like to see your interface.  Do you have a compiled version for a
  730. Sun or Silicon Graphics?  I don't have Interviews or C++, so it would be
  731. difficult for me to do the compilation.
  732.  
  733. -Greg
  734.  
  735. P.S.  Yes, I will be at Siggraph.  I'll be staying with Paul Heckbert at
  736.     the Hyatt if you want to get together.
  737.  
  738. [Note that Siggraph will be in Orlando, home of Disney World, in '93...]
  739.  
  740. =========================================================
  741. LIGHT SOURCES
  742.  
  743. From: chauvine@dingo.imag.fr (ROOT)
  744. Date: Mon, 6 Jul 92 10:32:52 MET DST
  745. Organization: IMAG Institute, University of Grenoble
  746. To: greg@hobbes.lbl.gov
  747. Subject: Radiance again
  748.  
  749. Bonjour greg,
  750.  
  751.  Thank you for your fast reply from your bed, we hope that
  752. your are in better shape now. We have done all that you
  753. have said, and it's working (light was !). We knew your
  754. warning but understood it in a wrong way.
  755.  
  756.  We have a lot of things to ask you, but if you have no
  757. time, or if you are tired of us, don't hesitate to
  758. throw some of then.
  759.  
  760.  1- we don't understand why when we have two light
  761.     sources with the same power, the largest one
  762.     in size gives more light in the scene?
  763.  2- we don't understand why there is a lost of
  764.     rays when rendering a scene from 100 unit or
  765.     more (we want to say that some objects appear with
  766.     holes in them instead of be plain)?
  767.  3- Can you tell us how many sources of light
  768.     are allowed at maximum.
  769.  
  770. Remark:
  771.   We have many black holes on object with plastic
  772. material, and that whatever is the size of the object.
  773.  
  774. Last :
  775.   We have a great interest with anisotropic reflection,
  776. and we shall be very pleased if ther is a mean to get
  777. a copy of your SIGGRAPH'92 article.
  778.  
  779.  Many thanks from a sunny Grenoble,
  780.  laurent & jacques.
  781.  
  782. -- 
  783. -------------------------------------------------------------
  784. -  Chauvineau Laurent        -    Magistere Informatique    -
  785. -                            -   Ecole Univ. Info. -  UJF   -
  786. -  Laboratoire ARTEMIS                                      - 
  787. -       Projet Image de Synthese                            -
  788. -                                                           -
  789. -  e_mail: chauvine@dingo.imag.fr                           -
  790. -------------------------------------------------------------
  791.  
  792. Date: Mon, 6 Jul 92 18:02:09 PDT
  793. From: greg (Gregory J. Ward)
  794. To: chauvine@dingo.imag.fr
  795. Subject: Re:  Radiance again
  796.  
  797. Hello Laurent and Jacques,
  798.  
  799. I was better, but then my brother visited this weekend and now I am
  800. sick again!  Oh, well.
  801.  
  802. You're questions are not too difficult, so I will try to answer them.
  803.  
  804.  1- we don't understand why when we have two light
  805.     sources with the same power, the largest one
  806.     in size gives more light in the scene?
  807.  
  808. The total output of a light source is (as you have noticed) the product
  809. of the source area and the output radiance.  Since radiance (the unit,
  810. not the software) is in watts/sr/m^2, you must multiply this by square
  811. area and solid angle to obtain power.  Look at it this way:  if you had
  812. a light filament that was as bright as the surface of the sun (as is
  813. a common quartz-halogen filament), it would have the same radiance as
  814. the sun but not the same output as has only about 10^-23 as much
  815. radiating area.  Thus, radiance is related to the visible brightness of
  816. an infinitesimal fraction of the surface.
  817.  
  818.  2- we don't understand why there is a lost of
  819.     rays when rendering a scene from 100 unit or
  820.     more (we want to say that some objects appear with
  821.     holes in them instead of be plain)?
  822.  
  823. What version of Radiance are you running?  Version 2.0 has some problems
  824. with the -DSMLFLT option.  This compile switch is used if you answer yes
  825. to a certain question in makeall about rendering very large models.  You
  826. should be able to see it in the resulting rmake command placed in your
  827. Radiance bin directory.  If you have version 2.0, you should remove this
  828. rmake command and run "makeall clean" followed by "makeall install", this
  829. time answer "no" to the question about large models.  If you have version
  830. 2.1 and are experiencing this problem, then I would like to know about it.
  831.  
  832.  3- Can you tell us how many sources of light
  833.     are allowed at maximum.
  834.  
  835. There is no maximum to the number of light sources, although you will find
  836. that the calculation slows down more the more light sources you add.  It
  837. is best to represent your scene with as few light source surfaces as possible
  838. to obtain the fastest renderings.
  839.  
  840. Last :
  841.   We have a great interest with anisotropic reflection,
  842. and we shall be very pleased if ther is a mean to get
  843. a copy of your SIGGRAPH'92 article.
  844.  
  845. I will send you a preprint of this article when I get back to the office.
  846.  
  847. -Greg
  848.  
  849. From: chauvine@dingo.imag.fr (ROOT)
  850. Date: Thu, 9 Jul 92 10:24:46 MET DST
  851. To: greg@hobbes.lbl.gov
  852. Subject: Radiance version
  853.  
  854.  Hello greg,
  855.  
  856.  We are using version 2.1 and we still have this probleme.
  857.  
  858.  Your new manual is very usefull and well made. Thank you for accepting
  859. to send us the preprint.
  860.  
  861.  laurent & jacques.
  862.  
  863. Date: Thu, 9 Jul 92 15:39:36 PDT
  864. From: greg (Gregory J. Ward)
  865. To: chauvine@dingo.imag.fr
  866. Subject: Re:  Radiance version
  867.  
  868. Were you using the -DSMLFLT option?  I just tried it on my machine, and I
  869. ran into similar problems, so I tried decreasing the value of FTINY further.
  870. You should try modifying the FTINY value in common/fvect.h so it matches
  871. the following:
  872.  
  873. /* Copyright (c) 1988 Regents of the University of California */
  874.  
  875. /* SCCSid "@(#)fvect.h 2.3 7/9/92 LBL" */
  876.  
  877. #ifdef  SMLFLT
  878. #define  FLOAT        float
  879. #define  FTINY        (1e-3)
  880. #else
  881. #define  FLOAT        double
  882. #define  FTINY        (1e-6)
  883. #endif
  884. #define  FHUGE        (1e10)
  885.  
  886. /* and so on... */
  887.  
  888. ------------
  889. Then, try cleaning and recompiling everything and see if you still have
  890. troubles.  I noticed some small problems, but there's really no getting
  891. away from errors with short floating point numbers.
  892.  
  893. -Greg
  894.  
  895. =======================================================
  896. HARTMANN CONSTANT
  897.  
  898. From: bcurrey@neumann.une.oz.au (The Ray)
  899. Subject: Radiance - bits and pieces
  900. To: GJWard@lbl.gov
  901. Date: Wed, 5 Aug 92 13:45:30 EST
  902.  
  903. Hi Greg,
  904.  
  905.    I have recently got your Radiance program through FTP and have successfully
  906. compiled to run on our DEC's here at Uni. I will say right now that the
  907. program is very comprehensive, and I wich I had more time o get to know
  908. it better. Anyway, I have two questions:
  909.  
  910.   - One, where can I get some values for the Hartmann constant you refer
  911.     to in the manual regarding dielectrics. The Physics department here
  912.     was stumped when I asked them for data (in fact they had never even heard
  913.     of such a constant!)
  914.  
  915.   - Two, since I have to keep this in a temp directory on this system (because
  916.     of the programs size) what files do I really need for the program to run.
  917.     I'm trying to cut down on disc usage as much as possible.
  918.  
  919.                               Any help would be greatly appreciated.
  920.                               Boyd
  921.                               bcurrey@neumann.une.oz.au
  922.     
  923. Date: Wed, 5 Aug 92 09:17:23 PDT
  924. From: greg (Gregory J. Ward)
  925. To: bcurrey@neumann.une.oz.au
  926. Subject: Re:  Radiance - bits and pieces
  927.  
  928. Hi Boyd,
  929.  
  930. The Hartmann constant can be found in the handbook of Chemistry and Physics,
  931. or fitted manually based on a list of (wavelength,refractive_index) pairs.
  932. Basically, the final index of refraction is computed by:
  933.  
  934.     n = n0 + Hartmann_constant/wavelength
  935.  
  936. where wavelength is given in nanometers.  Note that this constant ONLY has
  937. effect for light scattered from light sources, and is normally irrelevant
  938. to the calculation.  That is why it is usually left as zero, ignoring the
  939. wavelength dependence of the index of refraction.
  940.  
  941. As for your second question, only the binaries, the library directory
  942. (ray/lib in the distribution) and any models you want to use need be
  943. kept around.  The source code and the rest can be removed once the programs
  944. have been successfully compiled.
  945.  
  946. -Greg
  947.  
  948. ==========================================================
  949. SPOTLIGHTS
  950.  
  951. Sender: MAILER%PLWRTU11.BITNET
  952. Date:         Thu, 27 Aug 92 15:43:19 CET
  953. From: SJK%PLWRTU11.BITNET@Csa3.lbl.gov
  954. To: greg@hobbes.lbl.gov
  955. Subject: Spotlights in RADIANCE; antimatter
  956.      
  957. Hello Greg,
  958.      
  959. recently we (with Karol Myszkowski) spent some time experimenting
  960. with RADIANCE. Our goal is to compare accuracy/speed of RADIANCE
  961. with TBT using similar scenes. Actually Karol is absent (short
  962. holidays) so I continue investigations alone.
  963.      
  964. I am a novice in RADIANCE, so I apologize for asking about
  965. probably well known topics. I encountered some difficulties
  966. when I try to model directed light sources by means of spotlight
  967. (with RADIANCE 2.1) and I have not find answers to my questions
  968. neither in the manual nor in digest files.
  969.      
  970.      
  971. 1. What focal distance means?
  972.      
  973. I am unable to see any difference between spotlights with the same
  974. angles but different lengths of orientation vectors.
  975.      
  976.      
  977. 2. Visibility of spotlight.
  978.      
  979. I noticed that the spotlight is visible even when the observer
  980. is located at a point not illuminated by this light (see the
  981. picture below). Is it correct?
  982.      
  983.      
  984. 3. Secondary spotlights.
  985.      
  986. The picture shows that a secondary spotlight acts as if it is
  987. undirected. The top face of the golden cube is illuminated only
  988. partly, however the illuminated area on the wall is produced by
  989. the whole square.
  990.      
  991. Below is the source file (tc.rad):
  992. ------------------------------------
  993. void spotlight dir_source
  994. 0 0
  995. 7 10000 10000 10000 90 0 0 -1
  996.      
  997. void plastic white
  998. 0
  999. 0
  1000. 5 .7 .7 .7 0 0
  1001.      
  1002. void mirror polished_gold
  1003. 0 0
  1004. 3 .45 .25 .02
  1005.      
  1006. !genbox white room 10 10 10 -i
  1007.      
  1008. !genbox polished_gold gold_box 3 3 3.5 | xform -t 0 4 0
  1009.      
  1010. # Light source
  1011.      
  1012. dir_source ring light
  1013. 0 0
  1014. 8  5 3 9   0 0 -1  0 0.1
  1015. -----------------------------
  1016.      
  1017. I have used the command
  1018.      
  1019. rpict -vf $(name).vf -x 300 -dr 1 -ab 1 -av 0.05 0.05 0.05 -t 10 \
  1020.       $(name).oct >$(name).pic
  1021.      
  1022. with tc.vf containing:
  1023.      
  1024. rview -vtv -vp 9 9 5 -vd -1 -1 0 -vu 0 0 1 -vh 90 -vv 90 -vs 0 -vl 0
  1025. --------------------------
  1026.      
  1027.      
  1028. 4. Are goniometric diagrams possible in RADIANCE?
  1029.      
  1030. In view of very general mechanism to specify reflectance and
  1031. transmittance (BRTDfunc) I was surprised not found something like
  1032. ULEDfunc (Unidirectional Light Emitting Distribution) to specify
  1033. a dependency of power of a light source on emitting direction.
  1034.      
  1035. Is it possible to specify such dependency in some way? If not,
  1036. maybe it is worth to include such possibility in future version?
  1037.      
  1038.      
  1039. 5. Antimatter remark.
  1040.      
  1041. The method to produce a hole with different surface material
  1042. that You suggested in v2n2, lines 251--271 (ANTIMATTER, answer
  1043. to David Jones, 17 Jan 92) do not work (I tried to make sphere hole
  1044. in cubical object instead of cylinder). It do work (in my example)
  1045. after the following changes of AMAT2 definition:
  1046.      
  1047. void antimatter AMAT2
  1048. 2 MAT2 MAT1
  1049. 0 0
  1050. # The order of MAT2 MAT1 is significant!
  1051.      
  1052.      
  1053. With best regards,
  1054. Andrei Khodulev:                  sjk@plwrtu11.bitnet
  1055.  
  1056. Date: Thu, 27 Aug 92 18:13:36 PDT
  1057. From: greg (Gregory J. Ward)
  1058. To: SJK%PLWRTU11.BITNET@Csa3.lbl.gov
  1059.  
  1060. Hello Andrei,
  1061.  
  1062. Thank you for your excellent questions.  I'm afraid that I will not be
  1063. able to give you a complete answer right away.  Briefly,
  1064.  
  1065. 1.  The focal length produces only a subtle difference as it shifts the
  1066. effective position of the source behind the actual emitting surface.
  1067. A real spotlight has the effect of changing its falloff to being something
  1068. less than r^-2 (where r is the distance to the emitter) in this way.
  1069. The actual falloff is closer to (r+e)^-2, where e is the focal length
  1070. of the spotlight's optics.  It is a minor concern, I admit.
  1071.  
  1072. 2.  This is the way the spotlight material behaves.  The spotlight type
  1073. is primarily to make a more efficient calculation by ignoring that portion
  1074. of a light's output that is insignificant.  It is usually used in conjunction
  1075. with a light source pattern, described briefly in the answer to your
  1076. question 4 (below).
  1077.  
  1078. 3.  Since I won't be able to run your file right away, I will have to
  1079. answer this question later.
  1080.  
  1081. 4.  Yes, light source emissions are specified using the more general pattern
  1082. types brightfunc or brightdata.  (Colorfunc and colordata may also be used
  1083. if you wish to give your light source a color-dependent distribution.)
  1084. A simple example is as follows:
  1085.  
  1086.     void brightfunc cos3dist
  1087.     2 cos(Dz)^3 .
  1088.     0
  1089.     0
  1090.  
  1091.     cos3dist light con_light
  1092.     0
  1093.     0
  1094.     3 100 100 100
  1095.  
  1096.     con_light ring con_lamp
  1097.     0
  1098.     0
  1099.     8    5 8 3    0 0 -1    0 .06
  1100.  
  1101. You should look at the files in the ray/lib/source/ies directory for examples
  1102. of the brightdata primitive and its application to light sources.
  1103.  
  1104. 5.  I'll have to go back and look at the question to which you refer.  Yes,
  1105. order does matter.  The first material given is the one used at the antimatter
  1106. boundary.
  1107.  
  1108. -Greg
  1109.  
  1110.