ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rtcontrib.1
Revision: 1.2
Committed: Thu May 26 18:53:04 2005 UTC (19 years ago) by greg
Branch: MAIN
Changes since 1.1: +82 -126 lines
Log Message:
Finished basic man page

File Contents

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