This document describes the input format for the renderer used in CMSC 635. VIEWING COMMANDS: frame: framenumber - an integer value for the frame number device: screen - render to the screen device: file filename - render to an rle file called filename viewport: vb vt vl vr - the viewport limits range: -1.0 to 1.0 coi: x y z - center of interest observer_position: x y z - observer position observer_hither_yon: hither yon - hither and yon clipping planes observer_angle: view angle - viewing angle in degrees background: r g b - the color for the background 0.0 to 1.0 interp_light: yes/no - enter no for constant light vector per face , yes for recalculating light vectors per pixel. LIGHT COMMAND The following command may be repeated up to 20 times. -------------- light_position: x y z - the light position light_coi: x y z center of interest light_falloff: fall_off the integer fall off factor (normally 1) light_color: r g b color of the light light_angle: angle of illum angle of illumination in degrees OBJECT COMMANDS The following commands are entered for each object. =============== They MUST appear after the above general commands per scene. All of the commands have default valuse and may be omitted if the default values are what you want. object: filename.det - the object filename back_face: no/yes - yes = render backfaces, no = don't bound_box: xmax ymax zmax xmin ymin zmin - this is used to scale and translate the object into a -1:1 box for solid texturing. defaults: 1 1 1 -1 -1 -1 shade: faceted/phong - faceted means faceted shading, phong means Phong smooth shading default: phong illumination_type: phong/blinn/cooke-torrence - phong = phong specular, blinn = blinn specular, cooke-torrence = cooke-torrence specular. default: phong For type blinn: also enter index of refraction For type cooke_torrence: also enter fresnel factors at normal incidence r,g,b. examples: illumination_type: phong illumination_type: cooke-torrence .8 .7 .3 illumination_type: blinn index_refrac: .5 color_type: 1 r g b - color for the object 2 vertex_filename - color per vertex - not implemented 4 poly_filename - color per poly 8 txt_filename u v 0/1 - textured enter filename, table dimensions, 0 = per face, 1 =wrapped 16 funcion_name - procedural texture (solid) enter function name default: 1 1 0 0 examples: color_type: 1 1 0 0 color_type: 2 vertex_color_fil.vtx color_type: 4 poly_color_file.pcl color_type: 8 mandril 512 512 1 color_type: 16 marble_color normal_type: 1 - normal normal 8 filename u v 0/1 - textured normal (table based) 16 function_name - procedural texture default: 1 intensity_type: 1 - no intensity texuring 8 filename u v 0/1 16 function_name see normal-type default: 1 env_type: 1 - see normal_type 8 16 default: 1 transp_type: 1 min max - constant transparency enter min/max transp values 0=opaque 1.0=full transp. 2 vert_filename 4 poly_filename 8 txt_filename u v 0/1 - textured u,v sizes 0=per face, 1=wrapped 16 function_name - functional transparency texturing default: 1 0 0 - opaque note: - transparent objects must appear last in the input. scale: x y z default: 1 1 1 rotate: x y z default: 0 0 0 translate: x y z default: 0 0 0 illum_parms: pa - ambient component pd - diffuse component ps - specular component pows - Phong specular - specular exponent Blinn, Cooke-torrence - enter a value between 0.0 and 1.0. defaults: pa=.25, pd =.75, ps=1.0, pows=50 SAMPLE INPUT SCRIPT ==================== frame: 0 device: file ./new_test.rle # This is how comments are entered in # 640x484 or there abouts viewport: -.47275 .47275 -.625 .625 coi: 0 0 0 observer_position: 0 0 100.0 observer_hither_yon: 1 1000 observer-angle: 10 # lights light_position: 200 0 1000 light_coi: 0 0 0 light_falloff: 1 light_color: 1 1 1 light_angle 180 background: 0 0 .5 interp_light: yes object: /n/shape/0/edge/data/pot7.det bound_box: 300 300 50 -300 -300 -50 shade: phong illumination_type: phong color_type: 1 1 0 1 transparency_type: 1 0 0 scale: 1 1 1 rotate: 0 90 0 translate: 0 0 0 illum_parms: .25 .65 1 50