Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ surf_light_(3G) — PersonalVisualizer 2.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bf_surf_light_model(3G)

fill_color(3G)

surf_global_model(3G)

surface_model(3G)

surf_light_model(3G)

NAME

surf_light_model, inq_surf_light_model − set/inquire light-emission characteristics for surfaces in global renderings

SYNOPSIS

C Syntax:

void surf_light_model(fildes,attr);
int fildes,attr;

void inq_surf_light_model(fildes,attr);
int fildes,*attr;

FORTRAN77 Syntax:

subroutine surf_light_model(fildes,attr)
integer*4 fildes,attr

subroutine inq_surf_light_model(fildes,attr)
integer*4 fildes,attr

Pascal Syntax:

procedure surf_light_model(fildes,attr:integer);

procedure inq_surf_light_model(fildes:integer;
var attr:integer);

DESCRIPTION

Input Parameters

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

Input/Output Parameters

attr Specifies light emission characteristics for subsequent surface primitives.  When set to DIFFUSE_LIGHT, subsequent surface primitives will emit light in radiosity renderings and will not cast shadows in either radiosity or ray traced renderings.  When set to NO_LIGHT, subsequent surface primitives do not emit light in radiosity renderings and cast appropriate shadows in both radiosity and ray tracing images. 

Discussion

surf_light_model allows surface primitives to act as diffuse area light sources in radiosity renderings.  The light emitted by area light sources in radiosity attenuates with increasing distance, and is the color set by the most recent call to fill_color.  Objects illuminated by an area source cast realistic soft-edged shadows.  Note, however, that DIFFUSE_LIGHT objects themselves will not cast shadows.  Primitives created when attr is NO_LIGHT do not emit light themselves but may be illuminated by light sources in the scene and cast shadows where appropriate. 

Ray tracing does not currently support area light sources, so setting surf_light_model to DIFFUSE_LIGHT for a ray tracing will NOT cause subsequent primitives to emit light in ray traced images.  The ray tracer does however prohibit DIFFUSE_LIGHT surfaces from casting shadows in the ray tracing.  This is done so that a segment containing area lights can also be ray traced.  If, for example, point lights are placed behind the area lights in the model segment, they will simulate in a ray tracing the illumination provided by the area lights in a radiosity rendering of the segment.  Except for not casting shadows, DIFFUSE_LIGHT primitives in ray tracing are shaded as if set to NO_LIGHT. 

Unlike other surfaces, surface primitives created when attr is DIFFUSE_LIGHT are placed in the database of renderable surfaces by render_scene even if shading is turned off with shade_mode.  This allows flat-shaded surfaces, which are often used in Starbase to simulate the appearance of area lights, to be included in standard Starbase, radiosity, and ray traced renderings. 

surf_light_model, like other commands that affect surface attributes, can be set a number of times during a segment.  Attr is usually set to DIFFUSE_LIGHT for a particular primitive and then immediately reset to NO_LIGHT. 

NOTES

In addition to area lights defined explicitly with surf_light_model, the radiosity algorithm also takes into account any Starbase point or directional light sources that are set on when the end of the segment network is encountered during render_scene.  While point and directional lights provide illumination for the rendering, the light source itself has no surface area, and thus is not visible in the rendered image.  Best results are obtained when the Starbase lights are located outside of the scene and pointed toward the scene interior, much the same as photographer’s lights. 

surf_light_model has no effect on standard Starbase renderings. 

ERRORS

Invalid file descriptor. 
Invalid value for attr. 

DEFAULTS

attr =  NO_LIGHT: surface primitives do not emit light. 

SEE ALSO

bf_surf_light_model(3G), fill_color(3G), surf_global_model(3G), surface_model(3G)

  —  July 12, 1991

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