--- ray/doc/man/man1/genbox.1 2007/09/04 17:36:40 1.4 +++ ray/doc/man/man1/genbox.1 2021/04/09 01:48:20 1.5 @@ -1,16 +1,21 @@ -.\" RCSid "$Id: genbox.1,v 1.4 2007/09/04 17:36:40 greg Exp $" +.\" RCSid "$Id: genbox.1,v 1.5 2021/04/09 01:48:20 greg Exp $" .TH GENBOX 1 11/15/93 RADIANCE .SH NAME -genbox - generate a RADIANCE description of a box +genbox - generate a RADIANCE or Wavefront description of a box .SH SYNOPSIS .B "genbox mat name xsiz ysiz zsiz" [ .B \-i ][ -.B "\-r rad" -| .B "\-b bev" +| +.B "\-r rad" +[ +.B "\-n nseg ] +][ +.B \-o +] .SH DESCRIPTION .I Genbox produces a RADIANCE scene description of a parallelepiped @@ -22,24 +27,57 @@ The surfaces that make up the box will be modified by .I mat and their identifiers will begin with .I name. +.PP The .I \-i option can be used to produce a box with inward directed surface normals. +.PP The -.I \-r -option can be used to specify the radius for rounded edges. -The .I \-b option can be used to specify the indentation for beveled edges. +.PP +The +.I \-r +option can be used to specify the radius for rounded edges, which +are modeled as cylinders and spheres for non-inverted RADIANCE output. +However, this type of model only makes sense for external views of +an opaque object. +If a rounded box is inverted using +.I \-i, +then the corners and edges are modeled with polygons, instead. +This option can also be forced by specifying a minum number of +segments with the +.I \-n +option. +.PP +The +.I \-o +option specifies Wavefront .OBJ output, and +also forces polygons to be used with the +.I \-r +option. +In this case, vertex normals are also produced for smooth rendering. .SH EXAMPLE -To produce a rectangular box made of wood with beveled edges: +To produce a rectangular box made of wood with rounded edges: .IP "" .2i -genbox wood box1 5 8 3 \-b .5 > box1 +genbox wood box1 5 8 3 \-r .5 > box1.rad +.PP +To produce a box made of crystal with beveled edges: +.IP "" .2i +genbox crystal box2 3 7 1 \-b .1 > box2.rad .SH AUTHOR Greg Ward .SH BUGS Because spheres and cylinders are used to construct boxes with rounded edges, a transparent box of this type appears quite messy. +The preferred alternative in this case is the +.I \-n +option, which produces polygons, instead. +However, normal smoothing is only applied to the Wavefront .OBJ output, +so this must be passed through +.I obj2rad +to get perfectly smooth results. .SH "SEE ALSO" -genrev(1), gensurf(1), genworm(1), rpict(1), rvu(1), xform(1) +genrev(1), gensurf(1), genworm(1), obj2mesh(1), obj2rad(1), +robjutil(1), rpict(1), rvu(1), xform(1)