[osg-users] Unwanted culling in 3.6.4 vs 3.5.1

Anders Backman andersb at cs.umu.se
Thu Jan 9 04:18:40 PST 2020


Another issue I discovered with 3.6.4 is that we now suddenly get unwanted
culling.
At first it looks like a small feature culling thing (which we disable at
global level with:

  // Don't do small feature culling
  osg::CullStack::CullingMode cullingMode =
m_viewer->getCamera()->getCullingMode();
  cullingMode &= ~(osg::CullStack::SMALL_FEATURE_CULLING);
  m_viewer->getCamera()->setCullingMode(cullingMode);


However, this does not look like a small feature thing to me at all.
Actually, it culls even when you get close to the objects.
Attached are two osgt-files.

One is saved from OSG 3.5.1 (works as intended).

Second one is saved from OSG 3.6.4 (where we get the unwanted culling).


If you use a later version of OSG (3.6.4) the one from 3.6.4 generates lots
of warnings:

CullVisitor::apply(Geode&) detected NaN,
    depth=nan, center=(0 0 7.125),
    matrix={
        -nan(ind) -nan(ind) -nan(ind) -nan(ind)
        -nan(ind) -nan(ind) -nan(ind) -nan(ind)
        -nan(ind) -nan(ind) -nan(ind) -nan(ind)
        0.187249 -0.470484 -6.20285 1

whereas the one from 3.5.1 does not.

Anyone give me a hand on this? I am really stuck.
I was first totally into small feature culling, trying to dig up old code
where people was trying to disable small feature culling on subgraphs etc.
But that is not the issue here.

Any suggestion would help. I tried to make the scene as small as possible.

I tried to attach the files, but it made the message too big.
Instead I shared the files using gofile: https://gofile.io/?c=M5xPmU
There are two files osg_3.5.1_not_culled.osgt
and osg_3.6.4_culled.osgt

Thanks,
Anders


-- 
__________________________________________
Anders Backman, HPC2N
90187 Umeå University, Sweden
anders at cs.umu.se http://www.hpc2n.umu.se
Cell: +46-70-392 64 67
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200109/01319d22/attachment.html>


More information about the osg-users mailing list