Using the command-line renderer


RadiosGL, the command-line renderer, takes in a model file (simple scene description) and produces an RGL output file. Other input parameters specify how the scene is rendered. The input model file (MDL) is a text file containing 3D vertex coordinates and a red-green-blue (RGB) color value for each triangular patch in the scene. Note that only triangular patches are supported (however, almost anything can be built out of triangles). The output file is a binary file containing similar scene coordinates along with a texture map for each triangle in the scene. These texture maps are the result of radiosity rendering and contain all lighting and shading information for each patch. This RGL output file can be loaded by RadiosGLView, the OpenGL renderer, for realtime viewing.

RadiosGL can be compiled and run on virtually every platform. For those platforms with a command-line interface (e.g., Unix and Windows), arguments can be passed to RadiosGL by calling it from the command line. For platforms without a command line (e.g., MacOS), RadiosGL will read the parameters from a text file called "RadiosGL.ini".

Calling RadiosGL with no parameters or with the -? switch will bring up the following usage instructions:

usage:
RadiosGL
        [-?]
        -m model_file  -h hemicube_file
        [-o output_file]  -w hemicube_world_wide
        -a max_patch_area
        -i iteration_threshold
        -s subdivide_threshold
        [-g gamma]  [-t texture_size]

examples:
        RadiosGL -m test.mdl -h myHemicube.hc -w 2.3 -a 50.0 -i 0.01 -s 0.05 -t
64

        RadiosGL -m test.mdl -h myHemicube.hc -w 2.3 -a 50.0 -i 0.01 -s 0.05 -g
0.25

        RadiosGL -m test.mdl -o test.out -h myHemicube.hc -w 2.3 -a 50.0 -i 0.01
 -s 0.05



Optional parameters are surrounded by [ ]. A description of each parameter follows:

model_filename of the MDL file containing the scene description
hemicube_filename of an HC file containing a hemicube
output_filename of an RGL file where the rendered scene will be written
hemicube_world_widewidth of the hemicube in world coordinates
max_patch_areathe largest patch size allowed in the scene; patches with area greater than max_patch_area will be automatically subdivided before the rendering process begins (large patches decrease the accuracy of the output)
iteration_thresholdthe middle phase of the rendering process is run repeatedly, allowing light energy to propagate throughout the scene; eventually, energy values in the scene will reach a steady state, though this may take many iterations; the process can be halted after only a few iterations and achieve satisfactory results; energy values between the last two iterations are compared, and if the energy difference is greater than iteration_threshold, another iteration is run (i.e., energy in the scene hasn't reached a steady state); otherwise, if the change in energy is less than the threshold, this stage in the rendering process ends (more propagation iterations increases the quality of the output)
subdivide_thresholdafter propagating light energy throughout the scene, each patch is examined for large energy discontinuities; if the discontinuities are greater than subdivide_threshold, the patch is subdivided; after all patches in need of subdivision are discovered, the entire rendering process is run again (a low subdivide_threshold increases the quality of the output)
gammathe gamma correction to apply to the scene after rendering it; 1.0 is no correction, 0.5 increase the intensity of low energy regions, and 1.5 decreases the intensity of low energy regions; a value of 0.125 seems to work well to simulate how the human visual system would see the scene
texture_sizethe size of the largest patch texture in the scene; a texture of this size will be used for the patch with the largest area, and smaller patches will receive proportionally smaller textures; note that RadiosGL uses square texture patches, so using 100 for texture_size would make the largest texture 100x100; note also that many 3D cards (e.g., Voodoo2) only support textures with a maximum size of 256x256; keep your 3D card in mind when rendering a scene with RadiosGL; using smaller textures conserves disk space, but it doesn't really affect rendering times


Note that rendering a scene takes a long time. On a fast machine, rendering a scene with as few as 100 patches can take many hours, and rendering time increases if more patch subdivisions are allowed.