[osg-users] Qt + non-continuous draw + pagedLOD: Random loss of detail??

Jakob Ruhe jakob.ruhe at gmail.com
Thu Jul 31 00:04:30 PDT 2008


Hi John!

I also have these kind of problems when I use "lazy rendering" which
is the way I want it to be done in my application.

These methods may help you:
osgDB::setExpiryDelay
PagedLOD::setNumChildrenThatCannotBeExpired

You can also override these virtual methods to fine tune what you want to do:
osgDB::removeExpiredSubgraphs
PagedLOD::removeExpiredChildren

I hope it can help you in your case even though these are not any good
permanent solutions for any "lazy rendering" app..

/Jakob Ruhe

2008/7/30 Glenn Waldron <gwaldron at gmail.com>:
> John,
>
> I have run into the same issue. PagedLOD children "expire" after a certain
> period of time (default is something like 5 seconds?) If a PagedLOD child
> has not been visited in the last N seconds, the pager will discard it and
> revert to a lower LOD. OSG updates the "time-last-visited" during the cull
> traversal in order to check for expiration. So, if you are not continuously
> running the frame loop, PagedLOD's will think their children have expired
> and will drop to the lowest LOD.
>
> I used to refer to the technique you're using as "lazy rendering" (i.e. only
> render a frame when something has changed) ... try searching the archives
> ... but at the time I never did find a good way to do this in OSG without
> confusing the pager.
>
> Glenn
>
> --
> Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
> +1.703.652.4791
>
> On Wed, Jul 30, 2008 at 8:39 AM, John Vidar Larring <larring at weatherone.tv>
> 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
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>



More information about the osg-users mailing list