Thanks for the additions Maciej, the changes have missed the OpenSceneGraph-2.6 branch/feature freeze so will have to be merged once 2.6 is out.
On Mon, Aug 4, 2008 at 1:51 PM, Maciej Krol <[EMAIL PROTECTED]> wrote: > Hi all, > > I have implement frame based expiration of PagedLOD children. I will send it > to osg-submissions as well. > > New attribute DatabasePager::_expiryFrames sets number of frames a PagedLOD > child is kept in memory. The attribute is set with > DatabasePager::setExpiryFrames method or OSG_EXPIRY_FRAMES environmental > variable. > > New attribute PagedLOD::PerRangeData::_frameNumber contains frame number of > last cull traversal. > > Children of PagedLOD are expired when time _AND_ number of frames since last > cull traversal exceed OSG_EXPIRY_DELAY _AND_ OSG_EXPIRY_FRAMES respectively. > By default OSG_EXPIRY_FRAMES = 1 which means that nodes from last > cull/rendering > traversal will not be expired even if last cull time exceeds > OSG_EXPIRY_DELAY. Setting OSG_EXPIRY_FRAMES = 0 revokes previous behaviour > of PagedLOD. > > Setting OSG_EXPIRY_FRAMES > 0 fixes problems of children reloading in lazy > rendering applications. Required behaviour is achieved by manipulating > OSG_EXPIRY_DELAY and OSG_EXPIRY_FRAMES together. > > Two interface changes are made: > > DatabasePager::updateSceneGraph(double currentFrameTime) is replaced by > DatabasePager::updateSceneGraph(const osg::FrameStamp &frameStamp). The > previous method is in #if 0 clause in the header file. Robert, decide if You > want to include it. > > PagedLOD::removeExpiredChildren(double expiryTime, NodeList > &removedChildren) is deprecated (warning is printed), when subclassing use > PagedLOD::removeExpiredChildren(double expiryTime, int expiryFrame, NodeList > &removedChildren) instead. > > Regards, > Maciej Krol > > > 2008/8/3 Robert Osfield <[EMAIL PROTECTED]> >> >> Hi John, >> >> As others have pointed out, what you are seeing is the removal of >> expired subgraphs. The DatabasePager is built around continuous >> update of the scene graph - both for loading of new subgraphs, >> compiling of subgraphs, merging of subgraphs and removal of expired >> subgraphs. As such paging databases aren't appropriate to non >> continuous updated apps, you could fudge things by upping the expiry >> delay on the DatabasePager. Doing periodic renders of the scene would >> also allow things to tick along. >> >> Robert. >> >> On Wed, Jul 30, 2008 at 1:39 PM, John Vidar Larring >> <[EMAIL PROTECTED]> wrote: >> > Hi all, >> > >> > Background: >> > ----------- >> > In our application the user can set up scenes ( or sequences as we call >> > them) for playback on a timeline (e.g. seq.1 - transition - seg.2 - >> > transition ... seq.N). Some scenes are too complex to render real-time >> > and >> > are recorded to movies before playback. Hence, when scenes are edited by >> > the >> > user all scenes are redrawn as needed rather than continuously to avoid >> > sluggish GUI response. >> > >> > Problem: >> > -------- >> > _Sometimes_ when the scene is redrawn in edit mode (i.e. redraw only if >> > needed), the pagedLOD DB (osgTerrain) drops to the lowest detail level >> > (Ref. >> > osg_original.jpg and osg_problem.jpg). This behavior seems to appear at >> > randomly. In playback mode (i.e. when frame rate is constant) the >> > problem >> > never occurs. >> > >> > Reproduce / Code example: >> > ---------- >> > The problem has been reproduces in a small test program >> > (osgtest_source_code.tgz) derived from the osgviewerQT example (since we >> > are >> > using Qt 4.x in our application). To reproduce: run the compiled >> > application: 'osgtest -t <your osgTerrain db>' . To trigger refreshes, >> > occlude parts of the window with another window. The problem typically >> > reveals itself when at a redraw or when the window looses focus (be >> > patient, >> > since this happens randomly it may take some time before the problem >> > occurs). >> > >> > Since I'm still quite new to OSG, I'm not sure where to look for a >> > solution. >> > Hopefully someone will spot the obvious error in the sample code. Any >> > advice >> > is highly appreciated. >> > >> > Versions: >> > --------- >> > OSG svn rev 8700 >> > Qt 4.2.3 >> > >> > Best regards, >> > John Larring >> > >> > -- >> > This message has been scanned for viruses and >> > dangerous content by MailScanner, and is >> > believed to be clean. >> > >> > >> > _______________________________________________ >> > osg-users mailing list >> > [email protected] >> > >> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > >> > >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > -- > Regards, > Maciej Krol > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

