ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/pcomb.1
Revision: 1.11
Committed: Fri May 4 23:56:49 2018 UTC (6 years, 1 month ago) by greg
Branch: MAIN
CVS Tags: rad5R2, rad5R3
Changes since 1.10: +6 -1 lines
Log Message:
Added search to -f for genrev, gensurf, genworm, bsdf2klems, bsdf2ttree, & pcomb

File Contents

# Content
1 .\" RCSid "$Id: pcomb.1,v 1.10 2018/02/05 20:07:17 greg Exp $"
2 .TH PCOMB 1 8/31/96 RADIANCE
3 .SH NAME
4 pcomb - combine RADIANCE pictures
5 .SH SYNOPSIS
6 .B pcomb
7 [
8 .B -h
9 ][
10 .B -w
11 ][
12 .B "\-x xres"
13 ][
14 .B "\-y yres"
15 ][
16 .B "\-f file"
17 ][
18 .B "\-e expr"
19 ]
20 [
21 [
22 .B -o
23 ][
24 .B "\-s factor"
25 ][
26 .B "\-c r g b"
27 ]
28 .B "input .."
29 ]
30 .SH DESCRIPTION
31 .I Pcomb
32 combines equal-sized RADIANCE pictures and sends the result to the
33 standard output.
34 By default, the result is just a linear combination of
35 the input pictures multiplied by
36 .I \-s
37 and
38 .I \-c
39 coefficients,
40 but an arbitrary mapping can be assigned with the
41 .I \-e
42 and
43 .I \-f
44 options.
45 The variable and function definitions in each
46 .I \-f source
47 file are read and compiled from the RADIANCE library where it is found.
48 Negative coefficients and functions are allowed, and
49 .I pcomb
50 will produce color values of zero where they would be negative.
51 .PP
52 The variables
53 .I ro,
54 .I go
55 and
56 .I bo
57 specify the red, green and blue output values, respectively.
58 Alternatively, the single variable
59 .I lo
60 can be used to specify a brightness value for black and white output.
61 The predefined functions
62 .I ri(n),
63 .I gi(n)
64 and
65 .I bi(n)
66 give the red, green and blue input values for
67 picture
68 .I n.
69 To access a pixel that is nearby the current one, these functions
70 also accept optional x and y offsets.
71 For example,
72 .I ri(3,-2,1)
73 would return the red component of the pixel from picture 3
74 that is left 2 and up 1 from the current position.
75 Although x offsets may be as large as width of the picture,
76 y offsets are limited to a small window (+/- 32 pixels) due to efficiency
77 considerations.
78 However, it is not usually necessary to worry about this problem --
79 if the requested offset is not available, the next best pixel is
80 returned instead.
81 .PP
82 For additional convenience, the function
83 .I li(n)
84 is defined as the input brightness for picture
85 .I n.
86 This function also accepts x and y offsets.
87 .PP
88 The constant
89 .I nfiles
90 gives the number of input files present,
91 and
92 .I WE
93 gives the white efficacy (lumens/brightness) for pixel values,
94 which may be used with the
95 .I \-o
96 option or the le(n) values to convert to absolute
97 photometric units (see below).
98 The variables
99 .I x
100 and
101 .I y
102 give the current output pixel location for use in
103 spatially dependent functions, the constants
104 .I xmax
105 and
106 .I ymax
107 give the input resolution, and the constants
108 .I xres
109 and
110 .I yres
111 give the output resolution (usually the same, but see below).
112 The constant functions
113 .I "re(n), ge(n), be(n),"
114 and
115 .I le(n)
116 give the exposure values for picture
117 .I n,
118 and
119 .I pa(n)
120 gives the corresponding pixel aspect ratio.
121 Finally, for pictures with stored view parameters,
122 the functions
123 .I "Ox(n), Oy(n)"
124 and
125 .I Oz(n)
126 return the ray origin in world coordinates for the current pixel
127 in picture
128 .I n,
129 and
130 .I "Dx(n), Dy(n)"
131 and
132 .I Dz(n)
133 return the normalized ray direction.
134 In addition, the function
135 .I T(n)
136 returns the distance from the origin to the aft clipping plane
137 (or zero if there is no aft plane), and the function
138 .I S(n)
139 returns the solid angle of the current pixel in steradians
140 (always zero for parallel views).
141 If the current pixel is outside the view region,
142 .I T(n)
143 will return a negative value, and
144 .I S(n)
145 will return zero.
146 The first input picture with a view is assumed to correspond to the
147 view of the output picture, which is written into the header.
148 .PP
149 The
150 .I \-h
151 option may be used to reduce the information header size, which
152 can grow disproportionately after multiple runs of
153 .I pcomb
154 and/or
155 .I pcompos(1).
156 The
157 .I \-w
158 option can be used to suppress warning messages about invalid
159 calculations.
160 The
161 .I \-o
162 option indicates that original pixel values are to be used for the next
163 picture, undoing any previous exposure changes or color correction.
164 .PP
165 The
166 .I \-x
167 and
168 .I \-y
169 options can be used to specify the desired output resolution,
170 .I xres
171 and
172 .I yres,
173 and can be expressions involving other constants such as
174 .I xmax
175 and
176 .I ymax.
177 The constants
178 .I xres
179 and
180 .I yres
181 may also be specified in a file or expression.
182 The default output resolution is the same as the input resolution.
183 .PP
184 The
185 .I \-x
186 and
187 .I \-y
188 options must be present if there are no input files, when
189 the definitions of
190 .I ro,
191 .I go
192 and
193 .I bo
194 will be used to compute each output pixel.
195 This is useful for producing simple test pictures for various
196 purposes.
197 (Theoretically, one could write a complete renderer using just the
198 functional language...)
199 .PP
200 The standard input can be specified with a hyphen ('-').
201 A command that produces a RADIANCE picture can be given in place of a file
202 by preceeding it with an exclamation point ('!').
203 .SH EXAMPLES
204 To produce a picture showing the difference between pic1 and pic2:
205 .IP "" .2i
206 pcomb \-e 'ro=ri(1)\-ri(2);go=gi(1)\-gi(2);bo=bi(1)\-bi(2)' pic1 pic2 > diff
207 .PP
208 Or, more efficiently:
209 .IP "" .2i
210 pcomb pic1 \-s \-1 pic2 > diff
211 .PP
212 To precompute the gamma correction for a picture:
213 .IP "" .2i
214 pcomb \-e 'ro=ri(1)^.4;go=gi(1)^.4;bo=bi(1)^.4' inp.hdr > gam.hdr
215 .PP
216 To perform some special filtering:
217 .IP "" .2i
218 pcomb \-f myfilt.cal \-x xmax/2 \-y ymax/2 input.hdr > filtered.hdr
219 .PP
220 To make a picture of a dot:
221 .IP "" .2i
222 pcomb \-x 100 \-y 100 \-e 'ro=b;go=b;bo=b;b=if((x-50)^2+(y-50)^2\-25^2,0,1)' > dot
223 .SH ENVIRONMENT
224 RAYPATH the directories to check for auxiliary files.
225 .SH AUTHOR
226 Greg Ward
227 .SH "SEE ALSO"
228 getinfo(1), icalc(1), pcompos(1), pfilt(1), rpict(1)