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.107 by greg, Fri Aug 26 22:39:56 2011 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines