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.102 by greg, Sun Oct 10 09:25:45 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 +                                if (rfdt >= oct1date) {
1365 +                                        fprintf(stderr,
1366 +                "%s: partial output not created with rpiece\n", rawfile);
1367 +                                        quit(1);
1368 +                                }
1369                                  rfdt = 0;               /* start fresh */
1370                                  if (!silent)
1371                                          printf("\techo %d %d > %s\n",
# Line 1396 | Line 1403 | rpict(                         /* run rpict and pfilt for each view */
1403                  } else {
1404                          if (overture) {         /* run overture calculation */
1405                                  sprintf(combuf,
1406 <                                "%s%s %s%s -x 64 -y 64 -ps 1 %s > %s",
1406 >                                        "%s%s %s%s -x 64 -y 64 -ps 1 %s > %s",
1407                                                  c_rpict, rep, vw, opts,
1408                                                  oct1name, overfile);
1409 <                                if (do_rpiece)
1410 <                                        while (next_process(1))
1411 <                                                sleep(5);
1405 <                                if (runcom(combuf)) {
1406 <                                        fprintf(stderr,
1409 >                                if (!do_rpiece || !next_process(0)) {
1410 >                                        if (runcom(combuf)) {
1411 >                                                fprintf(stderr,
1412                                          "%s: error in overture for view %s\n",
1413 <                                                progname, vs);
1414 <                                        quit(1);
1415 <                                }
1411 <                                if (do_rpiece) {
1412 <                                        finish_process();
1413 <                                        wait_process(1);
1414 <                                }
1413 >                                                        progname, vs);
1414 >                                                quit(1);
1415 >                                        }
1416   #ifndef NULL_DEVICE
1417 <                                rmfile(overfile);
1417 >                                        rmfile(overfile);
1418   #endif
1419 +                                } else if (do_rpiece)
1420 +                                        sleep(20);
1421                          }
1422                          if (do_rpiece) {
1423                                  sprintf(combuf, "%s -F %s %s%s %s %s%s%s -o %s %s",
# Line 1570 | Line 1573 | next_process(int reserve)              /* fork the next process */
1573          child_pid = fork();             /* split process */
1574          if (child_pid == 0) {           /* we're the child */
1575                  children_running = -1;
1576 +                nprocs = 1;
1577                  return(0);
1578          }
1579          if (child_pid > 0) {            /* we're the parent */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines