--- ray/doc/man/man1/obj2mesh.1 2003/03/12 17:26:58 1.2 +++ ray/doc/man/man1/obj2mesh.1 2004/04/23 00:56:27 1.8 @@ -1,10 +1,14 @@ -.\" RCSid "$Id" +.\" RCSid "$Id: obj2mesh.1,v 1.8 2004/04/23 00:56: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 matfile" +][ +.B "\-l matlib" +][ .B "\-n objlim" ][ .B "\-r maxres" @@ -25,6 +29,13 @@ reads a Wavefront .OBJ file from which is sent to .I output.rtm (or standard output). +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: @@ -39,8 +50,12 @@ mod mesh id .PP The syntax and semantics are identical to the RADIANCE .I instance -primitive, except that the mesh modifier may not be "void", since -materials are not included in a compiled mesh file. +primitive. +If +.I mod +is "void", then the stored mesh materials will be applied during rendering. +Otherwise, the given material will be substituted on +all the mesh surfaces. .PP The .I \-n @@ -87,7 +102,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" @@ -96,6 +111,20 @@ These coordinates will be interpolated and passed to the "Lu" and "Lv" variables during rendering. Local coordinates can extend over any desired range of values. .TP +.BI usemtl " mname" +A material name. +The following faces will use the named material, which is +taken from the material definitions in the +.I \-a +input file(s). +.TP +.BI g " gname" +Group association. +The following faces are associated with the named group. +If no "usemtl" statement has been +encountered, the current group is used for the surface material +identifier. +.TP .BI f " v1/t1/n1 v2/t2/n2 v3/t3/n3" " .." A polygonal face. Polygon vertices are specified as three indices separated @@ -153,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.pic . 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)