Re: [osg-users] Unwanted culling in 3.6.4 vs 3.5.1

2020-01-12 Thread Anders Backman
Good to hear!

/Anders


On Fri, 10 Jan 2020 at 11:16, Robert Osfield 
wrote:

> Thanks Anders, the description and models really helped pin point the bug
> and confirm fix. I have now fixed the handling of when
> _autoScaleTransitionWidthRatio<=0.0
>
>
> https://github.com/openscenegraph/OpenSceneGraph/commit/61c7ee76c5c059f53366f69c27c9fdf69388eced
>
> This is checked into master and the 3.6 branch so will be part of the up
> coming 3.6.5 release.
>
> Cheers,
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-- 
__
Anders Backman, HPC2N
90187 Umeå University, Sweden
and...@cs.umu.se http://www.hpc2n.umu.se
Cell: +46-70-392 64 67
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Unwanted culling in 3.6.4 vs 3.5.1

2020-01-10 Thread Robert Osfield
Thanks Anders, the description and models really helped pin point the bug
and confirm fix. I have now fixed the handling of when
_autoScaleTransitionWidthRatio<=0.0


https://github.com/openscenegraph/OpenSceneGraph/commit/61c7ee76c5c059f53366f69c27c9fdf69388eced

This is checked into master and the 3.6 branch so will be part of the up
coming 3.6.5 release.

Cheers,
Robert.

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BVc0SZbBvVP7YYMM3xrOXYBXcf8EUL9uusdCwSTeC-uFA%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BVc0SZbBvVP7YYMM3xrOXYBXcf8EUL9uusdCwSTeC-uFA%40mail.gmail.com.


Re: [osg-users] Unwanted culling in 3.6.4 vs 3.5.1

2020-01-10 Thread Robert Osfield
As a reminder I've added an Issue with this bug on github:

   https://github.com/openscenegraph/OpenSceneGraph/issues/892
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Unwanted culling in 3.6.4 vs 3.5.1

2020-01-10 Thread Robert Osfield
Hi Anders,

On Thu, 9 Jan 2020 at 14:07, Anders Backman  wrote:

> Problem solved:
>
> obj->setAutoScaleTransitionWidthRatio(0.001f); // Was 0 earlier.
>
> This seems to be something that changed between the two versions!
> Now it works.
>

Good to hear that you've found a workaround.

There were a number of fixes made to osg::AutoTransform so it looks like
one of the changes has created a regression for your usage case.  This is
why I make so many calls for testing before release go out so we can catch
these cases where the changes are still relatively fresh in out minds.

This commit may have made the code sensitive to a zero
setAutoScaleTransitionWidthRatio :


https://github.com/openscenegraph/OpenSceneGraph/commit/92092a56ae920b41b25b984592d69a7aaba28480#diff-02ae8731c81cbf820759403a17780405

I think this PR addresses a bug associated with using AutoTransforms in
multiple views at one time.  Looking at the code I wonder if the commented
out line (line 153 of src/osg/AutoTransform.cpp):

//if (_autoScaleTransitionWidthRatio>0.0)

Is what has introduced this sensitivity to a zero value
of_autoScaleTransitionWidthRatio.
The following code block looks like it would provoke a divide by zero with
a _autoScaleTransitionWidthRatio of zero when the i and j values ended
becoming the same value.

I will need to think about what should be happening in the code in your
usage case.  Do you know what was intended with the original settings?  I'm
a bit cold on this code as it's nearly three years since I last worked on
it.

For the upcomming 3.6.5 release I'd like to get a fix checked in to handle
this case.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Unwanted Culling in 3.6.4 vs 3.5.1

2020-01-09 Thread Anders Backman
Hi all.

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.


-- 
__
Anders Backman, HPC2N
90187 Umeå University, Sweden
and...@cs.umu.se http://www.hpc2n.umu.se
Cell: +46-70-392 64 67
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org