| 1 |
greg |
1.1 |
.\" RCSid "$Id: obj2rad.1,v 1.4 2007/09/04 17:36:40 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 |
|
|
[
|
| 23 |
|
|
.B input.obj ..
|
| 24 |
|
|
]
|
| 25 |
|
|
.SH DESCRIPTION
|
| 26 |
|
|
.I Robjutil
|
| 27 |
|
|
reads and manipulates a Wavefront .OBJ file, removing degenerate and
|
| 28 |
|
|
duplicate faces.
|
| 29 |
|
|
If the
|
| 30 |
|
|
.I +r
|
| 31 |
|
|
option is specified, a Radiance scene description
|
| 32 |
|
|
will be produced on the standard output.
|
| 33 |
|
|
If
|
| 34 |
|
|
.I -r
|
| 35 |
|
|
is given, a modified .OBJ file will be sent to the standard output.
|
| 36 |
|
|
This is the default, and is
|
| 37 |
|
|
typically more useful, since surface normals are better handled by the
|
| 38 |
|
|
.I obj2rad(1)
|
| 39 |
|
|
and
|
| 40 |
|
|
.I obj2mesh(1)
|
| 41 |
|
|
converters.
|
| 42 |
|
|
The latter also preserves local texture coordinates for mapping materials.
|
| 43 |
|
|
The
|
| 44 |
|
|
.I +v
|
| 45 |
|
|
option turns on verbose progress reports.
|
| 46 |
|
|
.PP
|
| 47 |
|
|
The
|
| 48 |
|
|
.I \-t
|
| 49 |
|
|
option tells
|
| 50 |
|
|
.I robjutil
|
| 51 |
|
|
to remove texture coordinates from the input.
|
| 52 |
|
|
The
|
| 53 |
|
|
.I \-n
|
| 54 |
|
|
option will cause all surface normals to be removed.
|
| 55 |
|
|
.PP
|
| 56 |
|
|
The
|
| 57 |
|
|
.I "\-m mname"
|
| 58 |
|
|
option tells
|
| 59 |
|
|
.I robjutil
|
| 60 |
|
|
to remove all faces that use the material
|
| 61 |
|
|
.I mname.
|
| 62 |
|
|
Multiple
|
| 63 |
|
|
.I \-m
|
| 64 |
|
|
options may be given, each with a single (unique) material name.
|
| 65 |
|
|
Alternatively, the
|
| 66 |
|
|
.I "+m mname"
|
| 67 |
|
|
option may be used to specify a material one wishes to keep, discarding the rest.
|
| 68 |
|
|
Multiple
|
| 69 |
|
|
.I +m
|
| 70 |
|
|
options will keep all the named materials.
|
| 71 |
|
|
The
|
| 72 |
|
|
.I \-m
|
| 73 |
|
|
and
|
| 74 |
|
|
.I \+m
|
| 75 |
|
|
options are mutually exclusive.
|
| 76 |
|
|
Similarly, the
|
| 77 |
|
|
.I "\-g gname"
|
| 78 |
|
|
option says to remove all faces belonging to the group
|
| 79 |
|
|
.I gname,
|
| 80 |
|
|
and multiple
|
| 81 |
|
|
.I \-g
|
| 82 |
|
|
options may be given.
|
| 83 |
|
|
There is also a
|
| 84 |
|
|
.I +g
|
| 85 |
|
|
option to save just the named group(s).
|
| 86 |
|
|
.PP
|
| 87 |
|
|
Finally, a
|
| 88 |
|
|
.I "\-c epsilon"
|
| 89 |
|
|
parameter may be given to coalesce vertices that are within the given epsilon.
|
| 90 |
|
|
This is useful to improve the connectivity of models that were produced
|
| 91 |
|
|
in a sloppy conversion process from independent polygons.
|
| 92 |
|
|
When producing a Radiance file via the
|
| 93 |
|
|
.I +r
|
| 94 |
|
|
option, there will be no savings in the output size, but there can be
|
| 95 |
|
|
a benefit in reducing the number of "cracks" in the resulting geometry,
|
| 96 |
|
|
at least for triangle mesh input.
|
| 97 |
|
|
.I Robjutil
|
| 98 |
|
|
does not attempt to break up non-planar polygons into triangles,
|
| 99 |
|
|
which is usually not a problem for .OBJ output, but may be for Radiance
|
| 100 |
|
|
scene descriptions (+r).
|
| 101 |
|
|
.SH EXAMPLES
|
| 102 |
|
|
To remove degenerate and duplicate faces from "orig.obj" and write to "final.rad":
|
| 103 |
|
|
.IP "" .2i
|
| 104 |
|
|
robjutil +r orig.obj > final.rad
|
| 105 |
|
|
.PP
|
| 106 |
|
|
To convert the same file, preserving surface normal interpolation:
|
| 107 |
|
|
.IP "" .2i
|
| 108 |
|
|
robjutil orig.obj | obj2rad > withnormals.rad
|
| 109 |
|
|
.PP
|
| 110 |
|
|
To extract only the groups "cat" and "bell" from the file "kitty.obj" and
|
| 111 |
|
|
write to a Radiance triangle mesh using materials from "kitty.mat":
|
| 112 |
|
|
.IP "" .2i
|
| 113 |
|
|
robjutil +g cat +g bell kitty.obj | obj2mesh -a kitty.mat > kitty.rtm
|
| 114 |
|
|
.SH AUTHOR
|
| 115 |
|
|
Greg Ward
|
| 116 |
|
|
.SH "SEE ALSO"
|
| 117 |
|
|
obj2mesh(1), obj2rad(1) oconv(1), xform(1)
|