Hi Per, I've just applied your patch and found that it initially seems to work, but breaks once I do several simple zoom in/zoom out movements, randomly the second cow disappears at the same time as the original one, and even when the second cow doesn't disppaer right away it does eventually get culled when zoomed further out.
I've now reverted your patch and embarking on a wider review of the way that the small feature culling is managed in CullStack/CullVisitor. Robert. On Wed, Jan 28, 2009 at 2:10 PM, Robert Osfield <[email protected]> wrote: > Hi Per, > > FYI, I'm back on the case of the toggling small feature culling in > subgraphs. I'm able to reproduce the bug with your example, and > should be able to resolve the best way to solve the problem in the > next hour or two. > > Robert. > > On Mon, Dec 15, 2008 at 2:23 PM, Per Fahlberg <[email protected]> wrote: >> Hi Robert, >> >> I've found a way to get it working by slightly modifying CullStack.cpp and >> by also changing my cull callback. When pushing the CullingSet in CullStack >> I have added updating the cull mask in the new CullingSet. I needed to >> change both the cull visitors culling mode and the current CullingSets mask >> in the callback, because I didn't find a way to propagate the changed mode >> from the CullVisitor to the current CullingSet. >> >> I'm cross posting to osg-submissions and have attached the modified >> CullStack.cpp, I've also attached a modified osgscribe.cpp that shows the >> problem. When zooming out one model should always be visible but the other >> shall disappear when it gets less than 200 pixels in size. >> >> Regards, >> Per >> >> Robert Osfield wrote: >>> >>> Hi Per, >>> >>> It sounds like you'll need to directly manipulator or push new >>> settings on the stack in CullVisitor. >>> >>> Robert. >>> >>> On Mon, Dec 15, 2008 at 10:12 AM, Per Fahlberg <[email protected]> >>> wrote: >>> >>>> >>>> Hi Robert, >>>> >>>> I've traced the problem down now and it seems the culling mode that the >>>> CullVisitor uses is correct but the one in the CullingSet is incorrect. >>>> This >>>> is due to the CullingSet being updated in CullStack::pushProjectionMatrix >>>> which is called early on in culling, and when I change the culling mode >>>> in >>>> my callback it only changes the mode in the CullVisitor and not the mode >>>> in >>>> the CullingSet. >>>> >>>> Since I'm not very familiar with the internals in the culling code I >>>> would >>>> like to ask for some guidance before I dive in and try to code up a fix >>>> for >>>> the problem. Do you know of a place in the code where the culling set >>>> might >>>> be updated to reflect the changes in the CullVisitor/CullStack or should >>>> I >>>> try to directly propagate the changes from the >>>> CullSettings::setCullingMode >>>> down via CullStack to the CullingSet? >>>> >>>> Regards, >>>> Per >>>> >>>> Robert Osfield wrote: >>>> >>>>> >>>>> Hi Per, >>>>> >>>>> On Tue, Dec 2, 2008 at 11:34 AM, Per Fahlberg <[email protected]> >>>>> wrote: >>>>> >>>>> >>>>>> >>>>>> Perhaps I wasn't clear in my question so I will try once more, is there >>>>>> a >>>>>> way to disable small feature culling for just a subgraph not the entire >>>>>> scene? >>>>>> >>>>>> >>>>> >>>>> The only way is is use a cull callback to cache the previous setting, >>>>> set the new setting do the traverse and the restore the original >>>>> value. Your original callback does this, but I don't know why it >>>>> doesn't work. Note, I haven't tried it myself so I can't provide any >>>>> further direction, you'll just have to dig into the source code. >>>>> >>>>> Robert. >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>> >>> _______________________________________________ >>> 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 >> >> > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

