Rob Jenkins (robj++at++barney.reading.sgi.com)
Thu, 18 May 1995 12:28:01 +0100
I have attached the man page for pfLOD - if you need more information let me
know. You can see an example of this by running perfly esprit.flt ( this model
has LOD built in ) and changing the LOD scale slider.
Cheers
Rob
-- ________________________________________________________________ Rob Jenkins, Software Support Group, Silicon Graphics UK Ltd. 1530 Arlington Business Park, Theale, Reading, UK, RG7 4SB. tel 01734 257736, fax 01734 257553, email robj++at++reading.sgi.com,
pfLOD(3pf) IRIS Performer 1.2 libpf Reference Pages pfLOD(3pf)
NAME pfNewLOD, pfLODRange, pfGetLODRange, pfLODCenter, pfGetLODCenter - Create, modify, and query level of detail nodes.
C SPECIFICATION #include <Performer/pf.h>
pfLOD * pfNewLOD(void);
void pfLODRange(pfLOD *lod, long index, float range);
float pfGetLODRange(pfLOD *lod, long index);
void pfLODCenter(pfLOD *lod, pfVec3 center);
void pfGetLODCenter(pfLOD *lod, pfVec3 center);
PARAMETERS lod identifies a pfLOD.
DESCRIPTION A pfLOD is a level-of-detail (LOD) node. Level-of-detail is a technique for manipulating model complexity based on image quality and rendering speed. Typically, a model is drawn in finer detail when close to the viewer (occupies large screen area) than when it is far away (occupies little screen area). In this way, costly detail is drawn only when necessary.
Additionally, IRIS Performer can adjust LODs based on rendering load. If a scene is taking too long to draw, IRIS Performer can globally modify LODs so that they are drawn coarser and render time is reduced (see pfChanStress).
IRIS Performer uses range-based LOD and adjusts for field-of-view and viewport pixel size. Range is computed as the distance from the pfChannel eyepoint which is drawing the scene to a point designated as the center of a pfLOD. This range is then potentially modified by pfChannel attributes (see pfChanLODAttr, pfChanStress). This range indexes the pfLOD range list to select a single child to draw.
pfLOD is derived from pfGroup so it can have children and use pfGroup API to manipulate its child list. In addition to a list of children, a pfLOD has a list of ranges which specify the transition points between levels- of-detail. pfNewLOD creates and returns a handle to a new pfLOD.
pfLODCenter sets the object-space point which defines the center of lod. center is affected by any transforms in the hierarchy above lod (see pfSCS). pfGetLODCenter copies the LOD center point into center.
pfLODRange sets the value of range list element index to range which is a floating point distance specified in world coordinates. A child is selected based on the computed range (LODRange) from the eyepoint to the
Page 1
pfLOD(3pf) IRIS Performer 1.2 libpf Reference Pages pfLOD(3pf)
pfLOD center and the range list (Ranges) according to the following decision test:
if (LODRange < Ranges[0]) draw nothing; else if (LODRange >= Ranges[i] && LODRange < Ranges[i+1]) draw Child[i]; else if (LODRange >= Ranges[N-1] where N is length of Ranges) draw nothing;
Ranges specified by pfLODRange must be positive and increasing with index or results are undefined. pfGetLODRange returns the range with index index.
Normally, LOD transitions are abrupt switches that can cause distracting visual artifacts. On hardware which supports it, IRIS Performer can blend (fade) between levels-of-detail for a smooth transition. Fade level-of-detail (FLOD) is enabled by setting a non-zero fade range with pfChanLODAttr. FLOD is discussed in greater depth in the pfChanLODAttr man page.
NOTES Intersection traversals currently always intersect with an LODRange of 0. To intersect with other ranges, a pfSwitch with the same parent and chil- dren as the pfLOD can be created with the pfLOD used for drawing and the pfSwitch used for intersecting (see pfChanTravMask).
SEE ALSO pfChanLODAttr, pfChanStress, pfFindLOD, pfGroup, pfNode
Page 2
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:30 PDT