GENBSDF(1)

NAME
genBSDF - generate BSDF description from Radiance or MGF input

SYNOPSIS
genBSDF [ -c Nsamp ][ -n Nproc ][ -r 'rcontrib opts...' ][ -W ][ -s 'x=string;y=string' ][ -t{3|4} Nlog2 ][ {+|-}C ][ {+|-}a ][ {+|-}forward ][ {+|-}backward ][ {+|-}mgf ][ {+|-}geom unit ][ -dim Xmin Xmax Ymin Ymax Zmin Zmax ] [ geom .. ]
or
genBSDF -recover tempdir

DESCRIPTION
GenBSDF computes a bidirectional scattering distribution function from a Radiance or MGF scene description given on the input. The program assumes the input is in Radiance format unless the +mgf option is specified. The output conforms to the LBNL Window 6 XML standard for BSDF data, and will include an MGF representation of the input geometry if the +geom option is given, followed by one of "meter," "foot," "inch," "centimeter," or "millimeter," depending on the scene units. The default is to include the provided geometry, which is assumed to be in meters. Geometry output can be supressed with the -geom option, which must also be followed by one of the above length units.

Normally, genBSDF computes components needed by a backwards ray-tracing process, +backward. If both forward and backward (front and back) distributions are needed, the +forward option may be given. To turn off backward components, use the -backward option. Computing both components takes about twice as long as one component, but is recommended when rays will be impinging from either side.

The +C option specifies that the output XML should include color information, which is interpreted by the rendering programs. The default option -C reduces all BSDF data to grayscale.

The -a option turns off reciprocity averaging for tensor tree output. Normally on (+a), this ensures that the tensor BRDF obeys Helmholtz reciprocity. However, in certain rare cases, reciprocity averaging can cause unwanted noise in the output.

The geometry must fit a rectangular profile, whose width is along the X-axis, height is in the Y-axis, and depth is in the Z-axis. The positive Z-axis points into the room, and the input geometry should not extend into the room. (I.e., it should not contain any positive Z values, since the putative emitting surface is assumed to lie at Z=0.) The entire window system should be modeled, including sills and edge geometry anticipated in the final installation, otherwise accuracy will be impaired. Similarly, materials in the description should be carefully measured.

Normally, the input geometry will be positioned according to its actual bounding box, but this may be overridden with the -dim option. Use this in cases where the fenestration system is designed to fit a smaller (or larger) opening or is offset somehow.

The variance in the results may be reduced by increasing the number of samples per incident direction using the -c option. This value defaults to 2000 samples distributed over the incoming plane for each of the 145 Klems hemisphere directions.

On multi-core machines, processing time may be reduced by the -n option, which specifies the number of simultaneous processes to run in rcontrib(1). The -r option may be used to specify a set of quoted arguments to be included on the rcontrib command line.

The -W option is passed to wrapBSDF(1) to prepare the XML file for WINDOW6. Any -s parameters are passed to the -f option of wrapBSDF, controlling XML fields such as the Manufacturer (e.g., -s m=MF) and device Name (e.g, -s n=NM).

The -t4 mode computes a non-uniform BSDF represented as a rank 4 tensor tree, suitable for use in the Radiance rendering tools. The parameter given to this option is the log to the base 2 of the sampling resolution in each dimension, and must be an integer. The -c setting should be adjusted so that an appropriate number of samples lands in each region. A -t4 parameter of 5 corresponds to 32x32 or 1024 output regions, so a -c setting of 10240 would provide 10 samples per region on average. Increasing the resolution to 6 corresponds to 64x64 or 4096 regions, so the -c setting would need to be increased by a factor of 4 to provide the same accuracy in each region.

The -t3 mode is similar to -t4 but computes a rank 3 tensor tree rather than rank 4. This provides a much faster computation, but only works in special circumstances. Specifically, do NOT use this option if the system is not in fact isotropic. I.e., only use -t3 when you are certain that the system has a high degree of radial symmetry. Again, the parameter to this option sets the maximum resolution as a power of 2 in each dimension, but in this case there is one less dimension being sampled.

The -recover option is available for continuing calculations that were killed by the system or the user. Unfortunately, genBSDF puts its temporary files in a directory that is often cleaned up after reboot, so this may not always work.

EXAMPLE
To create a BSDF description including geometry from a set of venetian blinds:

    genblinds blind_white blind1 .07 3 1.5 30 40 | xform -rz -90 -rx 90 > blind1.rad
    genBSDF -r @rtc.opt blind_white.mat glazing.rad blind1.rad > blind1.xml

To create a non-uniform, anisotropic BSDF distribution with a maximum resolution of 128x128 from the same description:

    genBSDF -r @rtc.opt -t4 7 -c 160000 blind_white.mat glazing.rad blind1.rad > blind12.xml

NOTES
The variable resolution (tensor tree) BSDF representation is not supported by all software and applicatons, and should be used with caution. It provides practical, high-resolution data for use in the Radiance rendering programs, but does not work in the matrix formulation of the daylight coefficient method for example. Also, third party tools generally expect or require a fixed number of sample directions using the Klems directions or similar.

AUTHOR
Greg Ward

SEE ALSO
dctimestep(1), gendaymtx(1), genklemsamp(1), genskyvec(1), mkillum(1), pkgBSDF(1), rcontrib(1), rfluxmtx(1), rmtxop(1), rtrace(1) wrapBSDF(1)