ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/pcomb.1
Revision: 1.10
Committed: Mon Feb 5 20:07:17 2018 UTC (6 years, 3 months ago) by greg
Branch: MAIN
Changes since 1.9: +3 -1 lines
Log Message:
Decided to share first input view in the output of pcomb

File Contents

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