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.104 by greg, Sat Jan 29 16:44:20 2011 UTC vs.
Revision 2.108 by greg, Mon Aug 12 21:01:00 2013 UTC

# Line 558 | Line 558 | oconv(void)                            /* run oconv and mkillum if necessary *
558                          unlink(illumtmp);
559                          quit(1);
560                  }
561 +                rmfile(oct0name);
562                                                  /* make octree1 (frozen) */
563                  if (octreedate)
564                          sprintf(combuf, "%s%s -f -i %s %s > %s", c_oconv,
# Line 772 | Line 773 | lowqopts(                      /* low quality rendering options */
773          d = ambval();
774          sprintf(op, " -av %.2g %.2g %.2g", d, d, d);
775          op += strlen(op);
776 <        op = addarg(op, "-lr 6 -lw .01");
776 >        op = addarg(op, "-lr 6 -lw .003");
777   }
778  
779  
# Line 850 | Line 851 | medqopts(                      /* medium quality rendering options */
851          d = ambval();
852          sprintf(op, " -av %.2g %.2g %.2g", d, d, d);
853          op += strlen(op);
854 <        op = addarg(op, "-lr 8 -lw .002");
854 >        op = addarg(op, "-lr 8 -lw 1e-4");
855   }
856  
857  
# Line 926 | Line 927 | hiqopts(                               /* high quality rendering options */
927          d = ambval();
928          sprintf(op, " -av %.2g %.2g %.2g", d, d, d);
929          op += strlen(op);
930 <        op = addarg(op, "-lr 12 -lw .0005");
930 >        op = addarg(op, "-lr 12 -lw 1e-5");
931   }
932  
933  
# Line 1254 | Line 1255 | rvu(                           /* run rvu with first view */
1255   }
1256  
1257  
1258 + static int
1259 + syncf_done(                     /* check if an rpiece sync file is complete */
1260 +        char *sfname
1261 + )
1262 + {
1263 +        FILE    *fp = fopen(sfname, "r");
1264 +        int     todo = 1;
1265 +        int     x, y;
1266 +
1267 +        if (fp == NULL)
1268 +                return(0);
1269 +        if (fscanf(fp, "%d %d", &x, &y) != 2)
1270 +                goto checked;
1271 +        todo = x*y;             /* total number of tiles */
1272 +        if (fscanf(fp, "%d %d", &x, &y) != 2 || (x != 0) | (y != 0))
1273 +                goto checked;
1274 +                                /* XXX assume no redundant tiles */
1275 +        while (fscanf(fp, "%d %d", &x, &y) == 2)
1276 +                if (!--todo)
1277 +                        break;
1278 + checked:
1279 +        fclose(fp);
1280 +        return(!todo);
1281 + }
1282 +
1283 +
1284   static void
1285   rpict(                          /* run rpict and pfilt for each view */
1286          char    *opts,
# Line 1361 | Line 1388 | rpict(                         /* run rpict and pfilt for each view */
1388                                  int     xdiv = 8+nprocs/3, ydiv = 8+nprocs/3;
1389                                  if (rfdt >= oct1date) {
1390                                          fprintf(stderr,
1391 <                "%s: partial output not created with rpiece\n", rawfile);
1391 >                "%s: partial output not created with %s\n", rawfile, c_rpiece);
1392                                          quit(1);
1393                                  }
1394                                  if (rfdt) {     /* start fresh */
# Line 1450 | Line 1477 | rpict(                         /* run rpict and pfilt for each view */
1477                  if (do_rpiece) {                /* need to finish raw, first */
1478                          finish_process();
1479                          wait_process(1);
1480 <                        /* XXX should check sync file to see if really done? */
1480 >                        if (!syncf_done(sfile)) {
1481 >                                fprintf(stderr,
1482 >                        "%s: %s did not complete rendering of view %s\n",
1483 >                                                progname, c_rpiece, vs);
1484 >                                quit(1);
1485 >                        }
1486                  }
1487                  if (!vdef(RAWFILE) || strcmp(vval(RAWFILE),vval(PICTURE))) {
1488                                                  /* build pfilt command */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines