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.99 by greg, Fri Oct 8 22:11:57 2010 UTC vs.
Revision 2.103 by greg, Sun Oct 10 15:36:18 2010 UTC

# Line 826 | Line 826 | medqopts(                      /* medium quality rendering options */
826                  op = addarg(op, "-ds .2 -dj .9");
827          else
828                  op = addarg(op, "-ds .3");
829 <        op = addarg(op, "-dt .1 -dc .5 -dr 1 -ss .7 -st .1");
829 >        op = addarg(op, "-dt .1 -dc .5 -dr 1 -ss 1 -st .1");
830          if ( (overture = vint(INDIRECT)) ) {
831                  sprintf(op, " -ab %d", overture);
832                  op += strlen(op);
# Line 904 | Line 904 | hiqopts(                               /* high quality rendering options */
904                  op = addarg(op, "-ds .1 -dj .9");
905          else
906                  op = addarg(op, "-ds .2");
907 <        op = addarg(op, "-dt .05 -dc .75 -dr 3 -ss 1 -st .01");
907 >        op = addarg(op, "-dt .05 -dc .75 -dr 3 -ss 16 -st .01");
908          sprintf(op, " -ab %d", overture=vint(INDIRECT)+1);
909          op += strlen(op);
910          if (vdef(AMBFILE)) {
# Line 1261 | Line 1261 | rpict(                         /* run rpict and pfilt for each view */
1261   )
1262   {
1263   #define do_rpiece       (sfile[0]!='\0')
1264 <        char    combuf[4*PATH_MAX+512];
1264 >        char    combuf[5*PATH_MAX+512];
1265          char    rawfile[PATH_MAX], picfile[PATH_MAX];
1266          char    zopt[PATH_MAX+4], rep[PATH_MAX+16], res[32];
1267 <        char    rppopt[128], sfile[64], *pfile = NULL;
1267 >        char    rppopt[32], sfile[PATH_MAX], *pfile = NULL;
1268          char    pfopts[128];
1269          char    vs[32], *vw;
1270          int     vn, mult;
# Line 1316 | Line 1316 | rpict(                         /* run rpict and pfilt for each view */
1316                                          getview(0, vs) != NULL) {
1317                  if (!strcmp(c_rpict, DEF_RPICT_PATH) &&
1318                                  getview(1, NULL) == NULL) {
1319 <                        sprintf(sfile, "rpsync_%s.txt", vs);
1319 >                        sprintf(sfile, "%s_%s_rpsync.txt",
1320 >                                vdef(RAWFILE) ? vval(RAWFILE) : vval(PICTURE),
1321 >                                        vs);
1322                          strcpy(rppopt, "-PP pfXXXXXX");
1323                  } else {
1324                          strcpy(rppopt, "-S 1 -PP pfXXXXXX");
# Line 1359 | Line 1361 | rpict(                         /* run rpict and pfilt for each view */
1361                  if (do_rpiece) {
1362                          if (rfdt < oct1date || !fdate(sfile)) {
1363                                  int     xdiv = 8+nprocs/3, ydiv = 8+nprocs/3;
1364 <                                rfdt = 0;               /* start fresh */
1364 >                                if (rfdt >= oct1date) {
1365 >                                        fprintf(stderr,
1366 >                "%s: partial output not created with rpiece\n", rawfile);
1367 >                                        quit(1);
1368 >                                }
1369 >                                if (rfdt) {     /* start fresh */
1370 >                                        rmfile(rawfile);
1371 >                                        rfdt = 0;
1372 >                                }
1373                                  if (!silent)
1374                                          printf("\techo %d %d > %s\n",
1375                                                          xdiv, ydiv, sfile);
# Line 1396 | Line 1406 | rpict(                         /* run rpict and pfilt for each view */
1406                  } else {
1407                          if (overture) {         /* run overture calculation */
1408                                  sprintf(combuf,
1409 <                                "%s%s %s%s -x 64 -y 64 -ps 1 %s > %s",
1409 >                                        "%s%s %s%s -x 64 -y 64 -ps 1 %s > %s",
1410                                                  c_rpict, rep, vw, opts,
1411                                                  oct1name, overfile);
1412 <                                if (do_rpiece)
1413 <                                        while (next_process(1))
1414 <                                                sleep(5);
1405 <                                if (runcom(combuf)) {
1406 <                                        fprintf(stderr,
1412 >                                if (!do_rpiece || !next_process(0)) {
1413 >                                        if (runcom(combuf)) {
1414 >                                                fprintf(stderr,
1415                                          "%s: error in overture for view %s\n",
1416 <                                                progname, vs);
1417 <                                        quit(1);
1418 <                                }
1411 <                                if (do_rpiece) {
1412 <                                        finish_process();
1413 <                                        wait_process(1);
1414 <                                }
1416 >                                                        progname, vs);
1417 >                                                quit(1);
1418 >                                        }
1419   #ifndef NULL_DEVICE
1420 <                                rmfile(overfile);
1420 >                                        rmfile(overfile);
1421   #endif
1422 +                                } else if (do_rpiece)
1423 +                                        sleep(20);
1424                          }
1425                          if (do_rpiece) {
1426                                  sprintf(combuf, "%s -F %s %s%s %s %s%s%s -o %s %s",
# Line 1570 | Line 1576 | next_process(int reserve)              /* fork the next process */
1576          child_pid = fork();             /* split process */
1577          if (child_pid == 0) {           /* we're the child */
1578                  children_running = -1;
1579 +                nprocs = 1;
1580                  return(0);
1581          }
1582          if (child_pid > 0) {            /* we're the parent */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines