Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ set_rad_amb(3G) — PersonalVisualizer 2.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

light_ambient(3G)

set_rad_scale(3G)

surface_coefficients(3G)

set_rad_ambient_mode(3G)

NAME

set_rad_ambient_mode, inq_rad_ambient_mode − set/inquire ambient light computation mode for radiosity rendering

SYNOPSIS

C Syntax:

void set_rad_ambient_mode(fildes,scene_id,mode);
int fildes,scene_id,mode;

void inq_rad_ambient_mode(fildes,scene_id,mode);
int fildes,scene_id,*mode;

FORTRAN77 Syntax:

subroutine set_rad_ambient_mode(fildes,scene_id,mode)
integer*4 fildes,scene_id,mode

subroutine inq_rad_ambient_mode(fildes,scene_id,mode)
integer*4 fildes,scene_id,mode

Pascal Syntax:

procedure set_rad_ambient_mode(fildes,scene_id,mode:integer);

procedure inq_rad_ambient_mode(fildes,scene_id,var mode
:integer);

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

mode Selects the method used to determine ambient contribution to a rendering.  May be STARBASE_AMBIENT or RAD_AMBIENT. 

Discussion

set_rad_ambient_mode determines the type of ambient illumination that will be added to an image computed with radiosity. 

Ambient illumination represents the effect of the light reflected to a surface from all other surfaces in an environment.  Normal Starbase rendering approximates ambient illumination by simply adding the illumination specified by the light_ambient command to the shaded image.  The radiosity renderer, on the other hand, computes true ambient illumination, generating a more and more accurate ambient term as more solution steps are completed.  During the early steps of the radiosity solution, however, the ambient contribution may appear incomplete or unrealistic because all the light inter-reflections in the model have yet to be computed. 

set_rad_ambient_mode allows the user to choose between Starbase or radiosity ambient light calculations for a given rendering by appropriately setting the mode parameter. 

If mode is set to STARBASE_AMBIENT, the ambient light set by the light_ambient command will be added to the radiosity image.  The amount of ambient light will remain constant as more steps are done.  When using STARBASE_AMBIENT, the ambient light is multiplied by the value of ka (set with surface_coefficients) for each surface to get the final ambient contribution. 

If mode is set to RAD_AMBIENT, an approximation of the ambient illumination is determined based on the amount of light energy in the environment and applied to the model.  As subsequent steps of the radiosity solution occur, the effects of the approximated ambient term decrease as the radiosity shading values provide a more and more accurate rendering. 

When using RAD_AMBIENT, the ka value is ignored.  All illumination in radiosity, including the ambient approximation, is multiplied by kd for each surface to get the final shading value.  Both ka and kd are set with surface_coefficients. 

NOTES

To maintain image illumination levels that are consistent with standard Starbase rendering techniques, the default mode, STARBASE_AMBIENT, should be used for models in which point light sources provide the only illumination.  If area lights provide the sole illumination, either RAD_AMBIENT or STARBASE_AMBIENT can be used.  Note that the state of set_rad_scale at output time can also significantly affect the overall illumination levels in the radiosity image. 

The ambient illumination mode cannot be changed between steps of the radiosity solution.  Radiosity only inquires the ambient illumination mode when render_scene is called with a compute_type of COMPUTE_RAD_FIRST.  If mode is reset between subsequent steps of the solution for a given scene_id, the new setting is silently ignored. 

This command cannot be stored in a segment. 

ERRORS

invalid file descriptor. 
invalid scene_id. 
invalid mode. 

DEFAULTS

mode: STARBASE_AMBIENT. 

SEE ALSO

light_ambient(3G), set_rad_scale(3G), surface_coefficients(3G). 

  —  July 12, 1991

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