ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/pcomb.1
Revision: 1.12
Committed: Fri Mar 18 21:09:16 2022 UTC (2 years, 2 months ago) by greg
Branch: MAIN
CVS Tags: rad5R4
Changes since 1.11: +4 -1 lines
Log Message:
docs(pcomb, pcompos): Added remarks about EXPOSURE settings

File Contents

# User Rev Content
1 greg 1.12 .\" RCSid "$Id: pcomb.1,v 1.11 2018/05/04 23:56:49 greg Exp $"
2 greg 1.1 .TH PCOMB 1 8/31/96 RADIANCE
3     .SH NAME
4 greg 1.2 pcomb - combine RADIANCE pictures
5 greg 1.1 .SH SYNOPSIS
6     .B pcomb
7     [
8 greg 1.7 .B -h
9     ][
10 greg 1.1 .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 greg 1.11 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 greg 1.1 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 greg 1.6 y offsets are limited to a small window (+/- 32 pixels) due to efficiency
77 greg 1.1 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 greg 1.3 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 greg 1.1 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 greg 1.12 Exposure values will be set to 1.0 for inputs with the
122     .I \-o
123     option set.
124 greg 1.1 Finally, for pictures with stored view parameters,
125     the functions
126     .I "Ox(n), Oy(n)"
127     and
128     .I Oz(n)
129     return the ray origin in world coordinates for the current pixel
130     in picture
131     .I n,
132     and
133     .I "Dx(n), Dy(n)"
134     and
135     .I Dz(n)
136     return the normalized ray direction.
137     In addition, the function
138     .I T(n)
139     returns the distance from the origin to the aft clipping plane
140     (or zero if there is no aft plane), and the function
141     .I S(n)
142     returns the solid angle of the current pixel in steradians
143     (always zero for parallel views).
144     If the current pixel is outside the view region,
145     .I T(n)
146     will return a negative value, and
147     .I S(n)
148     will return zero.
149 greg 1.10 The first input picture with a view is assumed to correspond to the
150     view of the output picture, which is written into the header.
151 greg 1.1 .PP
152     The
153 greg 1.7 .I \-h
154     option may be used to reduce the information header size, which
155     can grow disproportionately after multiple runs of
156     .I pcomb
157     and/or
158     .I pcompos(1).
159     The
160 greg 1.1 .I \-w
161     option can be used to suppress warning messages about invalid
162     calculations.
163     The
164     .I \-o
165     option indicates that original pixel values are to be used for the next
166     picture, undoing any previous exposure changes or color correction.
167     .PP
168     The
169     .I \-x
170     and
171     .I \-y
172     options can be used to specify the desired output resolution,
173     .I xres
174     and
175     .I yres,
176     and can be expressions involving other constants such as
177     .I xmax
178     and
179     .I ymax.
180     The constants
181     .I xres
182     and
183     .I yres
184     may also be specified in a file or expression.
185     The default output resolution is the same as the input resolution.
186     .PP
187     The
188     .I \-x
189     and
190     .I \-y
191     options must be present if there are no input files, when
192     the definitions of
193     .I ro,
194     .I go
195     and
196     .I bo
197     will be used to compute each output pixel.
198     This is useful for producing simple test pictures for various
199     purposes.
200     (Theoretically, one could write a complete renderer using just the
201     functional language...)
202     .PP
203     The standard input can be specified with a hyphen ('-').
204     A command that produces a RADIANCE picture can be given in place of a file
205     by preceeding it with an exclamation point ('!').
206     .SH EXAMPLES
207     To produce a picture showing the difference between pic1 and pic2:
208     .IP "" .2i
209 greg 1.8 pcomb \-e 'ro=ri(1)\-ri(2);go=gi(1)\-gi(2);bo=bi(1)\-bi(2)' pic1 pic2 > diff
210 greg 1.1 .PP
211     Or, more efficiently:
212     .IP "" .2i
213 greg 1.8 pcomb pic1 \-s \-1 pic2 > diff
214 greg 1.1 .PP
215     To precompute the gamma correction for a picture:
216     .IP "" .2i
217 greg 1.9 pcomb \-e 'ro=ri(1)^.4;go=gi(1)^.4;bo=bi(1)^.4' inp.hdr > gam.hdr
218 greg 1.1 .PP
219     To perform some special filtering:
220     .IP "" .2i
221 greg 1.9 pcomb \-f myfilt.cal \-x xmax/2 \-y ymax/2 input.hdr > filtered.hdr
222 greg 1.1 .PP
223     To make a picture of a dot:
224     .IP "" .2i
225 greg 1.8 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
226 greg 1.11 .SH ENVIRONMENT
227     RAYPATH the directories to check for auxiliary files.
228 greg 1.1 .SH AUTHOR
229     Greg Ward
230     .SH "SEE ALSO"
231 greg 1.5 getinfo(1), icalc(1), pcompos(1), pfilt(1), rpict(1)