[osg-users] Unwanted culling in 3.6.4 vs 3.5.1
Voerman, L.
l.voerman at rug.nl
Thu Jan 9 06:43:47 PST 2020
Thanks for the update, as I still had found nothing.
Laurens.
On Thu, Jan 9, 2020 at 3:07 PM Anders Backman <andersb at cs.umu.se> wrote:
> Problem solved:
>
> obj->setAutoScaleTransitionWidthRatio(0.001f); // Was 0 earlier.
>
> This seems to be something that changed between the two versions!
> Now it works.
>
> Thanks for the feedback!
>
> /Anders
>
> On Thu, Jan 9, 2020 at 3:02 PM Anders Backman <andersb at cs.umu.se> wrote:
>
>> [image: image.png]
>> Actually, I managed to reproduce it, sort of in a sample application.
>>
>> When running this exact code in 3.6.4 I get this:
>>
>> A quick blink (of a white box), then nothing and lots of culling 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.5 -7.125 -45.6982 1
>>
>>
>>
>> But with 3.5.1 I get:
>>
>> [image: image.png]
>> Which is what I would expect.
>> Anyone that can reproduce this? No models needed, just compile the code
>> and run.
>>
>> Cheers,
>> Anders
>>
>>
>>
>> On Thu, Jan 9, 2020 at 2:56 PM Anders Backman <andersb at cs.umu.se> wrote:
>>
>>> That is so strange..!
>>>
>>> > osgversion
>>> OpenSceneGraph Library 3.6.4
>>>
>>> Captured a short video of the issue:
>>> osgviewer --window 0 0 1024 768 osg_3.6.4_culled.osgt
>>>
>>> https://gofile.io/?c=A6LCw6
>>>
>>> What on earth could be the difference here? Have tested on several
>>> computers (only Windows though).
>>> Windows 10, NVida GeForce card.
>>>
>>> Also, how it works in 3.5.1:
>>>
>>> ">"osgversion
>>> OpenSceneGraph Library 3.5.1
>>>
>>> osgviewer --window 0 0 1024 768 osg_3.5.4_not_culled.osgt
>>> https://gofile.io/?c=i2Ssx0
>>>
>>> On Thu, Jan 9, 2020 at 2:00 PM Voerman, L. <l.voerman at rug.nl> wrote:
>>>
>>>> Hi Anders,
>>>> I did have a quick look, but I can't see any unwanted culling, nor do I
>>>> get the warnings you write about.
>>>> tried versions 3.6.3 3.6.4 and 3.6.5 on windows with
>>>> OSG_NOTIFY_LEVEL=INFO
>>>> osgviewer osg_3.6.4_culled.osgt
>>>>
>>>> Looking in the file I see a lot of empty osg::Text nodes - I guess that
>>>> causes an empty bounding sphere in the specific version of osg you have.
>>>> Laurens.
>>>>
>>>> On Thu, Jan 9, 2020 at 1:19 PM Anders Backman <andersb at cs.umu.se>
>>>> wrote:
>>>>
>>>>> 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
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>
>>>
>>> --
>>> __________________________________________
>>> Anders Backman, HPC2N
>>> 90187 Umeå University, Sweden
>>> anders at cs.umu.se http://www.hpc2n.umu.se
>>> Cell: +46-70-392 64 67
>>>
>>
>>
>> --
>> __________________________________________
>> Anders Backman, HPC2N
>> 90187 Umeå University, Sweden
>> anders at cs.umu.se http://www.hpc2n.umu.se
>> Cell: +46-70-392 64 67
>>
>
>
> --
> __________________________________________
> Anders Backman, HPC2N
> 90187 Umeå University, Sweden
> anders at cs.umu.se http://www.hpc2n.umu.se
> Cell: +46-70-392 64 67
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200109/d41f1bbb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 23601 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200109/d41f1bbb/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 24890 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200109/d41f1bbb/attachment-0003.png>
More information about the osg-users
mailing list