ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/bsdf2ttree.1
Revision: 1.1
Committed: Thu Apr 25 00:43:20 2013 UTC (12 years ago) by greg
Branch: MAIN
Log Message:
Created man pages for bsdf2klems and bsdf2ttree

File Contents

# User Rev Content
1 greg 1.1 .\" RCSid $Id$
2     .TH BSDF2TTREE 1 4/24/2013 RADIANCE
3     .SH NAME
4     bsdf2ttree - generate XML tensor tree description of a BSDF
5     .SH SYNOPSIS
6     .B bsdf2ttree
7     [
8     .B "\-g Nlog2"
9     ][
10     .B "\-t pctcull
11     ]
12     [
13     .B "bsdf.sir .."
14     ]
15     .br
16     or
17     .br
18     .B bsdf2ttree
19     .B "\-t{3|4}"
20     [
21     .B "\-g Nlog2"
22     ][
23     .B "\-t pctcull
24     ][
25     .B "{+|-}forward"
26     ][
27     .B "{+|-}backward"
28     ][
29     .B "\-e expr
30     ][
31     .B "\-f file
32     ]
33     .B bsdf_func
34     .SH DESCRIPTION
35     .I Bsdf2ttree
36     produces a tensor tree representation of a
37     bidirectional scattering distribution function (BSDF)
38     based on an intermediate representation (in the first form) or
39     a functional description (in the second form).
40     A complete XML description is written to the standard output,
41     which is normally redirected to a file.
42     .PP
43     The maximum resolution of the tensor tree may be controlled by the
44     .I \-g
45     option, which defaults to a value of 6.
46     This corresponds to a peak resolution of 2^6 (64) in each dimension.
47     Due to memory and time constraints, it is not recommended to set
48     .I \-g
49     higher than 7, which corresponds to a 128x128x128x128 initial sampling,
50     or 268 million values.
51     .PP
52     The initial sampling is pared down by the percentage specified with the
53     .I \-t
54     option, which defaults to 90.
55     Setting this parameter to -1 turns culling off entirely, which may be
56     useful for comparisons.
57     .PP
58     The first invocation form takes a intermediate scattering representation
59     as produced by
60     .I pabopto2bsdf(1)
61     or similar, and produces a tensor tree representation with as many
62     components as there are independent input distributions.
63     Each intermediate scattering file contains one of
64     the four components, and if the first component
65     is isotropic, all components must be isotropic.
66     A similar rule holds for anisotropic inputs.
67     .PP
68     In the second invocation form,
69     .I bsdf2ttree
70     takes a functional specification of a BSDF.
71     The named function must accept 6 parameters corresponding to the
72     normalized incident and exiting vectors, respectively.
73     By convention, these vectors point away from the surface, and a positive
74     Z-component corresponds to the front side.
75     The Y-component corresponds to the "up" orientation of the surface,
76     as specified in the eventual scene description that references the XML
77     output.
78     .PP
79     The function is defined by one or more
80     .I \-e
81     and
82     .I \-f
83     options, and should obey both Helmholtz reciprocity and
84     integrate to less than 1 over each projected incident hemisphere
85     for energy conservation.
86     If the
87     .I \-t3
88     option is specified, the defined function is assumed to be isotropic.
89     If the
90     .I \-t4
91     option is given, the function is assumed to be anisotropic.
92     .PP
93     Similar to the
94     .I genBSDF(1)
95     command,
96     the
97     .I \+backward
98     option (default) specifies that rays arriving from the front side of
99     the surface will be tested for reflection and transmission.
100     If both forward and backward (front and back) distributions are needed, the
101     .I \+forward
102     option may be given.
103     To turn off the backward components, use the
104     .I \-backward
105     option.
106     Computing both incident hemispheres takes about twice as long as one, but
107     is recommended when rays will be impinging from either side.
108     .SH EXAMPLE
109     To take two components of an intermediate BSDF representation and create
110     a high-resolution tensor tree with 85% culling:
111     .IP "" .2i
112     bsdf2ttree -g 7 -t 85 transmitted.sir reflected.sir > combined.xml
113     .PP
114     To create a low-res BSDF corresponding to a one-sided,
115     isotropic Phong distribution:
116     .IP "" .2i
117     bsdf2ttree -g 5 -t3 -e 'phong(ix,iy,iz,ox,oy,oz) = if(iz, .1+((iz+oz)/sqrt((ix+ox)^2+(iy+oy)^2+(iz+oz)^2))^50, 0)' phong > phong.xml
118     .SH AUTHOR
119     Greg Ward
120     .SH "SEE ALSO"
121     bsdf2klems(1), icalc(1), genBSDF(1), pkgBSDF(1)