Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
update and cull frame-spanning issue
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
paul graham  
View profile  
 More options Oct 5 2010, 8:25 am
From: "paul graham" <pd...@hotmail.com>
Date: Tue, 05 Oct 2010 14:25:47 +0200
Local: Tues, Oct 5 2010 8:25 am
Subject: [osg-users] update and cull frame-spanning issue
Hi, I'm hoping someone can help - I'm calculating a scaling value in my cull traversal using the pixelSize() function. I then set my scaling matrix in the update traversal.

The problem with this is that the scale calculated is always one frame out  when it get's applied - so there's a noticeable jerkiness on zooming in.

If I update my matrix in the cull traversal, zooming is smooth, however I understand that this is a dangerous thing to do.

Can anyone suggest a more sensible workaround?

Many thanks in advance

Paul

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32389#32389

_______________________________________________
osg-users mailing list
osg-us...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Osfield  
View profile  
 More options Oct 5 2010, 9:12 am
From: Robert Osfield <robert.osfi...@gmail.com>
Date: Tue, 5 Oct 2010 14:12:16 +0100
Local: Tues, Oct 5 2010 9:12 am
Subject: Re: [osg-users] update and cull frame-spanning issue
Hi Paul,

On Tue, Oct 5, 2010 at 1:25 PM, paul graham <pd...@hotmail.com> wrote:
> Hi, I'm hoping someone can help - I'm calculating a scaling value in my cull traversal using the pixelSize() function. I then set my scaling matrix in the update traversal.

> The problem with this is that the scale calculated is always one frame out  when it get's applied - so there's a noticeable jerkiness on zooming in.

> If I update my matrix in the cull traversal, zooming is smooth, however I understand that this is a dangerous thing to do.

In general I would recommend users modify the scene graph outwith the
cull and draw traversals as this ensures the most flexible and
robustness w.r.t any threading and multi-context work that you may
wish to do.

However, as long as your aware of the potential pitfalls it can be
safe to modify the scene graph during cull, and it's also possible to
compute data on the fly dynamically in cull and avoid any need to
modify the scene graph.

In you case you are modify the scene graph in a way that at worst
might lead to a matrix getting the wrong values if you have multiple
cull traversals per frame, but it won't lead to a crashes as you
aren't creating or destroying data or leading to any changes that
might cause a serious threading issue.

If you do have multiple viewer cameras then you will have multiple
cull traversals and multiple possible settings for your scaling and in
this case you might want to consider one camera the dominate one, or
multi-buffering the scaling, or doing the transform completely on the
fly in cull.

Robert.

Robert.
_______________________________________________
osg-users mailing list
osg-us...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Moore  
View profile  
 More options Oct 5 2010, 9:41 am
From: Tim Moore <timoor...@gmail.com>
Date: Tue, 5 Oct 2010 15:41:18 +0200
Local: Tues, Oct 5 2010 9:41 am
Subject: Re: [osg-users] update and cull frame-spanning issue

On Tue, Oct 5, 2010 at 3:12 PM, Robert Osfield <robert.osfi...@gmail.com>wrote:

traverse the subgraph, and then pop the matrix without modifying the scene
graph at all. Take a look at osgUtil::CullVisitor::apply(Transform&) to see
how this is done. You do need to be careful that the bounding volume of the
node is set so that the node will be culled properly.

Tim

_______________________________________________
osg-users mailing list
osg-us...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
paul graham  
View profile  
 More options Oct 5 2010, 11:02 am
From: "paul graham" <pd...@hotmail.com>
Date: Tue, 05 Oct 2010 17:02:05 +0200
Local: Tues, Oct 5 2010 11:02 am
Subject: Re: [osg-users] update and cull frame-spanning issue
Many thanks for the prompt responses. I've got a clear way forward now.

Cheers

Paul

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32403#32403

_______________________________________________
osg-users mailing list
osg-us...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Martz  
View profile  
 More options Oct 5 2010, 12:28 pm
From: Paul Martz <pma...@skew-matrix.com>
Date: Tue, 05 Oct 2010 10:28:15 -0600
Local: Tues, Oct 5 2010 12:28 pm
Subject: Re: [osg-users] update and cull frame-spanning issue
On 10/5/2010 7:41 AM, Tim Moore wrote:

> In your cull traversal you can push a matrix on the ModelView stack, traverse
> the subgraph, and then pop the matrix without modifying the scene graph at all.
> Take a look at osgUtil::CullVisitor::apply(Transform&) to see how this is done.
> You do need to be careful that the bounding volume of the node is set so that
> the node will be culled properly.

This is the way to go.

Note that if you're using a custom node that derives from Transform, you can
compute the necessary matrix inside the computeLocalToWorld() function, which
gets called during cull to obtain the matrix. Thus each individual cull thread
obtains its own matrix without ever modifying the scene graph.

--
   -Paul Martz      Skew Matrix Software
                    http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
osg-us...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »