ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/pcomb.1
(Generate patch)

Comparing ray/doc/man/man1/pcomb.1 (file contents):
Revision 1.7 by greg, Fri Sep 8 21:38:25 2006 UTC vs.
Revision 1.20 by greg, Thu Mar 27 01:26:55 2025 UTC

# Line 1 | Line 1
1   .\" RCSid "$Id$"
2   .TH PCOMB 1 8/31/96 RADIANCE
3   .SH NAME
4 < pcomb - combine RADIANCE pictures
4 > pcomb - combine RADIANCE pictures and/or float matrices
5   .SH SYNOPSIS
6   .B pcomb
7   [
# Line 9 | Line 9 | pcomb - combine RADIANCE pictures
9   ][
10   .B -w
11   ][
12 + .B -ff
13 + ][
14   .B "\-x xres"
15   ][
16   .B "\-y yres"
# Line 29 | Line 31 | pcomb - combine RADIANCE pictures
31   ]
32   .SH DESCRIPTION
33   .I Pcomb
34 < combines equal-sized RADIANCE pictures and sends the result to the
35 < standard output.
34 > combines equal-sized RADIANCE pictures or raw float matrices
35 > and sends the result to the standard output.
36   By default, the result is just a linear combination of
37 < the input pictures multiplied by
37 > the input pixels multiplied by
38   .I \-s
39   and
40   .I \-c
# Line 41 | Line 43 | but an arbitrary mapping can be assigned with the
43   .I \-e
44   and
45   .I \-f
46 < options.
46 > options, similar to
47 > .I rcalc(1).
48 > (The variable and function definitions in each
49 > .I \-f source
50 > file are read and compiled from the RADIANCE library
51 > where it is found.)\0
52   Negative coefficients and functions are allowed, and
53   .I pcomb
54 < will produce color values of zero where they would be negative.
54 > will produce color values of zero where they would be negative
55 > unless the
56 > .I \-ff
57 > option is used to specify floating-point matrix output.
58   .PP
59   The variables
60   .I ro,
# Line 60 | Line 70 | The predefined functions
70   .I gi(n)
71   and
72   .I bi(n)
73 < give the red, green and blue input values for
74 < picture
73 > give the red, green and blue values for
74 > input
75   .I n.
76   To access a pixel that is nearby the current one, these functions
77   also accept optional x and y offsets.
78   For example,
79   .I ri(3,-2,1)
80 < would return the red component of the pixel from picture 3
80 > would return the red component of the pixel from input 3
81   that is left 2 and up 1 from the current position.
82 < Although x offsets may be as large as width of the picture,
82 > Although x offsets may be as large as width of the input,
83   y offsets are limited to a small window (+/- 32 pixels) due to efficiency
84   considerations.
85   However, it is not usually necessary to worry about this problem --
# Line 78 | Line 88 | returned instead.
88   .PP
89   For additional convenience, the function
90   .I li(n)
91 < is defined as the input brightness for picture
91 > is defined as the input brightness for input
92   .I n.
93   This function also accepts x and y offsets.
94   .PP
# Line 110 | Line 120 | The constant functions
120   .I "re(n), ge(n), be(n),"
121   and
122   .I le(n)
123 < give the exposure values for picture
123 > give the exposure values for input
124   .I n,
125   and
126   .I pa(n)
127   gives the corresponding pixel aspect ratio.
128 < Finally, for pictures with stored view parameters,
128 > Exposure values will be set to 1.0 for inputs with the
129 > .I \-o
130 > option set.
131 > Finally, for inputs with stored view parameters,
132   the functions
133   .I "Ox(n), Oy(n)"
134   and
135   .I Oz(n)
136   return the ray origin in world coordinates for the current pixel
137 < in picture
137 > in input
138   .I n,
139   and
140   .I "Dx(n), Dy(n)"
# Line 140 | Line 153 | If the current pixel is outside the view region,
153   will return a negative value, and
154   .I S(n)
155   will return zero.
156 + The first input input with a view is assumed to correspond to the
157 + view of the output, which is written into the header.
158   .PP
159   The
160   .I \-h
# Line 155 | Line 170 | calculations.
170   The
171   .I \-o
172   option indicates that original pixel values are to be used for the next
173 < picture, undoing any previous exposure changes or color correction.
173 > input, undoing any previous exposure changes or color correction.
174   .PP
175   The
176   .I \-x
# Line 187 | Line 202 | the definitions of
202   and
203   .I bo
204   will be used to compute each output pixel.
205 < This is useful for producing simple test pictures for various
205 > This is useful for producing simple test inputs for various
206   purposes.
207   (Theoretically, one could write a complete renderer using just the
208   functional language...)
209   .PP
210   The standard input can be specified with a hyphen ('-').
211 < A command that produces a RADIANCE picture can be given in place of a file
211 > A command that produces a RADIANCE picture or float matrix
212 > can be given in place of a file
213   by preceeding it with an exclamation point ('!').
214   .SH EXAMPLES
215   To produce a picture showing the difference between pic1 and pic2:
216   .IP "" .2i
217 < pcomb -e 'ro=ri(1)-ri(2);go=gi(1)-gi(2);bo=bi(1)-bi(2)' pic1 pic2 > diff
217 > pcomb \-e "ro=ri(1)\-ri(2);go=gi(1)\-gi(2);bo=bi(1)\-bi(2)" pic1 pic2 > diff
218   .PP
219   Or, more efficiently:
220   .IP "" .2i
221 < pcomb pic1 -s -1 pic2 > diff
221 > pcomb pic1 \-s \-1 pic2 > diff
222   .PP
223   To precompute the gamma correction for a picture:
224   .IP "" .2i
225 < pcomb -e 'ro=ri(1)^.4;go=gi(1)^.4;bo=bi(1)^.4' pic > pic.gam
225 > pcomb \-e "ro=ri(1)^.4;go=gi(1)^.4;bo=bi(1)^.4" inp.hdr > gam.hdr
226   .PP
227   To perform some special filtering:
228   .IP "" .2i
229 < pcomb -f myfilt.cal -x xmax/2 -y ymax/2 input.pic > filtered.pic
229 > pcomb \-f myfilt.cal \-x xmax/2 \-y ymax/2 input.hdr > filtered.hdr
230   .PP
231   To make a picture of a dot:
232   .IP "" .2i
233 < 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
233 > 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
234 > .PP
235 > Use a depth buffer to superimpose 3-D gridlines on rendered image:
236 > .IP "" .2i
237 > rcollate -hi -ff -o 3000x3000 raw_orig.zbf
238 > | pcomb -e "frac(x):x-floor(x);EPS:.0001"
239 > -e "t=gi(2);Px=Ox(1)+t*Dx(1)-EPS;Py=Oy(1)+t*Dy(1)-EPS;Pz=Oz(1)+t*Dz(1)-EPS"
240 > -e "Rg:0;Gg:0;Bg:1;gsiz:0.03"
241 > -e "ingr=gsiz-min(frac(Px),frac(Py),frac(Pz))"
242 > -e "ro=if(ingr,Rg,ri(1));go=if(ingr,Gg,gi(1));bo=if(ingr,Bg,bi(1))"
243 > raw_orig.hdr - > trans_def_grid.hdr
244 > .SH ENVIRONMENT
245 > RAYPATH         the directories to check for auxiliary files.
246   .SH AUTHOR
247   Greg Ward
248   .SH "SEE ALSO"
249 < getinfo(1), icalc(1), pcompos(1), pfilt(1), rpict(1)
249 > getinfo(1), icalc(1), pcompos(1), pfilt(1), pvalue(1), pvsum(1), rcalc(1),
250 > rcollate(1), rcomb(1), rmtxop(1), rpict(1)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines