Hi John, I'll do a review of the submission and provide a bit more in the way of thoughts once completed.
In terms of possible optimizations, disabling the precompile and only doing the update, event, and cull would be probably the most efficient way to get tiles loaded, then once the tiles are loaded do the final render. The awkward part of this is that the cull and draw are closely coupled in the Viewer... One way around this would be just write a custom CullVisitor that kicks of the database request for a given camera set up. Robert. On Thu, Oct 30, 2008 at 11:23 AM, John Vidar Larring <[EMAIL PROTECTED]> wrote: > Re-sending since the the original mail did not seem to make it through... > > -- John > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > > ---------- Forwarded message ---------- > From: John Vidar Larring <[EMAIL PROTECTED]> > To: OpenSceneGraph Users <[email protected]> > Date: Thu, 30 Oct 2008 10:37:20 +0100 > Subject: Re: [osg-users] auto-capture example: capturing an image from a > PagedLOD Database > Hi Robert, > > I made it work! However, to make the example work I had to a new statistics > counter to DatabasePager. I added the method the DatabasePager: > > /** Get number of fileRequest that are currently being processed in > DatabaseThreads */ > int getRequestsInProgress() const { return _requestsInProgress; } > > The member _requestsInProgress is intialized to zero in the DatabasePager > c'tors, increased by one in DatabasePager::requestNodeFile(), and decreased > by one in DatabasePager::addLoadedDataToSceneGraph(); > > This counter in the DatabasePager allows me to use the following algorithm > in the custom viewer class: > ... > // Initiate the first PagedLOD request > frame(); > > // Keep rendering until full level of detail is reached > while(!done() && getDatabasePager()->getRequestsInProgress()) > { > updateTraversal(); > renderingTraversals(); > } > > // Add the WindowCaptureCallback now that we have full resolution > getCamera()->setFinalDrawCallback(new WindowCaptureCallback(GL_BACK, > _fileName)); > renderingTraversals(); > > // Automatically close after capture > close(); > ... > > Although this works, it takes a looong time for the program to capture the > full-res image. I'll send the example and DatabasePager mods to > osg-submissions, and I hope the community can find a better / faster way to > implement this example. > > I think such a solution is needed for OSG to support auto rendering jobs > (command line / cronjob), whether the output is in form of images or movies. > One usage example is to render the same animation path each day over a > terrain, but with different data overlays (e.g. weather, pollution, traffic, > etc.) And you want your movies / images to be crisp;) > > Best regards, > John > > John Vidar Larring wrote: >> >> Hi Robert, >> >> > Are you planning to submit this example for inclusion with the OSG >> > example set? If so then I could integrate then I and others could >> > tweak it so it works. >> >> Yes, that was basically the plan, only that I originally wanted to submit >> a working example;) >> >> The reason for putting together this example in the first place was to >> create an application scenario that could make it interesting for others to >> solve this particular DatabasePager problem as well. >> >> I'll try out a few more hunches before cleaning up and submitting the >> example, working or not working. >> >> Best regards, >> John >> >> > > > -- > Best regards, > John > WeatherOne > > > > _______________________________________________ > 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

