--- ray/doc/man/man1/obj2mesh.1 2003/03/14 21:27:45 1.3 +++ ray/doc/man/man1/obj2mesh.1 2017/03/03 01:25:27 1.13 @@ -1,17 +1,21 @@ -.\" RCSid "$Id" +.\" RCSid "$Id: obj2mesh.1,v 1.13 2017/03/03 01:25:27 greg Exp $" .TH OBJ2MESH 1 03/11/03 RADIANCE .SH NAME obj2mesh - create a compiled RADIANCE mesh file from Wavefront .OBJ input .SH SYNOPSIS .B obj2mesh [ -.B "\-a matinput" +.B "\-a matfile" ][ +.B "\-l matlib" +][ .B "\-n objlim" ][ .B "\-r maxres" ][ .B \-w +][ +.B \-v ] [ .B "input.obj" @@ -30,6 +34,10 @@ which is sent to Any RADIANCE material descriptions included via one or more .I \-a options will be compiled and stored in the mesh as well. +If the +.I \-l +option is used to specify a material file, the RADIANCE library +locations are searched. This mesh may be included in a RADIANCE scene description via the .I mesh primitive, thus: @@ -55,14 +63,12 @@ The .I \-n option specifies the maximum surface set size for each voxel. -Larger numbers result in quicker mesh generation needing -less memory, but potentially slower rendering. -Smaller values may produce faster renderings, -since the default number (15) is on the high side to reduce -the compiled mesh octree size. +Larger numbers result in quicker mesh generation, +but potentially slower rendering. Values below 6 are not recommended, since this is the median valence for a mesh vertex (the number of adjacent faces), and smaller values will result in pointless octree subdivision. +The default setting is 9. .PP The .I \-r @@ -74,6 +80,9 @@ The default is 16384. The .I \-w option suppresses warnings. +The +.I \-v +option prints out final mesh statistics. .PP Although the mesh file format is binary, it is meant to be portable between machines. @@ -96,7 +105,7 @@ direction components, which will be normalized by .I obj2mesh. Normals will be interpolated over the mesh during rendering to produce a smooth surface. -If no vertex normals are present, the mess will appear tesselated. +If no vertex normals are present, the mesh will appear tesselated. A zero length normal (i.e., 0 0 0) will generate a syntax error. .TP .BI vt " u v" @@ -132,14 +141,11 @@ where the first vertex position ( statement) is numbered 1, and likewise for the first texture coordinate and the first surface normal. Negative indices count backward from the current position in -the input, where -1 is the last vertex encountered, -2 +the input, where \-1 is the last vertex encountered, \-2 is the one before that, etc. An index of 0 may be used for the vertex texture or normal to indicate none, or these may be left off entirely. All faces will be broken into triangles in the final mesh. -.I Obj2mesh -currently makes an unsafe assumption that faces are convex, -which may result in odd results if they are not. .PP All other statement types will be ignored on the input. Statements understood by @@ -176,12 +182,34 @@ those causing the problem. .IP "Hash table overflow in fullnode" This error is caused by too many surfaces, and there is little hope of compiling this mesh. -.SH EXAMPLE -To create a compiled triangle mesh from the scene file mesh.obj: +.SH EXAMPLES +To create a compiled triangle mesh from the scene file mesh.obj +using materials from the file mesh.mat: .IP "" .2i -oconv mesh.obj mesh.rtm +obj2mesh \-a mesh.mat mesh.obj mesh.rtm +.PP +To use local coordinates to place a square tiled image on a mesh object: +.sp +.nf +void colorpict tiled_pat +7 red green blue mytile.hdr . frac(Lu) frac(Lv) +0 +0 + +tiled_pat plastic tiled_mat +0 +0 +5 .9 .9 .9 0 0 + +tiled_mat mesh tiled_mesh +1 mymesh.rtm +0 +0 +.fi +.SH ENVIRONMENT +RAYPATH the directories to search for material files. .SH AUTHOR Greg Ward .SH "SEE ALSO" gensurf(1), getinfo(1), make(1), obj2rad(1), -oconv(1), rpict(1), rview(1), rtrace(1), xform(1) +oconv(1), rpict(1), rvu(1), rtrace(1), xform(1)