Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ set_ray_aa_(3G) — PersonalVisualizer 2.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

render_scene(3G)

set_ray_aa_parms(3G)

NAME

set_ray_aa_parms, inq_ray_aa_parms − set/inquire ray tracing anti-aliasing parameters for a global rendering scene

SYNOPSIS

C Syntax:

void set_ray_aa_parms(fildes,scene_id,max_rays,max_variance);
int fildes,scene_id,max_rays;
float max_variance;

void inq_ray_aa_parms(fildes,scene_id,max_rays,max_variance);
int fildes,scene_id,*max_rays;
float *max_variance;

FORTRAN77 Syntax:

subroutine set_ray_aa_parms(fildes,scene_id,max_rays,
max_variance)
integer*4 fildes,scene_id,max_rays
real max_variance

subroutine inq_ray_aa_parms(fildes,scene_id,max_rays,
max_variance)
integer*4 fildes,scene_id,max_rays
real max_variance

Pascal Syntax:

procedure set_ray_aa_parms(fildes,scene_id,max_rays:integer;
max_variance:real);

procedure inq_ray_aa_parms(fildes,scene_id,var max_rays:
integer;var max_variance:real);

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

scene_id Scene identifier; as returned by create_scene. 

Input/Output Parameters

max_rays Gives the maximum number of rays per pixel, regardless of the variance.  Currently supported values are 1, 4, and 16. 

max_variance
Gives the maximum allowable variance between successive samples. The range is 0.0 through 1.0.

Discussion

set_ray_aa_parms sets the parameters that control how image anti-aliasing is performed when scene_id is ray traced.  Ray tracing uses an adaptive scheme for anti-aliasing that uses the variance between successive samples to determine the need for more rays.  The max_rays parameter defines the maximum number of primary rays generated for a pixel, regardless of the variance of the samples.  The amount of variance allowed before more rays are generated is controlled by the max_variance parameter. 

When max_rays is set to 1, the corners of each pixel are sampled and blended, but no other anti-aliasing is performed.  When set to 4, the corners of the pixel are compared.  If the difference between the low and high values in any color channel (RGB) is greater than max_variance, then 5 more samples are taken across the pixel, forming a 3x3 grid of sample points which is then blended.  When max_rays is set to 16, the variance is checked for the corners, then checked if needed for each of the 4 boxes formed by the 3x3 grid.  More samples are retrieved as needed and blending is performed. 

NOTES

Ray tracing parameters do not affect radiosity renderings of scene_id. 
This command cannot be stored in a segment.

ERRORS

Invalid file descriptor. 
Invalid scene_id. 
max_rays out of range. 
max_variance out of range. 

DEFAULTS

create_scene defaults max_rays to 1 and max_variance to 0.1. 

SEE ALSO

render_scene(3G). 

  —  July 12, 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026