Hey Robert, Ugh, ignore these changes. They looked like they were working initially but I realized now that they aren't. That code was there for a reason :)
I've thought about the issue a little more and I think that it might be more appropriate for the osg::LOD class to check to see if one of it's children has an invalid bounds (like the case of an AutoTransform not being traversed by the cull visitor yet) and always traverse it regardless of their range. Basically we need a way to force the AutoTransform/Text objects to be rendered at least once so they can get their bounds in sync correctly. What do you think? Jason On Fri, Dec 31, 2010 at 1:00 PM, Jason Beverage <[email protected]> wrote: > Hi Robert, > > There has always been an issue with placing AutoTransforms and auto > scaled Text under an LOD b/c the bounding sphere of the node isn't > initialized until the first time the AutoTransform/Text is traversed > and the LOD doesn't allow the traversal b/c the Node doesn't have a > valid bounding sphere, so you end up with a chicken and egg type of > problem. In the past I was able to get around this issue by clever > usage of setInitialBound but I'm in a situation now where I'm not > going to be able to know exactly what the initial bound should be set > to. > > I played around with AutoTransform and TextBase and found that simply > removing the custom computeBound in AutoTransform and just using the > default Transform implementation works great great since the bound is > dirtied when changes are made / nodes added etc to the AutoTransform. > > For TextBase I enabled the code block that was #ifdefed out in > TextBase.cpp that tries to compute an approximate bound if the node > hasn't been traversed and it works well. There is a comment in there > about it not working well with small feature culling but I haven't > seen any issues since I made the change. > > Thanks! > > Jason > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
