ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/robjutil.1
Revision: 1.2
Committed: Thu Apr 2 20:44:15 2020 UTC (5 years, 2 months ago) by greg
Branch: MAIN
Changes since 1.1: +24 -2 lines
Log Message:
Added -x option to robjutil to transform .OBJ files

File Contents

# Content
1 .\" RCSid "$Id: robjutil.1,v 1.1 2020/03/30 18:28:35 greg Exp $"
2 .TH ROBJUTIL 1 3/31/20 RADIANCE
3 .SH NAME
4 robjutil - operate on Wavefront .OBJ file
5 .SH SYNOPSIS
6 .B robjutil
7 [
8 .B +/-r
9 ][
10 .B +/-v
11 ][
12 .B +/-t
13 ][
14 .B +/-n
15 ][
16 .B "+/-m mname"
17 ][
18 .B "+/-g gname"
19 ][
20 .B "-c epsilon"
21 ][
22 .B "-x 'xf spec'"
23 ]
24 [
25 .B input.obj ..
26 ]
27 .SH DESCRIPTION
28 .I Robjutil
29 reads and manipulates a Wavefront .OBJ file, removing degenerate and
30 duplicate faces.
31 If the
32 .I +r
33 option is specified, a Radiance scene description
34 will be produced on the standard output.
35 If
36 .I -r
37 is given, a modified .OBJ file will be sent to the standard output.
38 This is the default, and is
39 typically more useful, since surface normals are better handled by the
40 .I obj2rad(1)
41 and
42 .I obj2mesh(1)
43 converters.
44 The latter also preserves local texture coordinates for mapping materials.
45 The
46 .I +v
47 option turns on verbose progress reports.
48 .PP
49 The
50 .I \-t
51 option tells
52 .I robjutil
53 to remove texture coordinates from the input.
54 The
55 .I \-n
56 option will cause all surface normals to be removed.
57 .PP
58 The
59 .I "\-m mname"
60 option tells
61 .I robjutil
62 to remove all faces that use the material
63 .I mname.
64 Multiple
65 .I \-m
66 options may be given, each with a single (unique) material name.
67 Alternatively, the
68 .I "+m mname"
69 option may be used to specify a material one wishes to keep, discarding the rest.
70 Multiple
71 .I +m
72 options will keep all the named materials.
73 The
74 .I \-m
75 and
76 .I \+m
77 options are mutually exclusive.
78 Similarly, the
79 .I "\-g gname"
80 option says to remove all faces belonging to the group
81 .I gname,
82 and multiple
83 .I \-g
84 options may be given.
85 There is also a
86 .I +g
87 option to save just the named group(s).
88 .PP
89 A
90 .I "\-c epsilon"
91 parameter may be given to coalesce vertices that are within the given epsilon.
92 This is useful to improve the connectivity of models that were produced
93 in a sloppy conversion process from independent polygons.
94 When producing a Radiance file via the
95 .I +r
96 option, there will be no savings in the output size, but there can be
97 a benefit in reducing the number of "cracks" in the resulting geometry,
98 at least for triangle mesh input.
99 .I Robjutil
100 does not attempt to break up non-planar polygons into triangles,
101 which is usually not a problem for .OBJ output, but may be for Radiance
102 scene descriptions (+r).
103 .PP
104 The
105 .I \-x
106 option may be used to specify a final transform to apply to all
107 coordinates in the file before output.
108 This specification must be contained in a single quoted word and
109 match the standard arguments used by
110 .I xform(1),
111 except that the
112 .I \-a
113 option is not supported for creating arrays of objects.
114 Also, any scaling applied does not affect the epsilon value given for
115 coalescing vertices, as this operation is applied prior to the transform,
116 even if
117 .I \-c
118 appears later in the command line.
119 .SH EXAMPLES
120 To remove degenerate and duplicate faces from "orig.obj" and write to "final.rad":
121 .IP "" .2i
122 robjutil +r orig.obj > final.rad
123 .PP
124 To convert the same file, preserving surface normal interpolation:
125 .IP "" .2i
126 robjutil orig.obj | obj2rad > withnormals.rad
127 .PP
128 To extract only the groups "cat" and "bell" from the file "kitty.obj" and
129 write to a Radiance triangle mesh using materials from "kitty.mat":
130 .IP "" .2i
131 robjutil +g cat +g bell kitty.obj | obj2mesh -a kitty.mat > kitty.rtm
132 .PP
133 To rotate the scene 90 degrees about the Y-axis and scale by 10:
134 .IP "" .2i
135 robjutil -x "-ry 90 -s 10" orig.obj > transformed.obj
136 .SH AUTHOR
137 Greg Ward
138 .SH "SEE ALSO"
139 obj2mesh(1), obj2rad(1) oconv(1), xform(1)