--- ray/src/cv/bsdf2ttree.c 2013/05/15 17:29:30 2.16 +++ ray/src/cv/bsdf2ttree.c 2013/09/26 17:05:00 2.18 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: bsdf2ttree.c,v 2.16 2013/05/15 17:29:30 greg Exp $"; +static const char RCSid[] = "$Id: bsdf2ttree.c,v 2.18 2013/09/26 17:05:00 greg Exp $"; #endif /* * Load measured BSDF interpolant and write out as XML file with tensor tree. @@ -24,6 +24,8 @@ int samp_order = 6; const double ssamp_thresh = 0.35; /* number of super-samples */ const int nssamp = 100; + /* limit on number of RBF lobes */ +static int lobe_lim = 15000; /* Output XML prologue to stdout */ static void @@ -112,6 +114,7 @@ eval_isotropic(char *funame) { const int sqres = 1<= 0) { /* function-based BSDF? */ void (*evf)(char *s) = single_plane_incident ? &eval_isotropic : &eval_anisotropic; - if (i != argc-1 || fundefined(argv[i]) != 6) { + if (i != argc-1 || fundefined(argv[i]) < 3) { fprintf(stderr, "%s: need single function with 6 arguments: bsdf(ix,iy,iz,ox,oy,oz)\n", progname); + fprintf(stderr, "\tor 3 arguments using Dx,Dy,Dz: bsdf(ix,iy,iz)\n", + progname); goto userr; } + ++eclock; xml_prologue(argc, argv); /* start XML output */ if (dofwd) { input_orient = -1; @@ -388,7 +428,7 @@ main(int argc, char *argv[]) return(0); userr: fprintf(stderr, - "Usage: %s [-g Nlog2][-t pctcull] [bsdf.sir ..] > bsdf.xml\n", + "Usage: %s [-g Nlog2][-t pctcull][-l maxlobes] [bsdf.sir ..] > bsdf.xml\n", progname); fprintf(stderr, " or: %s -t{3|4} [-g Nlog2][-t pctcull][{+|-}for[ward]][{+|-}b[ackward]][-e expr][-f file] bsdf_func > bsdf.xml\n",