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

Comparing ray/src/cv/bsdf2ttree.c (file contents):
Revision 2.17 by greg, Fri Aug 2 20:56:19 2013 UTC vs.
Revision 2.18 by greg, Thu Sep 26 17:05:00 2013 UTC

# Line 24 | Line 24 | int                    samp_order = 6;
24   const double            ssamp_thresh = 0.35;
25                                  /* number of super-samples */
26   const int               nssamp = 100;
27 +                                /* limit on number of RBF lobes */
28 + static int              lobe_lim = 15000;
29  
30   /* Output XML prologue to stdout */
31   static void
# Line 142 | Line 144 | eval_isotropic(char *funame)
144                  iovec[1] = .0;
145                  iovec[2] = input_orient * sqrt(1. - iovec[0]*iovec[0]);
146                  if (funame == NULL)
147 <                        rbf = advect_rbf(iovec);
147 >                        rbf = advect_rbf(iovec, lobe_lim);
148                  for (ox = 0; ox < sqres; ox++) {
149                      float       last_bsdf = -1;
150                      for (oy = 0; oy < sqres; oy++) {
# Line 246 | Line 248 | eval_anisotropic(char *funame)
248                  iovec[2] = input_orient *
249                                  sqrt(1. - iovec[0]*iovec[0] - iovec[1]*iovec[1]);
250                  if (funame == NULL)
251 <                        rbf = advect_rbf(iovec);
251 >                        rbf = advect_rbf(iovec, lobe_lim);
252                  for (ox = 0; ox < sqres; ox++) {
253                      float       last_bsdf = -1;
254                      for (oy = 0; oy < sqres; oy++) {
# Line 356 | Line 358 | main(int argc, char *argv[])
358                  case 'g':
359                          samp_order = atoi(argv[++i]);
360                          break;
361 +                case 'l':
362 +                        lobe_lim = atoi(argv[++i]);
363 +                        break;
364                  default:
365                          goto userr;
366                  }
# Line 423 | Line 428 | main(int argc, char *argv[])
428          return(0);
429   userr:
430          fprintf(stderr,
431 <        "Usage: %s [-g Nlog2][-t pctcull] [bsdf.sir ..] > bsdf.xml\n",
431 >        "Usage: %s [-g Nlog2][-t pctcull][-l maxlobes] [bsdf.sir ..] > bsdf.xml\n",
432                                  progname);
433          fprintf(stderr,
434          "   or: %s -t{3|4} [-g Nlog2][-t pctcull][{+|-}for[ward]][{+|-}b[ackward]][-e expr][-f file] bsdf_func > bsdf.xml\n",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines