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

Comparing ray/doc/man/man1/obj2mesh.1 (file contents):
Revision 1.1 by greg, Tue Mar 11 22:48:20 2003 UTC vs.
Revision 1.8 by greg, Fri Apr 23 00:56:27 2004 UTC

# Line 1 | Line 1
1 < .\" RCSid "$Id"
1 > .\" RCSid "$Id$"
2   .TH OBJ2MESH 1 03/11/03 RADIANCE
3   .SH NAME
4   obj2mesh - create a compiled RADIANCE mesh file from Wavefront .OBJ input
5   .SH SYNOPSIS
6   .B obj2mesh
7   [
8 + .B "\-a matfile"
9 + ][
10 + .B "\-l matlib"
11 + ][
12   .B "\-n objlim"
13   ][
14   .B "\-r maxres"
# Line 25 | Line 29 | reads a Wavefront .OBJ file from
29   which is sent to
30   .I output.rtm
31   (or standard output).
32 + Any RADIANCE material descriptions included via one or more
33 + .I \-a
34 + options will be compiled and stored in the mesh as well.
35 + If the
36 + .I \-l
37 + option is used to specify a material file, the RADIANCE library
38 + locations are searched.
39   This mesh may be included in a RADIANCE scene description via the
40   .I mesh
41   primitive, thus:
# Line 37 | Line 48 | mod mesh id
48   .br
49   0
50   .PP
51 < The syntax and semantics are nearly identical to the RADIANCE
51 > The syntax and semantics are identical to the RADIANCE
52   .I instance
53 < primitive, except that the mesh modifier may not be "void", since
54 < materials are not included in a compiled mesh file.
53 > primitive.
54 > If
55 > .I mod
56 > is "void", then the stored mesh materials will be applied during rendering.
57 > Otherwise, the given material will be substituted on
58 > all the mesh surfaces.
59   .PP
60   The
61   .I \-n
# Line 51 | Line 66 | less memory, but potentially slower rendering.
66   Smaller values may produce faster renderings,
67   since the default number (15) is on the high side to reduce
68   the compiled mesh octree size.
69 < Values below 6 are not recommended, since the median
70 < valence (number of adjacent faces) for a mesh vertex is 6,
71 < and smaller limits will result in pointless octree subdivision.
69 > Values below 6 are not recommended, since this is the median
70 > valence for a mesh vertex (the number of adjacent faces),
71 > and smaller values will result in pointless octree subdivision.
72   .PP
73   The
74   .I \-r
# Line 70 | Line 85 | Although the mesh file format is binary, it is meant t
85   between machines.
86   The only limitation is that machines with radically different integer
87   sizes will not work together.
88 + .SH DETAILS
89 + The following Wavefront statements are understood and compiled by
90 + .I obj2mesh.
91 + .TP 10n
92 + .BI v " x y z"
93 + A vertex location, given by its Cartesian coordinates.
94 + The final mesh position may of course be modified by
95 + the transform arguments given to the
96 + .I mesh
97 + primitive in the Radiance scene description.
98 + .TP
99 + .BI vn " dx dy dz"
100 + A vertex normal vector, given by its three
101 + direction components, which will be normalized by
102 + .I obj2mesh.
103 + Normals will be interpolated over the mesh
104 + during rendering to produce a smooth surface.
105 + If no vertex normals are present, the mesh will appear tesselated.
106 + A zero length normal (i.e., 0 0 0) will generate a syntax error.
107 + .TP
108 + .BI vt " u v"
109 + A local vertex texture coordinate.
110 + These coordinates will be interpolated and passed
111 + to the "Lu" and "Lv" variables during rendering.
112 + Local coordinates can extend over any desired range of values.
113 + .TP
114 + .BI usemtl " mname"
115 + A material name.
116 + The following faces will use the named material, which is
117 + taken from the material definitions in the
118 + .I \-a
119 + input file(s).
120 + .TP
121 + .BI g " gname"
122 + Group association.
123 + The following faces are associated with the named group.
124 + If no "usemtl" statement has been
125 + encountered, the current group is used for the surface material
126 + identifier.
127 + .TP
128 + .BI f " v1/t1/n1 v2/t2/n2 v3/t3/n3" " .."
129 + A polygonal face.
130 + Polygon vertices are specified as three indices separated
131 + by slashes ('/').
132 + The first index is the vertex location, the
133 + second index is the local (u,v) texture coordinate, and the
134 + third index is the vertex surface normal.
135 + Positive indices count from the beginning of the input,
136 + where the first vertex position (
137 + .I v
138 + statement) is numbered 1, and likewise
139 + for the first texture coordinate and the first surface normal.
140 + Negative indices count backward from the current position in
141 + the input, where -1 is the last vertex encountered, -2
142 + is the one before that, etc.
143 + An index of 0 may be used for the vertex texture or normal to
144 + indicate none, or these may be left off entirely.
145 + All faces will be broken into triangles in the final mesh.
146 + .I Obj2mesh
147 + currently makes an unsafe assumption that faces are convex,
148 + which may result in odd results if they are not.
149 + .PP
150 + All other statement types will be ignored on the input.
151 + Statements understood by
152 + .I obj2rad(1)
153 + will be ignored silently; other statements will generate
154 + a warning message after translation to indicate how much was missed.
155   .SH DIAGNOSTICS
156   There are four basic error types reported by obj2mesh:
157   .IP
# Line 88 | Line 170 | However, the following internal errors should be menti
170   .IP "Set overflow in addobject (id)"
171   This error occurs when too many surfaces are close together in a
172   scene.
173 < Sometimes a dense mesh can be accomodated by increasing
173 > Sometimes a dense mesh can be accommodated by increasing
174   the maximum resolution (by powers of two) using the
175   .I \-r
176   option, but usually this error indicates something is wrong.
# Line 100 | Line 182 | those causing the problem.
182   .IP "Hash table overflow in fullnode"
183   This error is caused by too many surfaces, and there is
184   little hope of compiling this mesh.
185 < .SH EXAMPLE
186 < To create a compiled triangle mesh from the scene file mesh.obj:
185 > .SH EXAMPLES
186 > To create a compiled triangle mesh from the scene file mesh.obj
187 > using materials from the file mesh.mat:
188   .IP "" .2i
189 < oconv mesh.obj mesh.rtm
189 > obj2mesh -a mesh.mat mesh.obj mesh.rtm
190 > .PP
191 > To use local coordinates to place a square tiled image on a mesh object:
192 > .sp
193 > .nf
194 > void colorpict tiled_pat
195 > 7 red green blue mytile.pic . frac(Lu) frac(Lv)
196 > 0
197 > 0
198 >
199 > tiled_pat plastic tiled_mat
200 > 0
201 > 0
202 > 5 .9 .9 .9 0 0
203 >
204 > tiled_mat mesh tiled_mesh
205 > 1 mymesh.rtm
206 > 0
207 > 0
208 > .fi
209 > .SH ENVIRONMENT
210 > RAYPATH         the directories to search for material files.
211   .SH AUTHOR
212   Greg Ward
213   .SH "SEE ALSO"
214 < gensurf(1), getinfo(1), make(1),
215 < oconv(1), rpict(1), rview(1), rtrace(1), xform(1)
214 > gensurf(1), getinfo(1), make(1), obj2rad(1),
215 > oconv(1), rpict(1), rvu(1), rtrace(1), xform(1)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines