ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rad.c
(Generate patch)

Comparing ray/src/util/rad.c (file contents):
Revision 2.124 by schorsch, Sun Mar 6 01:13:18 2016 UTC vs.
Revision 2.129 by greg, Sun Feb 6 17:19:55 2022 UTC

# Line 242 | Line 242 | main(
242                                  /* load variable values */
243          loadvars(rifname);
244                                  /* get any additional assignments */
245 <        for (i++; i < argc; i++)
246 <                if (setvariable(argv[i], matchvar) < 0) {
247 <                        fprintf(stderr, "%s: unknown variable: %s\n",
245 >        for (i++; i < argc; i++) {
246 >                int     rv = setvariable(argv[i], matchvar);
247 >                if (rv < 0) {
248 >                        fprintf(stderr, "%s: unknown setting: %s\n",
249                                          progname, argv[i]);
250                          quit(1);
251                  }
252 +                if (!rv)
253 +                        fprintf(stderr,
254 +                        "%s: bad variable assignment: %s (ignored)\n",
255 +                                        progname, argv[i]);
256 +        }
257                                  /* check assignments */
258          checkvalues();
259                                  /* check files and dates */
# Line 556 | Line 562 | oconv(void)                            /* run oconv and mkillum if necessary *
562                  return;
563                                                  /* make octree0 */
564          if ((oct0date < scenedate) | (oct0date < illumdate)) {
565 <                if (touchonly && oct0date)
566 <                        touch(oct0name);
567 <                else {                          /* build command */
565 >                if (touchonly && (oct0date || oct1date)) {
566 >                        if (oct0date)
567 >                                touch(oct0name);
568 >                } else {                        /* build command */
569                          if (octreedate)
570                                  sprintf(combuf, "%s%s -i %s %s > %s", c_oconv,
571                                          ocopts, vval(OCTREE),
# Line 583 | Line 590 | oconv(void)                            /* run oconv and mkillum if necessary *
590                          oct0date = octreedate;
591                  if (oct0date < illumdate)       /* ditto */
592                          oct0date = illumdate;
593 <                }
593 >        }
594          if (touchonly && oct1date)
595                  touch(oct1name);
596          else {
# Line 752 | Line 759 | mkpmapopts(                            /* get mkpmap options */
759   {
760          /* BEWARE:  This may be called via setdefaults(), so no assumptions */
761  
762 <        *mo = '\0';
762 >        if (nprocs > 1)
763 >                sprintf(mo, " -n %d", nprocs);
764 >        else
765 >                *mo = '\0';
766          if (!vdef(MKPMAP))
767                  return;
768          if (vval(MKPMAP)[0] != '-') {
# Line 786 | Line 796 | ambval(void)                           /* compute ambient value */
796   {
797          if (vdef(EXPOSURE)) {
798                  if (vval(EXPOSURE)[0] == '+' || vval(EXPOSURE)[0] == '-')
799 <                        return(.5/pow(2.,vflt(EXPOSURE)));
800 <                return(.5/vflt(EXPOSURE));
799 >                        return(.18/pow(2.,vflt(EXPOSURE)));
800 >                return(.18/vflt(EXPOSURE));
801          }
802          if (vlet(ZONE) == 'E')
803                  return(10.);
# Line 830 | Line 840 | renderopts(                    /* set rendering options */
840                  op = addarg(addarg(op, "-ap"), pmapf);
841                  if (atoi(bw) > 0) op = addarg(op, bw);
842          }
843 <        if (vdef(RENDER))
843 >        if (vdef(RENDER)) {
844                  op = addarg(op, vval(RENDER));
845 +                bw = strstr(vval(RENDER), "-aa ");
846 +                if (bw != NULL && atof(bw+4) <= FTINY)
847 +                        overture = 0;
848 +        }
849          if (rvdevice != NULL) {
850                  if (vdef(RVU)) {
851                          if (vval(RVU)[0] != '-') {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines