DoGlbRendMaxObjs(3D) — Stardent Computer Inc. (Doré)
NAME
DoGlbRendMaxObjs − Create a studio attribute object that defines the maximum number of objects per spatial subdivision for global ray casting
SYNOPSIS
C:
DtObject DoGlbRendMaxObjs(maxobjs)
DtInt maxobjs;
Fortran:
INTEGER∗4 DOGRMO(MAXOBJ)
INTEGER∗4 MAXOBJ
DESCRIPTION
DoGlbRendMaxObjs creates a studio attribute object that defines the maximum number of objects per spatial subdivision for global ray casting. The parameter maxobjs specifies the maximum number of geometric entities allowed per spatial subdivision prior to ray casting.
DoGlbRendMaxObjs affects only renderers that use ray casting. The rendering style is set with DvSetRendStyle <DVSRS>.
Ray casting is the process of determining which objects in the scene are in the path of an arbitrary vector (ray) in space. Ray casting is used in the generation of global shading effects like shadows, object-to-object reflections, and transparency.
Many renderers use a spatial-subdivision based ray casting algorithm to facilitate the ray casting process in complex scenes containing many geometric entities. A preprocessing step is performed on the scene to collect information about all geometric entities in the environment and then to perform a regular binary subdivision of all space containing geometric entities. The subdivision creates a three-dimensional grid of boxes; i.e, the first level subdivision creates 8 equal boxes placed 2 wide by 2 high by 2 deep, fully subdivided space to two levels creates 64 boxes, and so on. Each box can contain 0 or more geometric entities with more boxes wherever the density of geometric entities is higher. In Doré, the amount of spatial subdivision performed is controlled by these factors:
The number, density, and distribution of geometric entities in the scene.
The user-defined control, DoGlbRendMaxObjs.
The user-defined control, DoGlbRendMaxSub <DOGRMS>.
DoGlbRendMaxObjs determines the maximum number of geometric entities that a box may contain without being further subdivided. For example, if the maximum number is set to 2, then boxes containing 2 and fewer entities will not be subdivided further; boxes containing more than 2 will be subdivided. Often a given area of space will always contain more than the maximum number of geometric entities; i.e., if 5 geometric entities intersect at a given point, then the area of space containing that point will never contain less than 5 geometric entities.
DoGlbRendMaxSub <DOGRMS> tells the preprocessor how many levels to subdivide before subdivision of that branch is terminated; i.e., it tells the preprocessor when to stop subdividing regardless of the number of geometric entities per box.
In general, the fewer geometric entities per subdivision, the easier to cast rays through each box.
DEFAULTS
The default value for DoGlbRendMaxObjs is 1.
SEE ALSO
DoGlbRendMaxSub(3D), DoGlbRendRayLevel(3D)
September 29, 2021