home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / DOS / GRAFISCH / RAYTRACE / POLYRAY / QUICKREF.TXT < prev    next >
Text File  |  1993-04-24  |  11KB  |  345 lines

  1. This file contains an extremely abbreviated description of the command line
  2. flags, initialization file statements, and data file declarations for Polyray.
  3. See "polyray.doc" and "addendum" for more details.
  4.  
  5. Syntax:
  6.  
  7.    polyray datafile [ options ]
  8.  
  9. Command line options:
  10.  
  11.    -a              Perform simple antialiasing (neighbor averaging)
  12.    -A              Perform adaptive antialiasing (based on threshold)
  13.    -b pixels       pixels calculated between file flushes
  14.    -B              Flush the output file every scan line
  15.    -d probability  Dither objects using the given probability
  16.    -D scale        Dither all rays using the given probability
  17.    -J              Perform jittered antialiasing (fixed # of samples/pixel)
  18.    -o filename     Output file name (default "out.tga")
  19.    -p bits/pixel   Number of bits per pixel 8/16/24/32/Z (default 16)
  20.    -P pallette     Which pallette to use [0=grey, 1=666, 2=884]
  21.    -Q              Abort if any key is hit during trace
  22.    -q flags        Turn on/off various global shading options
  23.    -r renderer     Which rendering method [0=raytrace, 1=scan convert,
  24.                    2=wireframe, 3=raw triangle information]
  25.    -R              Resume an interrupted trace
  26.    -s samples      # of samples per pixel when performing antialiasing
  27.    -t status_vals  Status display type [0=none,1=totals,2=line,3=pixel].
  28.    -T threshold    Threshold to start oversampling (default 0.2)
  29.    -u              Write the output file in uncompressed form
  30.    -v              Trace from bottom to top
  31.    -V mode         Display mode while tracing [0=none,1=VGA,2=Hicolor]
  32.    -W              Wait for key before clearing display
  33.    -x columns      Set the x resolution
  34.    -y lines        Set the y resolution
  35.    -z start_line   Start a trace at a specified line
  36.  
  37. Initialization file ("polyray.ini") keywords:
  38.  
  39.    abort_test       true/false/on/off
  40.    alias_threshold  [Value to cause adaptive anitaliasing to start]
  41.    antialias        none/filter/jitter/adaptive
  42.    clustersize      [# of objects stored in a slab]
  43.    display          none/vga/hicolor
  44.    max_level        [max depth of recursion]
  45.    max_lights       [max # of lights]
  46.    max_queue_size   [max # of objects in a priority queue]
  47.    max_samples      [# of samples to use with antialiasing, or focal blur]
  48.    optimizer        none/bounding_slabs/bsp_tree
  49.    pallette         884/666/grey
  50.    pixel_size       8/16/24/32
  51.    pixel_encoding   none/rle
  52.    renderer         ray_trace/scan_convert/wire_frame/raw_triangles
  53.    shade_flags      [default/bit mask of flags, see section 1.7.1.4]
  54.    shadow_tolerance [miminum distance for blocking objects]
  55.    status           none/totals/line/pixel
  56.    warnings         on/off
  57.  
  58.    Any lines starting with "//" will be treated as comments & ignored.
  59.  
  60. Input file syntax:
  61.  
  62.    [viewpoint statement]
  63.    [object declaration]
  64.    [conditional statement]
  65.    define token expression
  66.    define token [object declaration]
  67.    define token [surface declaration]
  68.    define token [texture map]
  69.    define token [texture declaration]
  70.    define token transform { [rotate/translate/scale/shear statements] }
  71.    total_frames val
  72.    start_frame val
  73.    end_frame val
  74.    outfile "name"
  75.    outfile name
  76.    file_flush xxx
  77.    include "filename"
  78.    background color
  79.    background expression
  80.    haze coeff, starting_distance, color
  81.    light color, location
  82.    light location
  83.    spot_light color, location, pointed_at, Tightness, Angle, Falloff
  84.    spot_light location, pointed_at
  85.    textured_light {
  86.       color color_expression
  87.       [rotate/translate/... statements]
  88.       }
  89.    directional_light color, direction
  90.    directional_light direction
  91.    depthmapped_light {
  92.       [ angle fexper ]
  93.       [ aspect fexper ]
  94.       [ at vexper ]
  95.       [ color expression ]
  96.       [ depth "depthfile.tga" ]
  97.       [ from vexper ]
  98.       [ hither fexper ]
  99.       [ up vexper ]
  100.       }
  101.  
  102. Expressions:
  103.    Floating point operators:
  104.       +, -, *, /, ^
  105.    Functions returning floats:
  106.       acos(x), asin(x), atan(x), atan2(x, y), ceil(x), cos(x), cosh(x),
  107.       degrees(x), exp(x), fabs(x), floor(x), fmod(x, y), legendre(l, m, x),
  108.       ln(x), log(x), max(x, y), min(x, y), noise(P, o), noise(P, <p, n, o>),
  109.       pow(x, y), radians(x), sawtooth(x), sin(x), sinh(x), sqrt(x), tan(x),
  110.       tanh(x), visible(V1, V2), V1 . V2, |x|
  111.    Vector operators:
  112.       +, -, * (cross product, or float times a vector)
  113.    Functions returning vectors:
  114.       color_wheel(x, y, z), dnoise(P, o), dnoise(P, <p, n, o>),
  115.       rotate(V1, <xdeg, ydeg, zdeg>), rotate(V1, V2, deg), reflect(V1, V2)
  116.       trace(P, D)
  117.    Predefined variables:
  118.       u, v, x, y, z, P, W, N, I, start_frame, frame, end_frame
  119.    Image file manipulation:
  120.       environment("file1", "file2", ..., "file6")
  121.       image("file")
  122.       cylindrical_imagemap(image, V [, repeat flag])
  123.       planar_imagemap(image, V [, repeat flag])
  124.       spherical_imagemap(image, V [, repeat flag])
  125.       heightmap(image, V)
  126.       indexed_map(image, V [, repeat flag])
  127.       environment_map(environment, V)
  128.    Color map:
  129.       color_map([v0, v1, Color0, Color1]
  130.             [v2, v3, Color2, Color3]
  131.                 ...
  132.         [vx, vy, Colorx, Colory])
  133.    String manipulation (build single string from a set of string,
  134.    numerical, or vector arguments):
  135.       concat(arg1, arg2, ..., arg3)
  136.  
  137. Viewpoint declaration:
  138.  
  139.     viewpoint {
  140.        [ from vexper ]
  141.        [ at vexper ]
  142.        [ up vexper ]
  143.        [ angle fexper ]
  144.        [ resolution fexper, fexper ]
  145.        [ aspect fexper ]
  146.        [ hither fexper ]
  147.        [ yon fexper ]
  148.        [ dither_rays fexper ]
  149.        [ dither_objects fexper ]
  150.        [ max_trace_depth fexper ]
  151.        [ aperture fexper ]
  152.        [ focal_distance ]
  153.        [ image_format fexper ]    // 0 means normal render, 1 means depth render
  154.        }
  155.  
  156. Object declaration:
  157.  
  158.    object {
  159.       Shape declaration
  160.       [ texture declaration ]
  161.       [ Object modifier declaration ]
  162.       }
  163.  
  164. Shape Declarations:
  165.  
  166.    bezier subdivision_type, flatness_value,
  167.           u_subdivisions, v_subdivision,
  168.           [ 16 comma-separated vertices, i.e.
  169.              <x0, y0, z0>, <x1, y1, z1>, ..., <x15, y15, z15> ]
  170.  
  171.    blob threshold:
  172.       blob_component1
  173.       [, sphere <x, y, z>, strength, radius ]
  174.       [, cylinder <x0, y0, z0>, <x1, y1, z1>, strength, radius ]
  175.       [, plane <nx, ny, nz>, d, strength, distance ]
  176.  
  177.    box <x0, y0, z0>, <x1, y1, z1>
  178.  
  179.    cone <x0, y0, z0>, r0, <x1, y1, z1>, r1
  180.  
  181.    cylinder <x0, y0, z0>, <x1, y1, z1>, r
  182.  
  183.    disc <cx, cy, cz>, <nx, ny, nz>, r
  184.    disc <cx, cy, cz>, <nx, ny, nz>, ir, or
  185.  
  186.    function f(x,y,z)
  187.  
  188.    gridded "filename", object1 object2 ...
  189.  
  190.    height_field "filename"
  191.    smooth_height_field "filename"
  192.  
  193.    height_fn xsize, zsize, min_x, max_x, min_z, max_z, expression
  194.    height_fn xsize, zsize, expression
  195.    smooth_height_fn xsize, zsize, min_x, max_x, min_z, max_z, expression
  196.    smooth_height_fn xsize, zsize, expression
  197.  
  198.    lathe type, direction, total_vertices,
  199.       <vert1.x,vert1.y,vert1.z>
  200.       [, <vert2.x, vert2.y, vert2.z>]
  201.       [, etc. for total_vertices vertices]
  202.  
  203.    parabola <x0, y0, z0>, <x1, y1, z1>, r
  204.  
  205.    polygon total_vertices,
  206.       <vert1.x,vert1.y,vert1.z>
  207.       [, <vert2.x, vert2.y, vert2.z>]
  208.       [, etc. for total_vertices vertices]
  209.  
  210.    polynomial f(x,y,z)
  211.  
  212.    sphere <center.x, center.y, center.z>, radius
  213.  
  214.    sweep type, direction, total_vertices,
  215.       <vert1.x,vert1.y,vert1.z>
  216.       [, <vert2.x, vert2.y, vert2.z>]
  217.       [, etc. for total_vertices vertices]
  218.  
  219.    torus r0, r1, <center.x, center.y, center.z>, <dir.x, dir.y, dir.z>
  220.  
  221.    patch <vert1.x,vert1.y,vert1.z>, <norm1.x,norm1.y,norm1.z>,
  222.          <vert2.x,vert2.y,vert2.z>, <norm2.x,norm2.y,norm2.z>,
  223.          <vert3.x,vert3.y,vert3.z>, <norm3.x,norm3.y,norm3.z>
  224.  
  225.    object1 + object2  - Union
  226.    object1 * object2  - Intersection
  227.    object1 - object2  - Difference
  228.    object1 & object2  - Clipping
  229.    ~object1           - Inverse
  230.  
  231. Root solver declarations (for blobs, polynomials, splined lathes, and tori):
  232.  
  233.    root_solver Ferrari
  234.    root_solver Vieta
  235.    root_solver Sturm
  236.  
  237. Object modifier statements:
  238.  
  239.    translate <tx, ty, tz>
  240.    rotate <rx,ry,rz>
  241.    scale <sx,sy,sz>
  242.    shear yx, zx, xy, zy, xz, yz
  243.    shading_flags flag1+flag2+...
  244.    u_steps u
  245.    v_steps v
  246.    uv_steps u0, u1, v0, v1
  247.    uv_steps u, v
  248.    uv_bounds u0, u1, v0, v1
  249.    bounding_box <x0,y0,z0>, <x1,y1,z1>
  250.    displace expression
  251.  
  252. Shading flag values:
  253.  
  254.    1 = Shadow_Check, 2 = Reflect_Check, 4 = Transmit_Check,
  255.    8  = Two_Sides, 16 = Cast_Shadow, 32 = Check Primary Rays
  256.  
  257.  
  258. Textures:
  259.    texture {
  260.       [ texture declaration ]
  261.       [ rotate/translate/scale/shear ]
  262.       }
  263.  
  264. Texture declarations:
  265.  
  266.    surface { [ surface declarations ] }
  267.    noise surface { [ surface declarations ] }
  268.    special surface { [ surface declarations ] }
  269.    checker texture1, texture2
  270.    hexagon texture1, texture2, texture3
  271.    layered texture1, texture2, ..., textureN
  272.    indexed fn, texture_map([a, b, texture1, texture2]
  273.                ...
  274.                [x, y, texturei, texturej])
  275.  
  276. Surface declarations:
  277.  
  278.    color <r, g, b>
  279.    ambient scale
  280.    ambient color, scale
  281.    diffuse scale
  282.    diffuse color, scale
  283.    specular color, scale
  284.    specular scale
  285.    reflection color, scale
  286.    reflection scale
  287.    transmission color, scale, ior
  288.    transmission scale, ior
  289.    microfacet kind angle
  290.  
  291. Microfacet kinds: Blinn, Cook, Gaussian, Phong, Reitz.
  292.  
  293. Special Surface declarations add the following to Surface declarations:
  294.  
  295.    normal vexper
  296.  
  297. Noise Surface declarations include all surface declarations plus:
  298.  
  299.    color_map(map_entries)
  300.    bump_scale fexper
  301.    frequency fexper
  302.    phase fexper
  303.    lookup_fn index
  304.    normal_fn index
  305.    octaves fexper
  306.    position_fn index
  307.    position_scale fexper
  308.    turbulence fexper
  309.  
  310. The output of the following function is passed through the lookup function,
  311. then into the color map.
  312.    nval = pos * position_scale + turbulence * noise(P, octaves);
  313.  
  314. Valid values for position_fn are:
  315.    0 - No position function used (default)
  316.    1 - X coordinate in object space
  317.    2 - X coordinate in world space
  318.    3 - Distance from z-axis
  319.    4 - Distance from the origin
  320.    5 - Radial measure (counter clockwise) around y-axis
  321.  
  322. Valid values for normal_fn are:
  323.    0 - No modification made to normal (default)
  324.    1 - Bumpy
  325.    2 - Rippled
  326.    3 - Dented
  327.  
  328. Valid values for lookup_fn are:
  329.    0 - Use nval directly
  330.    1 - sawtooth applied to nval
  331.    2 - sin function
  332.    3 - ramp function
  333.  
  334. Conditional processing:
  335.  
  336.    if (cexper)
  337.       [single declaration]
  338.  
  339.    if (cexper) {
  340.       [object/light/... declarations]
  341.       }
  342.    else {
  343.       [other object/light/... declarations]
  344.       }
  345.