ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rtcontrib.1
Revision: 1.6
Committed: Wed Jun 1 16:11:01 2005 UTC (18 years, 11 months ago) by greg
Branch: MAIN
Changes since 1.5: +11 -1 lines
Log Message:
Added RAYPATH directory searching to rtcontrib -f option

File Contents

# User Rev Content
1 greg 1.6 .\" RCSid "$Id: rtcontrib.1,v 1.5 2005/05/27 19:15:28 greg Exp $"
2 greg 1.3 .TH RTCONTRIB 1 5/25/05 RADIANCE
3 greg 1.1 .SH NAME
4 greg 1.5 rtcontrib - compute contribution coefficients in a RADIANCE scene
5 greg 1.1 .SH SYNOPSIS
6     .B rtcontrib
7     [
8     .B "\-n nprocs"
9     ][
10     .B "\-e expr"
11     ][
12     .B "\-f source"
13     ][
14     .B "\-o fspec"
15     ][
16     .B "\-b binv"
17     ]
18 greg 1.2 .B "\-m mod .."
19 greg 1.1 [
20     .B $EVAR
21     ]
22     [
23     .B @file
24     ]
25     [
26     rtrace options
27     ]
28     .B octree
29 greg 1.4 .br
30     .B "rtcontrib [ options ] \-defaults"
31 greg 1.1 .SH DESCRIPTION
32     .I Rtcontrib
33     computes ray contributions (i.e., color coefficients)
34     for objects whose modifiers are named in one or more
35     .I \-m
36     settings.
37 greg 1.2 These modifiers are usually materials associated with
38     light sources or sky domes, and must directly modify some geometric
39     primitives to be considered in the output.
40 greg 1.3 The output of
41     .I rtcontrib
42     has many potential uses.
43     Source contributions can be used as components in linear combination to
44 greg 1.1 reproduce any desired variation, e.g., simulating lighting controls or
45     changing sky conditions via daylight coefficients.
46     More generally,
47     .I rtcontrib
48 greg 1.3 can be used to compute arbitrary input-output relationships in optical
49     systems, such as luminaires, light pipes, and shading devices.
50 greg 1.1 .PP
51 greg 1.2 .I Rtcontrib
52     calls
53     .I rtrace(1)
54 greg 1.5 with the -oTW option to calculate the daughter ray
55     contributions for each input ray, and the output tallies
56     are sent to one or more files according to the given
57 greg 1.1 .I \-o
58     specification.
59 greg 1.2 If an output specification contains a "%s" format, this will be
60 greg 1.1 replaced by the modifier name.
61     The
62     .I \-b
63     option may be used to further define
64 greg 1.2 a "bin number" within each object if finer resolution is needed, and
65     this will be applied to a "%d" format in the output file
66 greg 1.1 specification if present.
67 greg 1.3 The actual bin number is computed at run time based on ray direction
68     and surface intersection, as described below.
69 greg 1.1 The most recent
70     .I \-b
71     and
72     .I \-o
73 greg 1.2 options to the left of each
74 greg 1.1 .I \-m
75 greg 1.2 setting affect only that modifier.
76     (The ordering of other options is unimportant.)\0
77 greg 1.1 .PP
78 greg 1.2 If a
79     .I \-b
80     expression is defined for a particular modifier,
81     the bin number will be evaluated at run time for each
82     ray contribution from
83     .I rtrace.
84     Specifically, each ray's world intersection point will be assigned to
85     the variables Px, Py, and Pz, and the normalized ray direction
86     will be assigned to Dx, Dy, and Dz.
87     These parameters may be combined with definitions given in
88     .I \-e
89 greg 1.3 arguments and files read using the
90 greg 1.2 .I \-f
91 greg 1.3 option.
92     The computed bin value will be
93 greg 1.2 rounded to the nearest whole number.
94     This mechanism allows the user to define precise regions or directions
95     they wish to accumulate, such as the Tregenza sky discretization,
96     which would be otherwise impossible to specify
97     as a set of RADIANCE primitives.
98 greg 1.3 The rules and predefined functions available for these expressions are
99     described in the
100     .I rcalc(1)
101     man page.
102 greg 1.6 Unlike
103     .I rcalc,
104     .I rtcontrib
105     will search the RADIANCE library directories for each file given in a
106     .I \-f
107     option.
108     (No search takes place if a file name begins with a '.', '/' or '~'
109     character.)\0
110 greg 1.1 .PP
111     If no
112     .I \-o
113     specification is given, results are written on the standard output in order
114     of modifier (as given on the command line) then bin number.
115 greg 1.2 Concatenated data is also sent to a lone output file (i.e., an initial
116     .I \-o
117     specification without formatting strings).
118 greg 1.1 If a "%s" format appears but no "%d" in the
119     .I \-o
120     specification, then each modifier will have its own output file, with
121     multiple values per record in the case of a non-zero
122     .I \-b
123     definition.
124     If a "%d" format appears but no "%s", then each bin will get its own
125     output file, with modifiers output in order in each record.
126     For text output, each RGB coefficient triple is separated by a tab,
127     with a newline at the end of each ray record.
128     For binary output formats, there is no such delimiter to mark
129     the end of each record.
130     .PP
131 greg 1.2 Input and output format defaults to plain text, where each ray's
132     origin and direction (6 real values) are given on input,
133     and one line is produced per output file per ray.
134     Alternative data representations may be specified by the
135     .I \-f[io]
136     option, which is described in the
137     .I rtrace
138     man page along with the associated
139     .I \-x
140     and
141     .I \-y
142     resolution settings.
143     In particular, the color ('c') output data representation
144     together with positive dimensions for
145     .I \-x
146     and
147     .I \-y
148     will produce an uncompressed RADIANCE picture,
149     suitable for manipulation with
150     .I pcomb(1)
151     and related tools.
152 greg 1.1 .PP
153     If the
154     .I \-n
155     option is specified with a value greater than 1, multiple
156 greg 1.2 .I rtrace
157 greg 1.1 processes will be used to accelerate computation on a shared
158     memory machine.
159     Note that there is no benefit to using more processes
160 greg 1.2 than there are local CPUs available to do the work, and the
161     .I rtcontrib
162     process itself may use a considerable amount of CPU time.
163 greg 1.1 .PP
164     Options may be given on the command line and/or read from the
165     environment and/or read from a file.
166     A command argument beginning with a dollar sign ('$') is immediately
167     replaced by the contents of the given environment variable.
168     A command argument beginning with an at sign ('@') is immediately
169     replaced by the contents of the given file.
170 greg 1.2 .SH EXAMPLES
171     To compute the proportional contributions from sources modified
172     by "light1" vs. "light2" on a set of illuminance values:
173 greg 1.1 .IP "" .2i
174 greg 1.2 rtcontrib -I+ @render.opt -o c_%s.dat -m light1 -m light2 scene.oct < test.dat
175     .PP
176     To generate a pair of images corresponding to these two lights'
177     contributions:
178 greg 1.1 .IP "" .2i
179 greg 1.2 vwrays -ff -x 1024 -y 1024 -vf best.vf |
180     rtcontrib -ffc `vwrays -d -x 1024 -y 1024 -vf best.vf`
181     @render.opt -o c_%s.pic -m light1 -m light2 scene.oct
182     .PP
183     These images may then be recombined using the desired outputs
184     of light1 and light2:
185 greg 1.1 .IP "" .2i
186 greg 1.2 pcomb -c 100 90 75 c_light1.pic -c 50 55 57 c_light2.pic > combined.pic
187 greg 1.1 .PP
188 greg 1.2 To compute an array of illuminance contributions according to a Tregenza sky:
189     .IP "" .2i
190     rtcontrib -b tbin -o sky.dat -m skyglow -b 0 -o ground.dat -m groundglow
191     @render.opt -f tregenza.cal scene.oct < test.dat
192 greg 1.6 .SH ENVIRONMENT
193     RAYPATH path to search for -f files
194 greg 1.1 .SH AUTHOR
195     Greg Ward
196     .SH "SEE ALSO"
197     cnt(1), getinfo(1), pcomb(1), pfilt(1), ra_rgbe(1),
198     rcalc(1), rpict(1), rtrace(1), vwrays(1), ximage(1)