--- ray/src/rt/rtrace.c 2003/06/05 19:29:34 2.30 +++ ray/src/rt/rtrace.c 2003/10/04 14:39:53 2.35 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rtrace.c,v 2.30 2003/06/05 19:29:34 schorsch Exp $"; +static const char RCSid[] = "$Id: rtrace.c,v 2.35 2003/10/04 14:39:53 greg Exp $"; #endif /* * rtrace.c - program and variables for individual ray tracing. @@ -21,6 +21,8 @@ static const char RCSid[] = "$Id: rtrace.c,v 2.30 2003 * irradiance values are desired. */ +#include + #include "platform.h" #include "ray.h" #include "otypes.h" @@ -55,8 +57,8 @@ int hresolu = 0; /* horizontal (scan) size */ int vresolu = 0; /* vertical resolution */ double dstrsrc = 0.0; /* square source distribution */ -double shadthresh = .05; /* shadow threshold */ -double shadcert = .5; /* shadow certainty */ +double shadthresh = .03; /* shadow threshold */ +double shadcert = .75; /* shadow certainty */ int directrelay = 2; /* number of source relays */ int vspretest = 512; /* virtual source pretest density */ int directvis = 1; /* sources visible? */ @@ -72,16 +74,16 @@ double specjitter = 1.; /* specular sampling jitter int backvis = 1; /* back face visibility */ -int maxdepth = 6; /* maximum recursion depth */ -double minweight = 4e-3; /* minimum ray weight */ +int maxdepth = 8; /* maximum recursion depth */ +double minweight = 2e-3; /* minimum ray weight */ char *ambfile = NULL; /* ambient file name */ COLOR ambval = BLKCOLOR; /* ambient value */ int ambvwt = 0; /* initial weight for ambient value */ -double ambacc = 0.2; /* ambient accuracy */ -int ambres = 128; /* ambient resolution */ -int ambdiv = 512; /* ambient divisions */ -int ambssamp = 0; /* ambient super-samples */ +double ambacc = 0.1; /* ambient accuracy */ +int ambres = 256; /* ambient resolution */ +int ambdiv = 1024; /* ambient divisions */ +int ambssamp = 512; /* ambient super-samples */ int ambounce = 0; /* ambient bounces */ char *amblist[128]; /* ambient include/exclude list */ int ambincl = -1; /* include == 1, exclude == 0 */ @@ -107,7 +109,7 @@ void quit(code) /* quit program */ int code; { -#ifndef NIX +#ifndef NON_POSIX /* XXX we don't clean up elsewhere? */ headclean(); /* delete header file */ pfclean(); /* clean up persist files */ #endif @@ -283,12 +285,13 @@ double dmax; thisray.rmax = dmax; rayorigin(&thisray, NULL, PRIMARY, 1.0); if (castonly) { - if (!localhit(&thisray, &thescene)) + if (!localhit(&thisray, &thescene)) { if (thisray.ro == &Aftplane) { /* clipped */ thisray.ro = NULL; thisray.rot = FHUGE; } else sourcehit(&thisray); + } } else rayvalue(&thisray); printvals(&thisray);