Looking at the code for FlattenStaticTransformsDuplicatingSharedSubgraphs, as 
that is what appears to be running, the apply(LOD) function adjusts the center 
with a setCenter call, but there is no adjustment done to the radius. Since the 
setCenter call will enable the USER_DEFINED_CENTER mode, if radius is > 0 then 
it will need to be adjusted. Also it does not modify the ranges either, even 
though if you were not to flatten the transform then those ranges would be 
effected by the scale. For my purposes the range part does not matter, but it 
might to others.

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Thursday, April 17, 2014 4:48 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Scale Flattening and LODs

HI Karl,

I'm trying to guess what is going on front the details you've provided.  Are 
you saying that the osgUtil::FlattenStaticTransforms is not handling LOD's 
correctly?  Have you looked at the source code to see what it's doing/not doing?

Robert.

On 14 April 2014 20:03, Cary, Karl A. <karl.a.c...@leidos.com> wrote:
> To at least partially answer my own question, everything seems fine if 
> I manually apply the scale to the radius. So essentially, if you have 
> a scale transform, it will affect the radius, center point, ranges, 
> and vertex positions during the cull and draw. However if you flatten 
> the scale, it seems to only affect the vertex positions and center. 
> You have to manually adjust ranges and radius.
>
>
>
> Is this not supposed to be true? Is there anything else that I need to 
> be double checking on? This is with 3.0.1.
>
>
>
> From: osg-users-boun...@lists.openscenegraph.org
> [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Cary, 
> Karl A.
> Sent: Monday, April 14, 2014 12:51 PM
> To: OpenSceneGraph Users
> Subject: [osg-users] Scale Flattening and LODs
>
>
>
> I have run across an issue related to scaled flattening over an LOD. I 
> have a Matrix transform with a static scale in it over an LOD node. 
> For the LOD, I have exact ranges that I want it to change at, regardless of 
> scale, i.e.
> always switch LOD at 1000ft, 2000ft etc. If I leave the matrix 
> transform in place then I have to divide the ranges by the scale value 
> as they get that scalar applied to them as well apparently. This is 
> what we have been using for quite some time and works fine. I am 
> trying now to flatten the scale transform out. When I do it though, 
> the ranges don't get touched so I don't need to adjust them, but for 
> some reason the raidus is also being left alone and now suddenly there 
> is a center value that did not exist prior. In order to see this, I am 
> spitting out the scenegraph to a .osg file.
>
>
>
> Is there something extra I need to do to an LOD to flatten the 
> transform out? I am using the osg::Optimizer to do it.
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.
> org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to