ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rcode_norm.1
Revision: 1.5
Committed: Tue Mar 15 04:41:45 2022 UTC (3 years, 1 month ago) by greg
Branch: MAIN
CVS Tags: rad5R4, HEAD
Changes since 1.4: +2 -2 lines
Log Message:
feat(rcrop): Added support for cropping encoded depth and normal files

File Contents

# Content
1 .\" RCSid "$Id: rcode_norm.1,v 1.4 2021/04/28 19:15:09 greg Exp $"
2 .TH RCODE_NORM 1 7/19/2019 RADIANCE
3 .SH NAME
4 rcode_norm - encode/decode 32-bit surface normal map
5 .SH SYNOPSIS
6 .B rcode_norm
7 [
8 .B \-h[io]
9 ][
10 .B \-H[io]
11 ][
12 .B \-f[afd]
13 ][
14 .B "-x xr -y yr"
15 ]
16 [
17 input
18 [output.nrm]
19 ]
20 .br
21 .B "rcode_norm -r"
22 [
23 .B \-i
24 ][
25 .B \-u
26 ][
27 .B \-h[io]
28 ][
29 .B \-H[io]
30 ][
31 .B \-f[afd]
32 ]
33 [
34 input.nrm
35 [output]
36 ]
37 .SH DESCRIPTION
38 .I Rcode_norm
39 reads a map of direction vectors
40 and encodes them in an efficient 32-bit/pixel format.
41 Input is taken from the first named file, or standard input if no
42 files are given.
43 Output is sent to the second named file, or standard output if none.
44 .PP
45 The
46 .I \-hi
47 option tells
48 .I rcode_norm
49 not to expect an information header on its input.
50 The
51 .I \-ho
52 option tells
53 .I rcode_norm
54 not to produce an information header on its output.
55 Specifying
56 .I \-h
57 turns both input and output headers off.
58 Similarly, the
59 .I \-Hi
60 option says not to expect an image resolution string on input, the
61 .I \-Ho
62 option says not to produce one on output, and
63 .I \-H
64 applies both.
65 The
66 .I \-x
67 and
68 .I \-y
69 options give the horizontal and vertical map dimensions, respectively.
70 If provided, then an input resolution string will not be expected.
71 .PP
72 The default input format is ASCII (user-readable) real triplets,
73 corresponding to the
74 .I \-fa
75 option.
76 The
77 .I \-ff
78 option tells
79 .I rcode_norm
80 to expect three binary, 32-bit floating-point values per
81 normal on its input, instead.
82 The
83 .I \-fd
84 option tells it to expect 64-bit/component vectors.
85 .PP
86 The second form applies the
87 .I \-r
88 option to perform a reverse conversion, decoding 32-bit normal directions
89 on the input and producing one of the above formats on output.
90 The
91 .I \-h
92 and
93 .I \-H
94 options have the same behavior as before.
95 .PP
96 When decoding, the
97 .I \-i
98 option tells
99 .I rcode_norm
100 to produce one depth or world point
101 for each integer input pair specifying
102 the horizontal and vertical coordinates of a particular pixel,
103 where x is measured from 0 on the left and y from 0 at the bottom
104 in the standard orientation.
105 Note that
106 .I \-i
107 implies that an encoded normal file is explicitly given on the command
108 line, since the pixel coordinates are read from the standard input.
109 Also, the
110 .I \-H
111 option is not supported with
112 .I \-i,
113 since the map dimensions are required on the
114 input and not copied to the output.
115 If the
116 .I \-u
117 option is also given, output will be flushed after each normal.
118 .SH EXAMPLES
119 To store float surface normals out of rtrace:
120 .IP "" .2i
121 rtrace -ff < rays.flt -x 512 -y 400 -oN octree | rcode_norm -ff > norms.nrm
122 .PP
123 To query specific normals using ximage with the 't' command:
124 .IP "" .2i
125 ximage -op render.hdr | rcode_norm -i -r norms.nrm
126 .SH AUTHOR
127 Greg Ward
128 .SH "SEE ALSO"
129 rcalc(1), rcode_depth(1), rcode_ident(1), rcode2bmp(1),
130 rcrop(1), rlam(1), rsplit(1), rtpict(1)