ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/pcomb.1
Revision: 1.13
Committed: Wed Dec 6 01:27:00 2023 UTC (5 months, 4 weeks ago) by greg
Branch: MAIN
Changes since 1.12: +5 -4 lines
Log Message:
docs(rmtxcomb): Added man page for new rmtxcomb tool

File Contents

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