Printable Version

SLIDE Enumerated Types


On/Off Type

The On/Off type is the boolean type for SLIDE. This useful for being able to turn on and off different types rendering options and structures. For example, every light path in the render statement can have an On/Off flag which acts as a light switch for that instance of the light. The possible values of the On/Off type are:

SLF_OFF Off or false
SLF_ON On or true

The default value for an On/Off flag is normally SLF_ON.


LOD Type

The LOD type defines the quality of the rendering for a subtree. As LOD flags are passed down the scene hierarchy, a node computes the rendering LOD by taking the minimum of its locally defined LOD and the value being passed down by its parent. If a node of the scene hierarchy has an LOD that is less than SLF_FULL then all of its descendants will not be rendered at their full rendering quality. And in the extreme, if a node has LOD SLF_OFF then that entire subtree will not be rendered at all (and the renderer does not need to compute any bounding box information for its descendants). The possible values for the LOD type are:

SLF_OFF For rendering purposes, this subtree does not exist
SLF_BOUND Render only the bounding box of this subtree
SLF_EDGES Render this subtree in wireframe mode
SLF_FULL Fully render this subtree

The default value for a LOD flag is SLF_FULL.

LOD flags are most useful for turning on and off portions of the scene hierarchy. Dynamic LOD flags can be used to make objects appear and disappear from a scene. This functionality can be used to optimize the rendering of complicated objects. A group node can be set up with instances to multiple representations of an object with varying polygon complexities where only one of these instances will be rendered based on how far away the object is from the camera. When the object is further away from the camera less polygons need to be used to create the same pixel image. The use of less polygons means less work for the renderer and increased frame rate. The instances within the group can be controlled using dynamic LOD flags to create the equivalent of a C language switch statement.

tclupdate {
  set detail [FunctionOfDistanceToCamera]
}

group gSphere
  instance oSphere20Triangles
    lod { if { $detail == 1 } { expr $SLF_FULL } else { expr $SLF_OFF } }
  endinstance
  instance oSphere80Triangles
    lod { if { $detail == 2 } { expr $SLF_FULL } else { expr $SLF_OFF } }
  endinstance
  instance oSphere320Triangles
    lod { if { $detail == 3 } { expr $SLF_FULL } else { expr $SLF_OFF } }
  endinstance
endgroup

Shading Type

The Shading type defines how the polygons of a node will be shaded. A node in the scene hierarchy will pass down its local shading value unless that is SLF_INHERIT in which case it will pass along its parent's shading value. The possible values for the Shading type are:

SLF_INHERIT Shade this node in the same style as its parent
SLF_WIRE Render a wireframe
SLF_FLAT Render with flat shading (one color per polygon)
SLF_GOURAUD Render with Gouraud shading (interpolate vertex colors across each polygon)
SLF_PHONG Render with Phong shading (interpolate vertex normals across each polygon and recompute lighting at each pixel)

The default value for a Shading flag is SLF_INHERIT.

NOTE: Renders may not support all the shading types in which case they will do the best job possible. The OpenGL SLIDE render does not support Phong shading, so SLF_PHONG gets reduced to SLF_GOURAUD.


Solid Type

The Solid type defines whether to apply back face culling to an atomic node of the scene hierarchy. SLF_SOLID should be used for objects which are closed for rendering efficiency. SLF_HOLLOW should be used for objects which consist of infinitely thin surface pieces which should be visible from both sides. The possible values for the Solid type are:

SLF_SOLID Backface culling is ok
SLF_HOLLOW Disable backface culling

The default value for a Solid flag is SLF_SOLID.


Mesh Type

The Mesh type defines whether to use triangles or quadrilaterals for the boundary mesh of an object. The possible values for the Mesh type are:

SLF_TRIANGLES Use triangles
SLF_QUADRILATERALS Use quadrilaterals

The default value for a Mesh flag is SLF_TRIANGLES.


Delaunay Type

The Delaunay type defines the algorithm which will be used to compute the Delaunay triangulation. The possible values for the Delaunay type are:

SLF_TERRAIN_DELAUNAY_INCREMENTAL Incremental algorithm which creates a bounding box and builds an external tree search structure
SLF_TERRAIN_DELAUNAY_INCREMENTAL_SLOW Incremental algorithm which creates a bounding box and uses the current triangulation only as a search structure
SLF_TERRAIN_DELAUNAY_INCREMENTAL_NO_BOUND Incremental algorithm which does not need to build a bounding box and uses the current triangulation only as a search structure
SLF_TERRAIN_DELAUNAY_DIVIDE_AND_CONQUER Divide and conquer algorithm which always splits in the vertical direction
SLF_TERRAIN_DELAUNAY_DIVIDE_AND_CONQUER_ALTERNATING Divide and conquer algorithm which alternatively splits in the vertical and horizontal directions
SLF_TERRAIN_DELAUNAY_CONVEX_HULL Algorithm which lifts the 2D sites into 3D on a parabolic lifting map, computes the 3D convex hull, removes upward facing facets, and reprojects the remaining facets back into the 2D plane

The default value for a Delaunay flag is SLF_TERRAIN_DELAUNAY_DIVIDE_AND_CONQUER_ALTERNATING.


Voronoi Type

The Voronoi type defines the algorithm which will be used to compute the Voronoi diagram. The possible values for the Voronoi type are:

SLF_VORONOI_OFF The Voronoi diagram is not computed
SLF_VORONOI_DELAUNAY The Voronoi diagram is computed by taking the dual of the Delaunay triangulation
SLF_VORONOI_DIVIDE_AND_CONQUER Divide and conquer algorithm which always splits in the vertical direction
SLF_VORONOI_DIVIDE_AND_CONQUER_ALTERNATING Divide and conquer algorithm which alternatively splits in the vertical and horizontal directions
SLF_VORONOI_CONES Raster based algorithm which renders the distance functions of the input sites and lets the Z-buffer resolve the booleans
SLF_VORONOI_PLANES Raster based algorithm which renders the tangent planes to the lifting map for each input site and lets the Z-buffer resolve the booleans

The default value for a Voronoi flag is SLF_VORONOI_OFF.


Accuracy Type

The accuracy type defines which technique to use to try to keep numerical accuracy. The possible values for the accuracy type are:

SLF_FLOAT_NAIVE Do all floating point operations naively
SLF_FLOAT Translate floating point calculations to the origin
SLF_EXACT Use an exact algebra library

The default value for an accuracy flag is SLF_FLOAT.


Subdivision Type

The subdivision type defines the subdivision algorithm. The possible values for the Subdivision type are:

SLF_SUBDIVISION_DOO_SABIN NURSS scheme which reduces to quadratic B-splines. The control mesh does not have to be a closed polyhedron.
SLF_SUBDIVISION_CATMULL_CLARK NURSS scheme which reduces to cubic B-splines. The control mesh does not have to be a closed polyhedron.
SLF_SUBDIVISION_SHARP_CATMULL_CLARK DeRose scheme with sharp edge tags. The control mesh does not have to be a closed polyhedron.
SLF_SUBDIVISION_CATMULL_CLARK_TESSELATE Catmull-Clark scheme with simply increases the polygon density by subdividing the control polygons into sub-quadrilaterals
SLF_SUBDIVISION_CATMULL_CLARK_INTERPOLATE Kobbelt interpolatory scheme based on the four point rule
SLF_SUBDIVISION_TRIANGLE_TESSELATE TRIANGLES ONLY: Subdivide each triangle into 4 subtriangles without changing the geometry
SLF_SUBDIVISION_TRIANGLE_LOOP TRIANGLES ONLY: First subdivision splits any non-triangles into triangles by creating the centroid and fanning triangles out from it. Subdivide each triangle into 4 subtriangles approximating scheme
SLF_SUBDIVISION_TRIANGLE_LOOP_EDGE_RULE TRIANGLES ONLY: First subdivision splits any non-triangles into triangles by creating the centroid and fanning triangles out from it. New Loop scheme that bounds curvature changes
SLF_SUBDIVISION_TRIANGLE_BUTTERFLY TRIANGLES ONLY: First subdivision splits any non-triangles into triangles by creating the centroid and fanning triangles out from it. Subdivide each triangle into 4 subtriangles simple interpolating scheme
SLF_SUBDIVISION_TRIANGLE_ZORIN TRIANGLES ONLY: First subdivision splits any non-triangles into triangles by creating the centroid and fanning triangles out from it. Subdivide each triangle into 4 subtriangles more complicated interpolating scheme
SLF_SUBDIVISION_CORNER_CUTTING Simple corner cutting scheme (usually needs twice as many iterations as the other techniques)
SLF_SUBDIVISION_CORNER_ROUNDING_TESSELATE Similar to the triangle scheme, but it will work with all types of polygons. The number of non-triangles will remain constant throughout the subdivision.
SLF_SUBDIVISION_CORNER_ROUNDING_LOOP Approximating scheme
SLF_SUBDIVISION_CORNER_ROUNDING_SHARP_LOOP Approximating scheme with sharp edge tags (DeRose, Hoppe)
SLF_SUBDIVISION_CORNER_ROUNDING_BUTTERFLY Butterfly interpolating scheme
SLF_SUBDIVISION_CORNER_ROUNDING_ZORIN Zorin's interpolating scheme
SLF_SUBDIVISION_SQRT_3 Kobbelt's Sqrt(3) scheme
SLF_SUBDIVISION_SQRT_4 Experimental quad scheme that is similar to Sqrt(3)
SLF_SUBDIVISION_PROGRESSIVE Simplistic progressive mesh implementation
SLF_SUBDIVISION_SQRT_3_SPHERE_* Experimental schemes attempting to average interpolating spheres
SLF_SUBDIVISION_HETEROGENEOUS Experiment at mixing Loop with Catmull-Clark
SLF_SUBDIVISION_GEOMETRIC Experimental biarc scheme
SLF_SUBDIVISION_PENTAGON Experimental scheme based on pentagons

The default value for a Subdivision flag is SLF_SUBDIVISION_CATMULL_CLARK.


Offset Type

The offset type defines the offset algorithm. The possible values for the offset type are:

SLF_OFFSET_ANGULAR This offsets the control mesh inward and outward. Each facet in the control mesh will map to two facets in the offset mesh. Each boundary edge will map to a quadrilateral. The control mesh does not have to be a closed polyhedron.
SLF_OFFSET_PERFORATED In this offsetting technique, the edges of the control mesh are viewed as infinitely thin wires which are then thickened in an angular way. The control mesh does not have to be a closed polyhedron.

The default value for an offset flag is SLF_OFFSET_ANGULAR.


Projection Type

The Projection type defines whether a camera performs a parallel or perspective projection. The possible values for the Projection type are:

SLF_PARALLEL Parallel projection (the viewer is infinitely far away)
SLF_PERSPECTIVE Perspective projection (the viewer is local to the scene)

The default value for a Projection flag is SLF_PARALLEL.


Light Type

The Light type defines way a SLIDE light works. The possible values for the Light type are:

SLF_AMBIENT Ambient light which has been scatter to the point where it illuminates all surfaces equally regardless of geometry
SLF_DIRECTIONAL A directional light is located infinitely far away from a scene, so all its rays arrive parallel to a given direction and its energy does not attenuate with distance (e.g. the sun)
SLF_POINT A point light is located at a single finite point and radiates light equally in all directions. Its energy is attenuated with distance.
SLF_SPOT A spot light is located at a single finite point, but it radiates its light along a principle direction. Its energy is attenuated with distance and falls off with angle away from its priciple direction.

The default value for a Light flag is SLF_AMBIENT.


Fog Type

The Fog type defines how the fog effect is computed. The possible values for the Fog type are:

SLF_LINEAR Fog is compute based on a linear function of z (this is also known as depth cuing)
SLF_EXP Fog is compute based on an exponential linear function of the form e-az
SLF_EXP2 Fog is compute based on an exponential linear function of the form e-(az)2

The default value for a Fog flag is SLF_LINEAR.


Stencil Type

The Stencil type defines a stencil pattern to be used in the stencil buffer. This is useful for rendering stereo images by interlacing the left and right eye views in the even and odd horizontal scan lines. Some Head Mounted Displays (HMD's) take this format as stereo input. Also red and green images can be rendered interlaced and viewed with 1950's style 3D glasses to create a low cost stereo display. The possible values for the Stencil type are:

SLF_BOTH The stencil buffer is empty and disabled for performance
SLF_ODD The even horizontal lines of the stencil buffer are filled, so that the rendering will appear in the odd lines
SLF_EVEN The odd horizontal lines of the stencil buffer are filled, so that the rendering will appear in the even lines

The default value for a Stencil flag is SLF_BOTH.


Ratio Type

The Ratio type defines whether the aspect ratio of a window will be preserved under resizing. The aspect ratio of a window is derived from its size field. The possible values of the Ratio type are:

SLF_FIXED The original aspect ratio will be preserved
SLF_ANY The original aspect ratio will not be preserved
SLF_FULL_SCREEN The window should be opened up full screen ignoring the size field. This is the only way to initialize a window to be the full screen dimensions of a non-square display. After the window is opened, it then acts the same as SLF_ANY.

The default value for a Ratio flag is normally SLF_FIXED.


[an error occurred while processing this directive]