<< Back      Brief Index      Full Index      Forward >>

Set_Rendering_Options


Functions

void Set_Rendering_Options (const char *list)
void QSet_Rendering_Options (const char *segment, const char *list)
void UnSet_Rendering_Options (void)
void UnSet_One_Rendering_Option (const char *which)
void QUnSet_Rendering_Options (const char *segment)
void QUnSet_One_Rendering_Option (const char *segment, const char *which)

Function Documentation

void Set_Rendering_Options ( const char *  list  ) 

Allows you to control how carefully and accurately your scene is drawn, and to enable several special drawing effects.

Parameters:
list - A quoted string or a string variable containing a list of the desired settings.
Supported Options:
anti alias, atmospheric attenuation, attribute lock, color interpolation, color index interpolation, cut geometry options, debug, clear debug, set debug, depth range, display lists, face displacement, force grayscale, general curve, general displacement, geometry options, hidden line removal options, hidden surface removal algorithm, image scale, image tint, join cutoff angle, lighting interpolation, lighting, level of detail, level of detail options, local cutting planes, mask transform, nurbs surface, perspective correction, quantization, screen range, shadow map, simple reflection, simple shadow, stereo, stereo distance, stereo separation, software frame buffer options, tessellation, texture interpolation, transparency

DETAILS

"Rendering," in computer graphics, is the process of converting a scene description into actual specific pixels on a screen or lines on a page. The "Rendering Options" attribute, in HOOPS, lets you make some choices about the basic algorithms the system should use to do the rendering. You make these choices by specifying the minimum properties you want the final image to have. Then HOOPS selects and calls upon the available algorithms and hardware to achieve the requested quality.

The list of "qualities" is passed to the system as an arbitrarily long formatted string containing one or more specifications, separated from each other by commas. Saying "option" or "no option" is the same as saying "option = on" or "option = off". You can use whichever style you please. Uppercase versus lowercase is not significant, nor are any leading or trailing blanks on any specification. Embedded blanks within the option name itself are significant.

Each individual Rendering Option inherits up and down the segment tree and is Set independently of all the other choices---you might find yourself calling Set_Rendering_Options() several times in a row, feeding in more choices each time. The new choices are merged with the old as they arrive. This avoids having to make the call just once with one long specification string. (Note that UnSet_Rendering_Options() removes all the information for the attribute for that segment---use UnSet_One_Rendering_Option() to discard just one of the options described below.)

The following choices for list are recognized:

  • anti-alias [= (option, option, ...)]
    Enables anti-aliasing for a given segment. Default is off. For instructions on how to control the number of samples, see the "anti-alias" option for Set_Driver_Options(). Legal choices for option are:

    • lines [= on|off]

      All lines and edge geometry is anti-aliased.

    • text [= on|off]

      All text geometry is anti-aliased.

    • screen [= on|off]

      The full scene is anti-aliased. This option is only allowed on drivers that were initialized with the anti-alias Driver_Option set.

    • on|off

      Toggles anti-aliasing for all of the options above.

  • [no] atmospheric attenuation [= (hither = x.x, yon = x.x)]
    Also referred to as fog or depth cueing, atmospheric attenuation is implemented via a linear interpolation model. In the linear model, the color at each vertex of a primitive is dependent on it's position relative to two reference planes perpendicular to the viewing axis. Given hither and yon plane values, the color is calculated as
    atmospheric attenuation = (z - yon) / (hither - yon) 
    
    final color = atmospheric attenuation * input color +
                  (1 - atmospheric attenuation) * background color 
    
    In general, the hither and yon planes should reflect the extent of the objects in camera - eye space (see Compute_Coordinates() and Compute_Circumsphere() for conversions to this coordinate system). The default is "no atmospheric attenuation". Note: The hither and yon planes of atmospheric attenuation have no effect on z-buffering. HOOPS does not currently provide user control of hither and yon planes for use by the z-buffer.

  • [no] attribute lock[= (type, type)]
    Temporarily overrides attribute settings within a segment tree, where "type" is any one of the settable HOOPS attributes such as "color", "marker size", "color map", etc. The word can also be "style", to prevent style-segments from being observed, or "everything", to lock all attributes. For example, the user might want to temporarily turn all lines red to highlight them, even though some inner segments have other line colors set. To do this, the user can set the line color to "red" in the owner segment and then lock that color setting:
    
         "attribute lock = color"
    
    This would cause the inner segments' color settings not to have any effect on the rendering of the tree - to become "invisible" - unless or until an inner segment explicitly turns the lock back off within its scope. Locking mechanisms may be further refined by specifying discrete geometry types and multiple attributes, such as color and visibility. For example:
    
    "attribute lock = (face pattern, color = (face, markers), visibility=(edge))"
    
    Attribute locks may also be placed on any of the color suboptions. For example, if the user wanted to lock the diffuse color settings, an attribute lock could be placed on the diffuse channel:
    
    "attribute lock = (color = (faces = diffuse))"
    
    This would ensure that transparency or specular settings would not be overwritten on objects affected by the attribute lock. Attributes that are not inherited cannot be locked. These include "streaming mode", "metafile", "normal" and "window". Furthermore, the "attribute lock" property itself can't be locked. The default is "no attribute lock". See the Restrictions section for more information regarding attribute lock. NOTE: "no attribute lock" explicitly turns off locks, both on the specified segment, and any children. However, setting "no attribute lock" absolutely does not unset a previously established lock (although the visual effect will often be the same, depending on the data). To ensure that attribute locks are properly disabled, use UnSet_One_Rendering_Option("attribute lock").

  • [no] color interpolation[ = faces/edges]
    HOOPS allows you to "false-color" polygons, shells, or meshes by setting nominal edge and face colors at each vertex via Open_Vertex() and then one of the Set_Color() routines. Specifying "color interpolation" tells the system that such vertex face colors should be smoothly interpolated along the edge and across the interior of the face. If you say "no color interpolation," the system draws the edge or face using the explicit local face color ( Open_Face() and Set_Color() ) if any, otherwise the segment-level edge or face color. The default is "color interpolation". Note that color interpolation is only meaningful for edge and faces with vertex face colors. Refer to the entry on Set_Color_By_FIndex() for an additional discussion of color interpolating.

  • [no] color index interpolation[ = faces/edges/isolines]
    This is related to "color interpolation". If the "vertex edge colors" or "vertex face colors" are set "by index," the system can either interpolate the indices and then convert them to a color at each pixel ("color index interpolation" specified), or convert the indices into colors at each vertex. Then (optionally) interpolate the colors ("no color index interpolation"). All combinations of "color interpolation" and "color index interpolation" are legal except isolines. Both "on" gives you colors that vary smoothly between the colors in your color map. The first "on" and the second "off" gives you colors that start rounded off to the nearest color map entry and vary smoothly in RGB space (which might or might not have anything to do with your chosen color map rainbow). The first "off" and the second "on" gives you discretely changing colors, such as a contour map. Both "off" gives each face a separate flat color (local or segment-level). These four combinations can be applied to edges and faces separately. The default is "color index interpolation". This default is only meaningful when there are edge or faces present that have colors set "by index" at the vertices. To render color interpolation data as boundary polylines instead of color bands, use color index interpolation = isolines. This is equivalent to 'contour lines'. Default is no isolines. Fractional color index values at the vertices are useful when doing color index interpolation, in order to get the phasing right. Set_Color_By_FIndex() lets you set such values. See Set_Color_By_FIndex() for anadditional discussion of color interpolating.

  • cut geometry options = (option, option, ...)
    Controls the rendering of cutting planes and lines. See also the cut geometry options in Set_Visibility and Set_Color. Legal choices for option include the following:

    • level = [ entity | segment | segment tree ]

      Describes the hierarchical scope of the option's effectiveness. Ideally, this should be set to the lowest level below which geometry generally encloses complete volumes. The default value is "entity".

    • closure tolerance = xxx[%]

      The distance below which line segments can be joined to form closed loops. If the distance is less than the tolerance value, the loop is closed. Cutting lines that cannot be merged into closed loops do not generate cut faces. The value is specified either as a world space distance (without a '%') or a percentage of camera field (with a '%'). The default is "10%".

  • [no] debug [= ddd]
    Enables special (not yet fully supported) capabilities. The definitions of the debug bits change from release to release and so please contact support for a list of specific options. Keep in mind that debug bits set through this API are not cumulative, so subsequent debug bit settings will replace everything. If you wish to have a cumulatve effect you should look at either the 'clear debug' or 'set debug' options. The default is "no debug".

  • clear debug = [ddd]
    Removes the specified debug bit from the current debug value.

  • set debug = [ddd]
    Adds the specified debug value to the existing debug value.

  • depth range = ( xxx, yyy )
    Compresses effective z values into a subset of what they would otherwise have been. This allows certain pieces of the scene to be drawn on top at all times without additional sub-windows and without the limitations of Bring_To_Front. xxx and yyy should be floating point values such that 0 <= xxx <= yyy <= 1. "depth range = (0,0)" will force all geometry into the frontmost bucket, but will suffer the drawback that it will cause z-fighting amongst the geometry that shares that setting. To get such pieces of geometry to resolve reasonably well against each other, "depth range = (0,0.1)" should perform reasonably well. Depth range settings are not cumulative, and have no effect when the hsr algorithm is set to "none". Default is "depth range = (0,1)"

  • [no] display lists [= on | off | geometry | segment]
    Display lists enables the HOOPS Direct3D and OpenGL drivers to cache data in video card memory. This ensures optimal rendering performance. Legal values have the following meaning:

    • on

      A synonym for "display lists = geometry".

    • geometry

      Places each individual shell/mesh into a single display list. All other possible geometry within a segment will be put into a geometry-specific, segment-level display list.

    • segment

      Places all geometry within a single segment into a single, geometry-specific display list. This means that the number of display lists within a single segment will be equal to the number of different types of geometry contained within that segment. Note that as far as display lists are concerned, shells, meshes and NURBS surfaces are considered a single type of geometry. Using this approach can result in better performance, due to better batching.

    The default is "display lists = off".

  • [no] face displacement [= nnn]
    This rendering option provides control for reducing edge stitching when performing hidden surface removal. Face displacement is specified as a fixed amount, for example, "8", and represents an amount in Z (in Z-buffer units) for which faces are "pushed back". Pushing faces back allows all other geometry to be in front of faces thereby reducing edge stitching. Pushing faces back too far results in edges that appear to float on top of the faces. Pushing back faces too little results in edge stitching. This option is very sensitive to the current view, i.e. camera settings and geometry, and should be used with care. Note that the Show_Device_Info() routine can report the size of the Z-buffer being used. See the Restrictions section regarding edge stitching.

  • [no] force grayscale [= on/off]
    Forces grayscale for a segment and its descendants (unless one of its descendants turns it back off). Gray levels are calculated with HOOPS' standard conversion system: 0.3*red + 0.5*green + 0.2*blue. Grayscale can also be forced for the entire scene (preventing any local settings from turning it back off) with the "force grayscale" option in Set_Driver_Options. For the purposes of color locks, this setting acts as if it were a color setting. In other words, if color is locked (see the "attribute lock=color" rendering option) above the point at which force grayscale is set, it will have no effect. Similarly, if color is locked above where it is unset with a "no force grayscale", it stays gray. Default is "no force grayscale".

  • general curve = [ (option, option, ...)]
    Allows the user to define the tesselation for all curve geometries. Such geometries include circles, ellipses, circular arcs/chords/wedges, elliptical arcs and NURBS curves (for NURBS Surfaces, refer to the Set_Rendering_Options_nurbs_surface "nurbs surface" Rendering_Option). Legal choices for option include the following:

    • budget [= xxx] [512]

      The upper boundary of the number of vertices that will be allowed in the tesselation of the curve, regardless of view settings. Default is 512, which is a large enough number that most curves will be limited by the other constraints.

    • [no] continued budget [= xxx]

      The number of additional vertices will be allocated to the overall curve. A curve with exactly degree+1 control points will have "budget" number of vertices, whereas curves with more control points than that number will have "continued budget" additional vertices for every extra control point. For example, a cubic curve with 6 control points will have [budget] + 2*[continued budget] number of vertices. This option applies to NURBS curves only.

    • [no] maximum deviation [= xxx] Distance, in object space, from the parametric definition of the curve to its tessellated counterpart. Note that since this setting is in object space, it should be set differently depending on the scale of the NURBS control points. Applies to view-independent curves only. Default is "no maximum deviation".

    • maximum angle = xxx The largest angle allowed between adjacent line segments in the tessellated representation. Expressed in degrees. Applies to view-independent curves only. Default is 20.

    • maximum length = xxx The largest allowable length, in the NURBS Curve's normalized [0..1] parametric space, of any line segment. Applies to view-independent curves only. Default is "0.1".

    • view independent | no view dependent | view dependent | no view independent

      "view independent" means that HOOPS tesselates each curve with the number of vertices specified in "budget", in such a fashion that it honors the other "general curve" settings. "view dependent" allows tessalation of a NURBS curve as far as necessary, depending on the camera setting, in order to maintain a smooth curve. "view dependent" is more accurate, but "view independent" is computationally cheaper. Default is "view independent".

  • general displacement = [nnn]
    In a similar fashion to "face displacement" this rendering option enables users to force all the geometry within a segment to be "pushed forward" in the z-buffer. General dispalcement is specified as a fixed amount, for example, "8", and represents an amount in Z (in Z-buffer units) for which geometry is "pushed forward" in the z-buffer. This option allows users to force geometry to be drawn in front of geometry which it is coincident with it in camera space. The default setting is "no general displacement".

  • geometry options = (option, option, option,....)
    Sets miscellaneous options on the various 3dGS primitives. Valid choices for option include:

    • hard edge angle = [fff]

      If the angle in degrees between adjacent faces of a Shell/Mesh is less than this value, then the corresponding edge is marked as a "hard" edge. The visibility of these edges can then be controlled by using Set_Visibility("edges=(hard=on/off)"). The default is "hard edge angle = 135".

    • invert polycylinders = [on | [no] radii, [no] colors]

      Changes the order upon which the radii and colors are applied to points in a polycylinder. "invert polycylinders = on" is equivalent to "invert polycylinders = (radii = on, colors = on)" . The default is "no invert polycylinders".

  • hidden line removal options [= (option, option,...)]
    This rendering option is applicable when the "hsr algorithm" is set to "hidden line". Legal choices for option include the following:

    • color = color_spec

      color to be applied to the hidden lines and markers. Examples include "color = red" and "color = (R=1 G=0 B=0)".

    • dim factor = [fff]

      "Dim factor" specifies the fraction of the current line color's R, G, and B channels to use for the color of hidden lines and markers. By default, HOOPS will automatically take a fraction of the RGB values to darken the hidden lines and markers. However, if the window color is white (or near white), HOOPS will then effectively use an inverse of the dim factor to actually brighten the hidden lines, thereby providing a consistent means of distinguishing hidden lines from visible lines. Future releases may support specific control of hidden line color and weight. The default value is "dim factor = 0.5"

    • face displacement = [fff]

      "face displacement" specifies how many units to push faces into dc z-space. This can help improve hidden line scene quality if distinct polylines/lines are being used to denote user-defined edges on shell/mesh regions, but are not exactly coincident with the actual shell/mesh edges/vertices. The factor sets a tolerance value which allows lines that might not be fully above the shell/mesh surface to still be rendered. (The display of shell/mesh edges themselves does not pose a problem.)

      Note: hidden line face displacement is separate from the general face displacement value set via HC_Set_Rendering_Options("face displacement = ddd"). Recall that the latter is used to reduce edge-stitching with the z-buffer hidden surface removal algorithm. The default value is "face displacement = 0.5"

    • image outlines = [on/off]

      Turning this on causes HOOPS to draw a polyline around the edge of where the image previously resided.

    • pattern = [ddd]

      "pattern" specifies line pattern of the hidden lines. See 'patterns.h' for an enumerated list of line patterns. The default value is "line pattern = 3", or a 'dotted' line pattern. (LP_DOTTED in patterns.h.)

    • render faces = [on/off]

      Causes triangles to be flagged for display during a hidden-line rendering. HLR visibility & dim factor are applied appropriately. Faces are either visible or hidden based on a centroid test. Transformed text characters are drawn as triangles with the "render faces" flag forced on. The default value is "render faces = off".

    • rendered face sorting algorithm = [none/painters/z-sort/szb/hzb]

      Specifies the sorting algorithm that should be used to sort the geometry which has the render faces option turned on. This option does not take a hidden line algorithm as a value. Default is "hzb" unless hardware is not available, in which case it falls back to "painters".

    • silhouette cleanup = [on/off]

      A silhouette edge is defined as any edge for which one adjacent face points towards and the other away from the camera. Silhouette edges can show unpleasant "fishtail" patterns at points on smooth surfaces where curvature in one orientation is very different from the curvature in another (e.g. the inside of a torus). Silhouette cleanup forces a postprocesses to remove most of these patterns. The default setting is "on'.

    • visibility = [on/off]

      "Visibility" controls the display of hidden lines and markers. This is NOT to be confused with the choice of the hidden line algorithm itself. The default value is "visibility = on".

  • weight = [ddd]

    Weight applied to the hidden lines. Refer to HC_Set_Line_Weight for appropriate values.

  • hsra | hsr algorithm | hidden surface removal algorithm | visible surface algorithm = [type]
    This attribute is used only if "hidden surfaces" is set under Set_Heuristics() . By default, the value is "hsr algorithm=hardware z-buffer" which means that hardware will be used if available, otherwise "painters" algorithm is used instead. F NOTE: Transparent and non-transparent geometry have separate hidden surface removal algorithms. See transparency options for details. Legal choices for type include:

    • hardware z-buffer | hzb

      Uses any available hardware acceleration.

    • painters

      Skips over the hardware even if it is available. This option uses the painters algorithm, which may show fewer edge aliasing effects than a hardware Z buffer. It is often used instead of the software z-buffer when memory is limited.

    • software z-buffer | szb

      Skips over the hardware even if it is available. Software Z buffer may display fewer edge aliasing effects than a hardware Z buffer depending on the hardware used. The software Z buffer will allocate a frame buffer and a depth buffer in main memory. For complex scenes, the software Z buffer is the fastest, although it can be the most memory intensive algorithm.

    • Z-sort only

      Tells the system that the scene does have some hidden surfaces in it, but the full-scale software hidden surface computation won't be necessary. Specifically, "Z-sort only" says a simple sort of the geometry by approximate screen depth will be sufficient to generate an accurate picture. This can significantly decrease the update time for some pictures. You can also think of "Z-sort only" as a "rough draft" hidden-surface.

    • hidden line

      This is the analytic hidden line option. Instructs the system to display visible (i.e. unobscured) lines, parts of lines, markers and text. Faces of geometry which have a visibility setting of ("faces=on") will be used to obscure the lines, markers and text. Like all true hidden line hsr algorithms this is a fairly computationally intensive algorithm O(nlogn). This is because it needs to clip all visible lines, text and strings against all visible triangles. Triangles are placed into a quad-tree to speed up the clipping process. The insertion points of text and markers are used during the clipping process.

    • fast hidden line

      Like hidden line but uses a multi-pass rendering approach that takes advantage of graphics hardware. "zhlr" is a synonym for "fast hidden line". This algorithm falls back to analytic hidden line if the current driver is not OpenGL, or if HOOPS finds an ogl implementation that doesn't support the required features.

    See the Restrictions section regarding hidden surface removal.

  • image scale = ((float) width, (float) height)
    Applies a linear image scaling factor to a segment and its children.

  • image tint [= color_spec]
    When set, all pixels within images will be modulated with the specified color (blue, green, etc).

  • join cutoff angle [= nnn]
    The maximum angle between two segments in a line or edge for which a mitered join will be drawn. The join style is set through Set_Line_Pattern() or Set_Edge_Pattern(). The default setting is "join cutoff angle = 170".

  • [no] lighting interpolation [= phong | gouraud | (faces/edges[= phong | gouraud])]
    "Lighting interpolation" lets you treat the edges and faces of a shell or a mesh as if---for the purposes of lighting---they were really curved surfaces. "Phong" interpolation does this by figuring a nominal "vertex normal" for each vertex as the average of the surrounding normals. The vertex normals are then interpolated at each pixel of the edge or face to give a nominal local normal vector. The lighting is then figured at each pixel using the local normal. "Gouraud" interpolation figures the lighting only at each vertex of the face. The resulting colors are then interpolated to obtain the pixels along the edge or within the face. Gouraud lighting is significantly faster than Phong in software; Gouraud also is often available directly in the hardware (see Show_Device_Info() ) while Phong never is. On the other hand, Phong lighting is more accurate and has fewer artifacts, especially in rapidly-changing areas such as the shiny spots (specular highlights) of the object. "No lighting interpolation" means the edge or faces are to be drawn as flat objects. If your hardware doesn't directly support Gouraud lighting then "no lighting interpolation" will tend to be much speedier to render than Gouraud (or Phong) interpolation. The default value is "lighting interpolation" of edges and faces. Since vertex normals are required for both Phong and Gouraud, "lighting interpolation" has no effect on simple polygon faces nor edges. Also, this option only affects the lighting calculation: the silhouette of the object will still clearly show that the object is built of flat faces.

  • [no] lighting [= phong | gouraud / (faces/edges[= phong | gouraud])]
    A convenience synonym for "lighting interpolation".

  • level of detail | lod [= off | on ]
    This option implements or disables the LOD module in all rendering operations. Also see our separate documentation on LOD.

  • level of detail options | lodo [= (option, option, ...)]
    This rendering option is applicable only if the level of detail option is set to on . Note that not all options are applicable to point clouds, a shell with a face list count of zero. Legal choices for option include the following:

    • algorithm = fast | nice

      Use the fast-LOD algorithm, with some visual quality degradation, or the "nice" LOD algorithm, with extra generation time but a better representation. Default is "fast". This option only applies to facetted shells.

    • [no] bounding = current | (minx, miny, minz, maxx, maxy, maxz)

      Setting the bounding option for LODs affects the calculation usefulness heuristic (see below). In the 'current' case, HOOPS will adapt to whatever changes are made to the current segment's bounding volume while when you provide an explicit bounding box, HOOPS will be ignore any changes to bounding volumes in the database. Default is "no bounding".

    • [no] calculation usefulness cutoff = (xxx,xxx,xxx,xxx...)

      This option sets the thresholds below which LOD's will not be calculated. This can be specified as one global value to apply to all levels, or as a list of numbers, a different one for each level. Default is "no calculation usefulness cutoff". (Note: this option, in practice, turned out to be less useful than expected and so may be phased out at some point in the future)

    • [no] clamp = [xxx]

      This will cause the LOD module to unconditionally display a certain level of detail. "clamp=0" will have the effect of forcing the original data to be displayed. This will have the same visual effect as turning LOD off. "clamp=-1" is equivalent to "no clamp". With clamping, no new levels of detail will be created unless the preprocess option is used (as opposed to when clamping is disabled, in which case levels of detail will be created as needed). If a requested level is not present, HOOPS will display the next lower resolution. If there is no lower resolution available, it will display the next higher resolution. The default is no clamp.

    • [no] collapse duplicate vertices

      The collapse duplicate vertices option prevents cracks from forming where there are multiple vertices coincident in space (that were, for example, put there to create a hard edge). Default is "collapse duplicate vertices".

    • fallback = none | bounding | coarsest bounding | coarsest none

      The fallback option dictates switching behavior if and when LOD is clamped to a level that doesn't exist for a particular shell. The default is "coarsest none", where:

      • none == draw nothing
      • coarsest == draw the coarsest representation available
      • bounding == draw the bounding box of the object
      • bounding none == draw the bounding box if LOD at draw time arrives at one level coarser than the coarsest currently defined. If it arrives at a level two or more levels coarser than the coarseset defined, draw nothing at all.
      • coarsest bounding == draw coarsest representation if and only if it is determined that calculation halted as a result of "min triangle count". Otherwise, draw the bounding box
      • coarsest none == draw coarsest representation if and only if it is determined that calculation halted as a result of "min triangle count". Otherwise, draw nothing.

    • levels [ = xxx ]

      Specifies how many levels should be calculated. The lowest level number is the most detailed, and the highest is the most compressed. The default number of levels is 2.

    • [no] max degree [=xxx]

      Places a limit on the number of edges that can be connected to a vertex. Default is "max degree=15". This option does not apply to point clouds.

    • [no] preprocess

      Relevant only if clamp (see above) is set and greater than zero. Causes geometry to generate LOD versions during an update if not already present. Geometry that is not clamped (a.k.a. dynamically switched) will automatically generate LOD representations even without this option. Additionally, one other way that LOD representations can be generated is with an explicit call to Regenerate_LOD(). The default is "no preprocess".

    • mode = segment | geometry

      Sets whether the LOD should be attached to the geometry or the segment. In the case where we set 'segment' then all LODs under that segment will be ignored during LOD switches. Furthermore, when you call Regenerate_LOD() 3dGS will try and collapse all shells contain in this portion of the segment tree into a single monolithic shell and generate LODs from it. Default mode is "mode = geometry".

    • [no] min triangle count [= xxx]

      Sets a lower bound on the number of triangles that a LOD representation can have. Simplification will halt at the final level above the given threshold. Quality of simplified representations degrades quickly as the number of triangles gets to be too low. Changes to this variable will not trigger recalculation of representations. The default is "min triangle count = 50". This option only applies to facetted shells.

    • ratio = xxx[, xxx, xxx, xxx, ...]

      Specifies how many triangles for facetted shells or points for point clouds each LOD level should have in relation to the previous, expressed as a floating point value between 0 and 1. For example, ratio = 0.25 would mean that level 1 would have 1 triangle for every 4 triangles in level 0 for a shell with a face list. The default is "ratio = 0.50".

    • threshold = (xxx triangles per cm squared | xxx triangles per pixel squared | xxx % area, [xxx, xxx, xxx...]

      An array of floating point values, along with units to determine how they should be interpreted.These values dictate the point at which switching should occur from one LOD level to the next. If specified without units, the values are assumed to be distances in world space from the camera position. The values can be density of triangles in physical square centimeters (resolution independent), density of triangles in terms of square pixels (resolution dependent) or the screen space size of an object (resolution and model complexity independent). The units can be specified by their abbreviations of "tpcm2", "tppix2", or "%", respectively. It is not legal to specify different units for individual levels. The last specified value is copied to all subsequent LOD levels. Note that only the percentage of area option will apply to point clouds. Default is "threshold = 30 tpcm2" (for every LOD level).

      Note: for threshold, neither distance nor "% area" factor in the number of triangles at each LOD level. Therefore the only useful way to use it is to specify more than a single value.

    • [no] tolerance [= xxx oru / xxx % fru]

      This option is only relevant if the "collapse duplicate vertices" option (see above) is also set, in which case it behaves exactly as described in ::Compute_Optimized_Shell(). The default is "no tolerance".

    • usefulness heuristic = [type]

      Avoids LOD calculations for objects which do not pass the tests. Legal values for type include:

      • bounding volume ratio per triangle
      • bounding volume ratio
      • bounding volume per triangle
      • bounding diagonal ratio per triangle
      • bounding diagonal ratio
      • bounding diagonal per triangle

      The per triangle options will only be applicable for facetted shells.

  • local cutting planes = on/off [off]
    Controls whether cutting planes are treated as global (affect the scene in the curent window) or local (affect geometry in the current segment and subsegments). Whatever setting is active at the segment containing the cutting plane takes effect. Thus, geometry can be affected by both local and global cutting planes at the same time. By default, cutting planes are global.

  • mask transform = ( camera=(option1, option2, ...), modelling matrix = (option1, option2, ..) )
    The mask transform allows you to force 3dGS to ignore any rotations, scales or translations that are due to either a modelling matrix or a camera. The option string can be either 'scale', 'rotation' or 'translation' with each resulting in the respective elements being removed from the final matrix used to draw the geometry in the specified segment tree.

  • nurbs surface = [(option, option, ...)]
    Controls the rendering of NURBS surfaces. Option can include the following:

    • budget = xxx [10000]

      An upper bound on the number of vertices that will be allowed in the tessellation of the NURBS surface. Default is 10000, which is a large enough number that we expect most surfaces to be limited by the other constraints.

    • maximum facet deviation = xxx [1]

      Distance, in object space, of the tessellation to the parametric definition of the surface. Note that since this setting is in object space, it should be set differently depending on the scale of the NURBS control points. Default is 1.

    • maximum facet angle = xxx [20]

      The largest angle allowed between the surface tangents evaluated at any two corners of a given facet. Expressed in degrees. Default is 20.

    • maximum facet width = xxx [1.42]

      The largest allowable length, in the NURBS Surface's normalized [0..1] parametric space, of any facet's edge. Default is 1.42, which is larger than the longest possible edge that can be created, sqrt(2).

    • trim budget = xxx [500]

      An upper bound on the number of vertices that will be allowed in the tessellation of a trim curve. Default is 500.

    • maximum trim curve deviation = xxx [0.005]

      Distance, in the NURBS Surface's normalized [0..1] parametric space, of trim curve vertices from the parametric definition of the trimming curve. Default is 0.005.

  • [no] perspective correction
    Normally, when performing Phong shading or texture mapping, various values (vertex parameters, geometric location, etc.) are interpolated across each surface. Without perspective correction, these values are linearly interpolated in screen-space. This linear interpolation will produce undesired artifacts. Requesting "perspective correction" will use a slower, but more accurate nonlinear interpolation method. Note that some systems with accelerated hardware always perform perspective correction. Default is "perspective correction".

  • quantization = type
    On devices that limit the number of colors that can be simultaneously displayed (such as 8-bit-plane mapped devices), HOOPS may need to dither colors when drawing. The quantization option selects the dithering algorithm to be used when a true-color object needs to be drawn on a mapped (color-limited) device. Legal choices for type include:

    • threshold

      Objects will be drawn in the color found in the fixed color table that is closest to the desired true-color value. Although thresholding is the fastest method for converting from true-color to a mapped device, it can produce "banding" artifacts on smoothly shaded surfaces.

    • ordered dither

      The desired true-color object will be drawn in a series of screen-aligned fixed color table colors. When viewed from a distance, this series of fixed table colors has the appearance of the desired true-color. Though marginally slower than thresholding, an ordered dither does not produce "banding" artifacts.

    • dither

      A synonym for "ordered dither".

    • error diffusion

      Similar to the "ordered dither," this method produces a more pleasing image, but at greater computational cost.

    In each case, using a larger fixed color table will improve the dither quality. See the "fixed colors" option of Set_Driver_Options() for more information. The default method of quantization is "ordered dither". Note: Some HOOPS devices may ignore the quantization option except when drawing into the software Z-buffer.

  • screen range = (left, right, bottom, top)
    Limits the amount of the screen (or the containing Window) to be used by the referenced segment upon display. Units are in window coordinates. Default value is no screen range. This functions just like Set_Window().

  • shadow map [ = (option, option, ...)]
    Instructs HOOPS to generate shadow maps for the scene. Legal choices for option include:

    • on | off

      High-level control of whether shadow maps are generated

    • [no] jitter [= on | off]

      Turning this on causes stochastic sampling of shadow maps. This should reduce aliasing in the shadow map. Default is "jitter = on".

    • resolution = xxx

      The width and height of the shadow map. This value will be clamped up/down to 512, 1024 or 2048.

    • samples = xxx

      The number of locations in the shadow map used to determine the percentage value of light received by a pixel in the rendered scene.

    The Set_Visibility_shadows "shadows" visibility option must also be on for shadows to be rendered in the scene. The default setting is "shadow map = (off, jitter=on, resolution=512, samples = 4)". A more detailed discussion on shadow maps can be found in the programming guide. NOTE: This feature is currently supported in the HOOPS DirectX driver. Also, shadow maps are calculated by double-drawing of the scene, and so turning on shadow maps will result in approximately a 50-percent slowdown in rendering performance.

  • [no] simple reflection [ = (option, option, ...)]
    This option tells HOOPS to draw a reflection of the model on a plane defined within the scene. Legal choices for option include one or more of the following:

    • on | off

      Controls the visibility the reflection plane. Default is "off".

    • [no] attenuation [= ( hither = fff, yon = fff ) ]

      Fades the reflection as the model moves away from the reflection plane. The hither and yon settings define the orthogonal distances (in world space) from the reflection plane to the parallel hither and yon planes. Attenuation begins at the hither plane and increases linearly such that the model is not visible in the reflection beyond the yon plane. Default is "no attenuation". This option is only available under the DirectX driver.

    • [no] blurring [= ddd]

      An integer between 1 and 31 indicating the level of blurring (softening) that is applied to the reflection. This option is only available under the DirectX driver.

    • fading = (on/off)

      When set, the reflection plane will fade as it moves away from the camera. Default is "fading = on".

    • opacity = fff

      A value between 0 and 1 that sets the transparency of the reflection plane. A value of zero will make the plane completely transparent. Default is "opacity = 0.5".

    • plane = (a, b, c, d)

      Sets the plane on which the reflection should be projected. Default is "plane=(0,1,0,1)".

    Please note that using simple reflections requires HOOPS to draw the scene twice which will result in approximately a 50-percent reduction in rendering speed. The default setting is "simple reflection = (off, plane = (0,1,0,1), opacity=0.5, fading, no attenuation, no blur)".

  • [no] simple shadow [ = on | off | auto | (option, option,...)]
    This setting is used to turn shadows on and additionally to set the location within the segment tree from which shadows should be generated. Typically "on/off" is used at the root of the segment tree where other shadow properties are set. The "auto" setting helps to optimize shadow regeneration, and should be set at locations within the segment tree that require frequent regeneration due to changing modelling matrices or visibility changes. The "auto" setting ensures that the shadow geometry will only be re-generated for the local portion of the segment tree. Default is "off". Legal choices for option include one or more of the following:

    • on/off

      Controls the visibility of the shadow. Turning 'on' always causes 3dGS to regenerate the shadow. Default is 'off'

    • opacity = fff

      A floating point value between 0 and 1 that sets the transparency of the shadow. The default value is "opacity=1".

    • plane=(a,b,c,d)

      Sets the plane that the shadow should be projected onto. Default is (0,1,0,-1)

    • light=(i,j,k)

      Sets the direction that the light is coming from. Default is (0,1,0).

    • resolution = x

      A number from 32 to 1024 which sets the resolution of the shadow. The current default is 256.

    • blurring = y

      A number between 1 to 31 indicating the level of blurring (softening) that is applied to the shadow. The effect is more noticeable at lower resolutions as the number controls the size of the blur region, which is effectively a smaller part of high-resolution images.

    • color = color_spec

      The desired color of the Shadow. Default is 'black'.

  • [no] stereo
    Toggles stereo viewing. Valid only when the "stereo" driver option has been set.

  • stereo distance = (xxx)
    Adjusts the distance between camera position and the stereo focal plane, and is given in terms of the camera eye distance. A stereo distance of zero corresponds to the stereo focal plane being set at the camera target. Default is "stereo distance = 0".

  • stereo separation = [xxx]
    Adjusts the angle of separation between right and left stereo views. Default is 3.0 degrees

  • software frame buffer options [= (option, option, ...)]
    This rendering option is applicable when the "hsr algorithm" is set to "software Z buffer". Legal choices for option include the following:

    • [no] size limit [= nnn rasters | nnn bytes]

      Can be used to limit the amount of memory used by the software frame buffer (at the expense of speed). When limited, the software Z buffer is rendered to the screen using horizontal bands.

    • color depth = [match device | full color]

      Specifies the depth of the software frame buffer. On 24-bit-plane display devices, there is no difference between "match device" and "full color".

      For 8-bit-plane display devices, "match device" will require less memory for the buffer, and will allow the finished buffer to be transferred to the screen quickly. However, "match device" may be slower overall since dithering might be applied multiple times per pixel when rendering to the buffer (this depends on scene content).

      When "full color" is specified, rendering to the buffer does not require dithering and will be faster. However, "full color" will require more memory (up to a factor of four) and will be slower when transferring the finished buffer to the screen (due to dithering).

      Use "match device" for simple scenes, and "full color" for complex scenes (if you have sufficient memory). The default is "match device".

    • [no] retention

      Retention determines whether or not the memory for the software frame buffer is retained from update to update. For most circumstances, "retention" (the default) will allow faster incremental drawing of subsequent updates.

      You would normally select "no retention" for applications that have many overlapping Z-buffered windows, due to the extreme memory required to retain multiple buffers.

      This aspect of software frame buffer options is only applicable when "no size limit" is also set. The default is "no size limit, color depth = match device, retention".

    • [no] technology [= software frame buffer]

      The software frame buffer (not to be confused with the software z buffer) writes all graphics to an offscreen buffer first, then writes that result to the screen when done. The benefit is that only one bus transfer is involved. The "software frame buffer" rendering option is fully compatible with all the hidden surface algorithms with the obvious exception of "hardware." Additionally, it is very useful in trapping graphics in "no hidden surfaces" mode.

  • tessellation = (cylinder = (xxx [, xxx, xxx, xxx...]), sphere=(xxx [, xxx, xxx, xxx, xxx...) )"
    This option controls the tesselation of cylinders and spheres during insertion and LOD calculations. For cylinders, tesselation sets the number of faces that should be used during the rendering of a cylinder at each LOD level, where the first integer corresponds LOD level 0 (no simplification): the standard cylinder that is generated during insertion. The second (optional) integer corresponds to LOD level 1, etc. Special values are 0 to trigger drawing a line (using edge visibility), or -1 to trigger drawing nothing at all. Default resolutions are (cylinder = (24,12,6,0,-1)) For spheres, the first integer tesselation sets the number of faces that are generated around the sphere's equator during a call to Insert_Sphere(). Subsequent integers correspond to LOD levels 1, 2, 3 etc. As with cylinders, 0 and -1 have special meaning: 0 means draw a point at the center. -1 means draw nothing at all. An example of the tesselation setting for a sphere is as follows:
      HC_Set_Rendering_Options("tesselation=(sphere=(20, 5, 1, 0, -1 )").
    

  • [no] texture interpolation [= on/off / (faces/edges[= on/off])]
    "Texture interpolation" is an option that allows you to control the application of texture mapping to shell or mesh faces and edges without changing other attributes. For texture maps to be applied to a surface, the following must all be true:
    1. The "texture interpolation" rendering option is enabled.
    2. The shell or mesh to be textured has vertex parameters specified (with MSet_Vertex_Parameters() ).
    3. The face color attribute has been set (with Set_Color() ) to a named texture (defined by Define_Texture() or Insert_Image() ).

    Setting "texture interpolation" (the default) is equivalent to "texture interpolation= (faces=on, edges=on)". Note: Texture mapping both edges and faces simultaneously (with both visible) does not make sense (since texture mapping just faces will render the same image) and will perform slowly. Turn off edge visibility (with Set_Visibility() ) when texture mapping faces.

  • transparency = (option, option, ...)
    Controls transparency. Legal options are as follows:

    • style = [ blended | screen door | off ]

      Style affects 'how' to perform blending. "blended" is the default behavior.

      blending: The transparent object will be blended with the color of the underlying object. This is the standard alpha-blending approach and the default behavior for this option.

      off : This will disable transparency overriding all other transparency settings and forcing the geometry to be opaque. It can be used to temporarily disable transparency for the object or scene. (Another way to do this is to reset the tranmission component of color to 'black' for transparent objects, but this is much more cumbersome of there are many segments that have a settting for transmission color.)

      screen door: This is a pseudo-transparency algorithm that optimizes performance and can be used as shortcut in the place of blending. A fraction of the pixels of the transparent object will be drawn, effectively allowing the user to see through the transparent object (hence the name screen door). This will only produce reasonable results if the tranmission value was close to 'gray' (meaning, the developer wanted 50% of all light to pass through). Additionally, no sorting of transparent objects will be performed when 'screen door' is set; therefore, it should also only be used when there is only 1 'layer' of transparent objects.

    • hsra = [ painters | z-sort only | depth peeling | none ]

      Hidden surface removal algorithm(hsra) controls which algorithm will be used to sort all the triangles that represent transparent objects. The default option is z-sort only.

      depth peeling : This in a non-sorting technique based on multi-pass drawing, and leverages hardware acceleration to quickly produce an accurate rendering. Depending on the amount of overlayed transparent objects, this approach will give varying accuracy and performance results based on the number of 'layers' that are specified by the user (and how many are currently supported by HOOPS). Currently it is only recommended to specify 1 layer (the default) since each additional layer may incur a performance hit.

      painters: This sorting method will produce a completely accurate rendering of transparent scenes that have overlapping transparent objects, but at the cost of additional rendering speed.

      z-sort: This sorting method can result in rendering artifacts at locations where transparent objects intersect with one another, but is faster than doing a full-blown 'painter's sort'. It is the default algorithm.

      none: No sorting will be performed, but transparent objects will get draw deffered (drawn on top). However, if overlapping transparent objects are present (or if a single transparent object is present that contains overlapping faces, like a sphere), the rendering will not be accurate.

      Transparent and non-transparent geometry have separate hidden surface removal algorithms. Default is z-sort only.

      NOTE: The none (i.e. no sorting at all) setting should only be used if:

      1. "style=screen door" -- screen door transparency does not require sorting, so "screen door" automatically implies that sorting will be disabled;
      2. extra information is known about the data to indicate that no two transparent objects overlap (e.g. they are coplanar);
      3. severe visual artifacts can be tolerated (e.g. as an aggressive constant frame rate strategy);
      4. alternative mechanisms are available to control drawing order, e.g. alphabetical order in the case of named sibling segments or the use of Bring_To_Front() for anything else.

    • z-sort options = [fast|nice]

      A setting of "nice" sorts every transparent triangle in a shell by its mid-point. Alternatively, the "fast" setting sorts the rendering by the mid-point of each tristrip. Unless a shell has color settings on subgeometry (vertices, edges, etc.) a shell will typically have only one tristrip, and so using the "fast" setting usually affords significant performance improvements over "nice". It is recommended that the user turn off backplane culling when using the "fast" setting, to avoid visual artifacts. The default is "z-sort options = nice".

    • depth peeling options = (option, option, ...)

      Legal options for depth peeling options include:

      • layers = ddd

        The maximum number of transparent layers to process. Hardware support (opengl and an ATI or NVidia graphics accelerator with drivers dated 2005 or later) is needed to process more than 1 layer. If the hardware cannot handle multiple layers, only the first layer is rendered. Performance will be roughly linearly proportional to 1/(the number of layers requested).

      • minimum area = ddd % | ddd pixels

        The amount of the screen a layer needs to occupy in order to process another layer. Hardware occlusion testing support is needed to handle minimum area.

NOTES

You should specify your Rendering Options high enough in the segment tree so they apply to a whole scene at a time. Mixing effects within a single scene might give unpredictable results. The easiest way to do this is to specify Rendering Options on the window segment itself. An exception is "color interpolation" and "color index interpolation". Specify these options as near as you want to the affected geometry, the same applies to attribute locks.

Every possible combination of the options is legal and probably meaningful. For example, it is legal and reasonable to ask that Phong lighting interpolation be computed on a color-interpolated surface.

The default setting of the Rendering Options attribute---the setting on the root ("/") segment---can be given a new initial value on most systems by means of the environment variable "HOOPS_RENDERING_OPTIONS".

RESTRICTIONS

Attribute lock: Caution should be exercised when locking modelling matrices if bounding volumes are used. Locks on modelling matrices, but not modelling matrices themselves, are ignored by bounding volumes. This means that a bounding volume accumulates all transformations as it propagates through the segment tree. Due to this restriction, it is advisable to disable bounding volumes when using attribute lock on modelling matrices.

Hidden surface removal: The hidden surface removal algorithms still make an occasional mistake. This can be improved by breaking unusually wide, deep, and tall objects into smaller pieces, so that items of geometry in the scene are of similar sizes. This especially improves results in the "z-sort only" rendering option. Furthermore, the face displacement rendering option can also be used to obviate most stitching problems; however, even with face displacement, the painters algorithm can have problems. The painter's algorithm splits triangles independently along their edges, even if those edges are shared. This can lead to phasing errors during scan conversion which manifest as pixel dropouts. When setting the hidden surface removal algorithm, we recommend that you set this option only once per driver with the only exception being if you have subwindows.

Screen Door Transparency: "transparency = screen door" is not valid for software rendering. Although using this option with a non-hardware-accelerated driver will not cause HOOPS to generate warnings or errors, the picture will most likely look strange.

See also:
Set_Driver_Options, Set_Heuristics, Set_Color, Set_Color_By_Value, Set_Color_By_Index, Set_Visibility, Show_Device_Info, Insert_Shell, Insert_Mesh.

void QSet_Rendering_Options ( const char *  segment,
const char *  list 
)

Similar to Set_Rendering_Options(), but operates on a given segment rather than the currently open one.

Parameters:
segment -
list - A quoted string or a string variable containing a list of the desired settings.

DETAILS

No additional details. See Set_Rendering_Options()

void UnSet_Rendering_Options ( void   ) 

Removes all settings established by a previous call to Set_Rendering_Options().

DETAILS

No additional details. See Set_Rendering_Options()

void UnSet_One_Rendering_Option ( const char *  which  ) 

Removes a given setting established by a previous call to Set_Rendering_Options(), rather than all settings.

Parameters:
which - A quoted string or a string variable containing the desired setting to be changed.

DETAILS

No additional details. See Set_Rendering_Options()

void QUnSet_Rendering_Options ( const char *  segment  ) 

Removes all settings established by a previous call Set_Rendering_Options(), but operates on a given segment rather than the currently open one.

Parameters:
segment - Name of the segment to be changed.

DETAILS

No additional details. See Set_Rendering_Options()

void QUnSet_One_Rendering_Option ( const char *  segment,
const char *  which 
)

Removes a given setting established by a previous call to Set_Rendering_Options(), but operates on a given segment rather than the currently open one.

Parameters:
segment - Name of the segment to be changed.
which - A quoted string or a string variable containing the desired setting to be changed.

DETAILS

No additional details. See Set_Rendering_Options()

Main Index
<< Back      Brief Index      Full Index      Forward >>