My first suspicion would be that the modelview and projection matrices are configured incorrectly such that the clip coordinate geometry xyz values are ending up outside the -w to w range.

But then you mentioned AutoTransform. Without looking at the code, I'd wager that scaling an object to a constant screen size almost certainly depends on the projection matrix. And, based on typical OSG usage, I imaging AutoTransform has had almost zero testing in an orthographic projection scenario.

I suggest you try to replicate your issue without AutoTransform. If the problem goes away, then you would know that the issue is related to AutoTransform, and you can look at mods to AutoTransform.cpp to better support ortho. On the other hand, if the problem persists, then you know it's unrelated to AutoTransform, and you can go back and check the linear algebra you used to set up your matrices.
   -Paul


On 5/15/2012 1:07 PM, Michael Schanne wrote:
Hi,

We have a scene with one osg-loaded object.  When we load our scene, our camera 
projection (ortho) is zoomed such that the object is not visible in the graphic 
window.  Our code then dynamically adds 2 new lines to the scene at a location 
corresponding to the center of the screen, but these lines are not visible.  
Only when we zoom out (by changing the camera ortho projection) to a level 
where the pre-loaded object appears, then the 2 lines appear on the screen.

We also noticed a second scenario similar to this, in which we will first pan 
our camera far to the left, then zoom out, but the pre-loaded osg object does 
not show.  It will only appear when we pan back near to the object location, 
and zoom in again.

We are using AutoTransforms for our drawn objects to have them be a constant 
size and rotation as we pan and zoom the camera.

We are not sure if this is a culling issue or something else.  What could be 
causing this behavior?

Thank you!

Cheers,
Michael

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





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


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

Reply via email to