ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rtcontrib.1
Revision: 1.3
Committed: Thu May 26 19:19:19 2005 UTC (18 years, 11 months ago) by greg
Branch: MAIN
Changes since 1.2: +17 -9 lines
Log Message:
More wording fixes

File Contents

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