Hi Paul,

On Thu, Apr 23, 2009 at 3:59 PM, Paul Martz <[email protected]> wrote:
> Hi all -- I'd like to see how members of the community are handling this
> OSG itself needs to handle this situation in a few places. AutoTransform,
> Billboard, LOD, and screen-oriented text, just to name a few. I believe OSG
> handles this with a 1-frame latency with these classes (obtains the values
> during cull but updates the scene graph during update of the next frame),
> but haven't looked at the code in a long time.

For clarity:

Billboard creates matrices on the fly in the cull traversal, so the
billboard itself never changes with viewpoint.

AutoTransform does update it's parameters based in the viewpoint.
While the changes are not ones that will break a multi-threaded
viewer, the state of the AutoTransform is only valid for one view so
while not crashes will occur visual artefact's will.

LOD/PagedLOD don't have any state that varies with viewpoint, their
settings get read and this effects the cull traversal but the cull
traversal don't affect these nodes in any way.  (Note PagedLOD's
requests get made in by the CullVisitor, but the eventual changes are
made by during the update phase.

With the screen aligned text, the internal vertices get updated in the
cull traversal, but the this data is multi-buffered to avoid threading
issues.

> Another way to do this would be to query the viewpoint location / view
> frustum during update and modify the scene graph based on those values, even
> though those values could still change before the start of cull-draw.
>
> But I'm interested in hearing other ideas on how to handle this issue.
> Thanks in advance for any feedback.

One can do custom update traversals that use the view frustum.

Or multi-buffer data in the scene graph and do the updates in the cull
traversal.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to