Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-06 Thread Sergey Polischuk
Hi

I believe this caused by small features culling (which is culling away objects 
which cover less space on screen than some pixel threshold). With compute near 
far enabled - when camera far enough objects on earth surface gets culled away, 
and as there are no objects on earth surface get's rendered, far plane 
calculated is just to close for earth to be visible.
To check if this causing problems try to set culling mode to 
myCam-setCullingMode(myCam-getCullingMode()  
(~osg::CullSettings::SMALL_FEATURE_CULLING));

You can incorporate some logic into bounds computation to return valid bound 
when camera is far from earth surface, or disable small feature culling (or 
just reduce it's threshold)

Cheers.

06.10.2012, 09:16, Preet prismatic.proj...@gmail.com:
 On Sat, Oct 6, 2012 at 1:02 AM, Preet prismatic.proj...@gmail.com wrote:

  Sergey's suggestion (invalidating the geometry's bounds with a custom
  compute bounds callback) sort of worked, but led into another issue.
  If I zoom out far enough, the Earth surface geometry disappears.
  Specifically, if the camera is pointing at the center of the Earth,
  the Earth geometry disappears when the camera eye is further than
  ~5.13E6m from the surface of the Earth. Changing the near and far
  planes don't have any effect here.

  However, if I disable culling I don't have this problem (but disabling
  culling kills the framerate):
  myCam-setCullingMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

 Sorry, typo above, I meant to write:
 myCam-setCullingMode(osg::CullSettings::NO_CULLING);

  So right now I'm:

  * Setting the near and far plane manually
  (myCam-setComputeNearFarMode is set to DO_NOT_COMPUTE) whenever the
  camera is updated to ensure my desired view volume is correct
  * Setting the Earth surface geometry compute bounds callback to disabled

  And that works fine up until I move the camera out far enough as I
  described previously. Something happens at that causes the geometry to
  disappear unless I disable culling altogether.

  Preet

 ___
 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


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-06 Thread Preet
Hiya,

A combination of:

* setting the cull mode to
myCam-setCullingMode(osg::CullSettings::VIEW_FRUSTUM_SIDES_CULLING)
* manually specifying the near and far planes
* letting osg compute the right bounding box for the earth geometry by itself

seems to be working. Thanks to all for the help!


Preet
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-05 Thread Sergey Polischuk
Hi

You can set ComputeBoundingBoxCallback on a geometry to specify whatever bounds 
you want. In your case to ignore earth geometry bound you can set its bound to 
uninitialized bounding box, and it will not make any difference to near\far 
calculations. Note that this thing completely disable view frustum culling on a 
geometry! In order to get it working you should write your cull callback and do 
check vs actual bounds there, if you need it.

Code looks like:

class UseInitialBoundsCallback : public 
osg::Drawable::ComputeBoundingBoxCallback
{
public:
osg::BoundingBox computeBound (const osg::Drawable  drawable)
{
osg::BoundingBox brand_new_uninitialized_bbox;
return brand_new_uninitialized_bbox;
}
};

geometry-setComputeBoundingBoxCallback(new UseInitialBoundsCallback);

Cheers, Sergey.

05.10.2012, 05:11, Preet prismatic.proj...@gmail.com:
 On Thu, Oct 4, 2012 at 5:37 PM, Chris Hanson xe...@alphapixel.com wrote:

  I wanted to avoid specifying the near/far planes manually since the
  behaviour without the Earth surface geometry is perfect as is. I don't
  care about the overhead of drawing the surface geometry since its so
  simple, and I don't want the scene graph to account for the surface
  geometry (outside of rendering it); the other objects in the scene
  should determine the camera frustum.
    Due to the way OGL works with near/far, if you want it drawn, you need it
  taken into account when computing the near/far planes.

    Are you just worried about the far plane being set too far?
  Including geometry for the
  Earth's surface makes the other stuff disappear (and reappear at
  certain angles).

    It sounds to me like you're not trying to solve the right problem. You
  should first determine WHY these other items aren't displayed at times.

 Sorry if it wasn't clear; the items aren't being displayed because the
 near and far planes that osg sets creates a frustum that doesn't
 include them. I need to manually set the near and far planes to see
 everything.

 The near and far planes that osg sets without the earth surface
 geometry is fine. Once you add the surface geometry though, the near
 and far planes are set such that the items are no long in the view
 frustum.

 I was looking for a flag or something that basically tells osg hey,
 don't include this node when you do your view frustum calculations
 ___
 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


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-05 Thread Glenn Waldron
Is that true? Setting an invalid bounding sphere will indeed suppress
node-level culling, but I believe the near/far calculation is done at the
Drawable level. See CullVisitor::apply(Geode).

The usual approach for terrain rendering is to subdivide your globe into
tiles. Then OSG can cull out the tiles that are not in the view, including
far-off tiles or back-facing tiles (by means of the
ClusterCullingCallback). That will bring the far clip plane closer and give
you the z-buffer resolution you need in order to visualize surface
features.

In addition, you can decrease the Camera's near/far ratio; this will give
you a little more near clip space if you still need it.

Glenn Waldron / @glennwaldron


On Fri, Oct 5, 2012 at 7:28 AM, Sergey Polischuk pol...@yandex.ru wrote:

 Hi

 You can set ComputeBoundingBoxCallback on a geometry to specify whatever
 bounds you want. In your case to ignore earth geometry bound you can set
 its bound to uninitialized bounding box, and it will not make any
 difference to near\far calculations. Note that this thing completely
 disable view frustum culling on a geometry! In order to get it working you
 should write your cull callback and do check vs actual bounds there, if you
 need it.

 Code looks like:

 class UseInitialBoundsCallback : public
 osg::Drawable::ComputeBoundingBoxCallback
 {
 public:
 osg::BoundingBox computeBound (const osg::Drawable  drawable)
 {
 osg::BoundingBox brand_new_uninitialized_bbox;
 return brand_new_uninitialized_bbox;
 }
 };

 geometry-setComputeBoundingBoxCallback(new UseInitialBoundsCallback);

 Cheers, Sergey.

 05.10.2012, 05:11, Preet prismatic.proj...@gmail.com:
  On Thu, Oct 4, 2012 at 5:37 PM, Chris Hanson xe...@alphapixel.com
 wrote:
 
   I wanted to avoid specifying the near/far planes manually since the
   behaviour without the Earth surface geometry is perfect as is. I don't
   care about the overhead of drawing the surface geometry since its so
   simple, and I don't want the scene graph to account for the surface
   geometry (outside of rendering it); the other objects in the scene
   should determine the camera frustum.
 Due to the way OGL works with near/far, if you want it drawn, you
 need it
   taken into account when computing the near/far planes.
 
 Are you just worried about the far plane being set too far?
   Including geometry for the
   Earth's surface makes the other stuff disappear (and reappear at
   certain angles).
 
 It sounds to me like you're not trying to solve the right problem.
 You
   should first determine WHY these other items aren't displayed at times.
 
  Sorry if it wasn't clear; the items aren't being displayed because the
  near and far planes that osg sets creates a frustum that doesn't
  include them. I need to manually set the near and far planes to see
  everything.
 
  The near and far planes that osg sets without the earth surface
  geometry is fine. Once you add the surface geometry though, the near
  and far planes are set such that the items are no long in the view
  frustum.
 
  I was looking for a flag or something that basically tells osg hey,
  don't include this node when you do your view frustum calculations
  ___
  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


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-05 Thread Thrall, Bryan
Preet wrote on 2012-10-04: 
 Sorry if it wasn't clear; the items aren't being displayed because the
 near and far planes that osg sets creates a frustum that doesn't
include
 them. I need to manually set the near and far planes to see
everything.
 
 The near and far planes that osg sets without the earth surface
geometry
 is fine. Once you add the surface geometry though, the near and far
 planes are set such that the items are no long in the view frustum.

If the surface geometry is in view but the calculated frustum doesn't
contain it, then that sounds like a bug that should be investigated
further. Are you certain the frustum really doesn't contain the surface
geometry?

It seems more likely that the problem is with z buffer precision due to
the earth geometry pushing the far plane out so far that the surface
geometry is getting buried, as other people in the thread have
suggested.
--
Bryan Thrall
Principal Software Engineer
FlightSafety International
bryan.thr...@flightsafety.com


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


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-05 Thread Sergey Polischuk
Hi I'm talking about setting this bounds callbacks on geometry(drawable) leaves. 05.10.2012, 17:20, "Glenn Waldron" gwald...@gmail.com:Is that true? Setting an invalid bounding sphere will indeed suppress node-level culling, but I believe the near/far calculation is done at the Drawable level. See CullVisitor::apply(Geode). The usual approach for terrain rendering is to subdivide your globe into tiles. Then OSG can cull out the tiles that are not in the view, including far-off tiles or back-facing tiles (by means of the ClusterCullingCallback). That will bring the far clip plane closer and give you the z-buffer resolution you need in order to visualize surface features. In addition, you can decrease the Camera's near/far ratio; this will give you a little more near clip space if you still need it.Glenn Waldron / @glennwaldron On Fri, Oct 5, 2012 at 7:28 AM, Sergey Polischuk pol...@yandex.ru wrote:Hi  You can set ComputeBoundingBoxCallback on a geometry to specify whatever bounds you want. In your case to ignore earth geometry bound you can set its bound to uninitialized bounding box, and it will not make any difference to near\far calculations. Note that this thing completely disable view frustum culling on a geometry! In order to get it working you should write your cull callback and do check vs actual bounds there, if you need it.  Code looks like:  class UseInitialBoundsCallback : public osg::Drawable::ComputeBoundingBoxCallback { public:         osg::BoundingBox computeBound (const osg::Drawable  drawable)         {                 osg::BoundingBox brand_new_uninitialized_bbox;                 return brand_new_uninitialized_bbox;         } };  geometry-setComputeBoundingBoxCallback(new UseInitialBoundsCallback);  Cheers, Sergey.  05.10.2012, 05:11, "Preet" prismatic.proj...@gmail.com:  On Thu, Oct 4, 2012 at 5:37 PM, Chris Hanson xe...@alphapixel.com wrote:    I wanted to avoid specifying the near/far planes manually since the   behaviour without the Earth surface geometry is perfect as is. I don't   care about the overhead of drawing the surface geometry since its so   simple, and I don't want the scene graph to account for the surface   geometry (outside of rendering it); the other objects in the scene   should determine the camera frustum.     Due to the way OGL works with near/far, if you want it drawn, you need it   taken into account when computing the near/far planes.      Are you just worried about the far plane being set too far?   Including geometry for the   Earth's surface makes the other stuff disappear (and reappear at   certain angles).      It sounds to me like you're not trying to solve the right problem. You   should first determine WHY these other items aren't displayed at times.   Sorry if it wasn't clear; the items aren't being displayed because the  near and far planes that osg sets creates a frustum that doesn't  include them. I need to manually set the near and far planes to see  everything.   The near and far planes that osg sets without the earth surface  geometry is fine. Once you add the surface geometry though, the near  and far planes are set such that the items are no long in the view  frustum.   I was looking for a flag or something that basically tells osg "hey,  don't include this node when you do your view frustum calculations"  ___  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 listosg-users@lists.openscenegraph.orghttp://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


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-05 Thread Glenn Waldron
Indeed, my mistake.

Glenn Waldron / @glennwaldron


On Fri, Oct 5, 2012 at 4:07 PM, Sergey Polischuk pol...@yandex.ru wrote:

 Hi

 I'm talking about setting this bounds callbacks on geometry(drawable)
 leaves.

 05.10.2012, 17:20, Glenn Waldron gwald...@gmail.com:

 Is that true? Setting an invalid bounding sphere will indeed suppress
 node-level culling, but I believe the near/far calculation is done at the
 Drawable level. See CullVisitor::apply(Geode).
 The usual approach for terrain rendering is to subdivide your globe into
 tiles. Then OSG can cull out the tiles that are not in the view, including
 far-off tiles or back-facing tiles (by means of the
 ClusterCullingCallback). That will bring the far clip plane closer and give
 you the z-buffer resolution you need in order to visualize surface
 features.
 In addition, you can decrease the Camera's near/far ratio; this will give
 you a little more near clip space if you still need it.

 Glenn Waldron / @glennwaldron


 On Fri, Oct 5, 2012 at 7:28 AM, Sergey Polischuk pol...@yandex.ru wrote:

 Hi

 You can set ComputeBoundingBoxCallback on a geometry to specify whatever
 bounds you want. In your case to ignore earth geometry bound you can set
 its bound to uninitialized bounding box, and it will not make any
 difference to near\far calculations. Note that this thing completely
 disable view frustum culling on a geometry! In order to get it working you
 should write your cull callback and do check vs actual bounds there, if you
 need it.

 Code looks like:

 class UseInitialBoundsCallback : public
 osg::Drawable::ComputeBoundingBoxCallback
 {
 public:
 osg::BoundingBox computeBound (const osg::Drawable  drawable)
 {
 osg::BoundingBox brand_new_uninitialized_bbox;
 return brand_new_uninitialized_bbox;
 }
 };

 geometry-setComputeBoundingBoxCallback(new UseInitialBoundsCallback);

 Cheers, Sergey.

 05.10.2012, 05:11, Preet prismatic.proj...@gmail.com:
  On Thu, Oct 4, 2012 at 5:37 PM, Chris Hanson xe...@alphapixel.com
 wrote:
 
   I wanted to avoid specifying the near/far planes manually since the
   behaviour without the Earth surface geometry is perfect as is. I don't
   care about the overhead of drawing the surface geometry since its so
   simple, and I don't want the scene graph to account for the surface
   geometry (outside of rendering it); the other objects in the scene
   should determine the camera frustum.
 Due to the way OGL works with near/far, if you want it drawn, you
 need it
   taken into account when computing the near/far planes.
 
 Are you just worried about the far plane being set too far?
   Including geometry for the
   Earth's surface makes the other stuff disappear (and reappear at
   certain angles).
 
 It sounds to me like you're not trying to solve the right problem.
 You
   should first determine WHY these other items aren't displayed at times.

 
  Sorry if it wasn't clear; the items aren't being displayed because the
  near and far planes that osg sets creates a frustum that doesn't
  include them. I need to manually set the near and far planes to see
  everything.
 
  The near and far planes that osg sets without the earth surface
  geometry is fine. Once you add the surface geometry though, the near
  and far planes are set such that the items are no long in the view
  frustum.
 
  I was looking for a flag or something that basically tells osg hey,
  don't include this node when you do your view frustum calculations

  ___
  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


 ___
 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


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-05 Thread Preet
Sergey's suggestion (invalidating the geometry's bounds with a custom
compute bounds callback) sort of worked, but led into another issue.
If I zoom out far enough, the Earth surface geometry disappears.
Specifically, if the camera is pointing at the center of the Earth,
the Earth geometry disappears when the camera eye is further than
~5.13E6m from the surface of the Earth. Changing the near and far
planes don't have any effect here.

However, if I disable culling I don't have this problem (but disabling
culling kills the framerate):
myCam-setCullingMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

So right now I'm:

* Setting the near and far plane manually
(myCam-setComputeNearFarMode is set to DO_NOT_COMPUTE) whenever the
camera is updated to ensure my desired view volume is correct
* Setting the Earth surface geometry compute bounds callback to disabled

And that works fine up until I move the camera out far enough as I
described previously. Something happens at that causes the geometry to
disappear unless I disable culling altogether.


Preet
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-05 Thread Preet
On Sat, Oct 6, 2012 at 1:02 AM, Preet prismatic.proj...@gmail.com wrote:
 Sergey's suggestion (invalidating the geometry's bounds with a custom
 compute bounds callback) sort of worked, but led into another issue.
 If I zoom out far enough, the Earth surface geometry disappears.
 Specifically, if the camera is pointing at the center of the Earth,
 the Earth geometry disappears when the camera eye is further than
 ~5.13E6m from the surface of the Earth. Changing the near and far
 planes don't have any effect here.

 However, if I disable culling I don't have this problem (but disabling
 culling kills the framerate):
 myCam-setCullingMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

Sorry, typo above, I meant to write:
myCam-setCullingMode(osg::CullSettings::NO_CULLING);


 So right now I'm:

 * Setting the near and far plane manually
 (myCam-setComputeNearFarMode is set to DO_NOT_COMPUTE) whenever the
 camera is updated to ensure my desired view volume is correct
 * Setting the Earth surface geometry compute bounds callback to disabled

 And that works fine up until I move the camera out far enough as I
 described previously. Something happens at that causes the geometry to
 disappear unless I disable culling altogether.


 Preet
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-04 Thread Preet
Hey,

By default some of the parameters of a camera are computed based on
the contents of a scene (like the near and far plane). Camera
manipulators will also behave differently based on the placement of
objects in the scene. I have one node in my scene that I want the
camera and any manipulators to 'ignore' in this respect, but I still
want the node to be rendered. Is there anyway I can do this?

Preet
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-04 Thread Chris Hanson
On Thu, Oct 4, 2012 at 12:48 PM, Preet prismatic.proj...@gmail.com wrote:

 By default some of the parameters of a camera are computed based on
 the contents of a scene (like the near and far plane). Camera
 manipulators will also behave differently based on the placement of
 objects in the scene. I have one node in my scene that I want the
 camera and any manipulators to 'ignore' in this respect, but I still
 want the node to be rendered. Is there anyway I can do this?


Probably not. The nodes have to be Culled in order to be added to the
Render List, and the scene bounds and such are computed during culling.

The bigger question is what are you trying to do, and why? That answer will
probably allow us to suggest something useful, like depth partitioning or
something.




 --

Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-04 Thread Preet
On Thu, Oct 4, 2012 at 3:52 PM, Chris Hanson xe...@alphapixel.com wrote:
 On Thu, Oct 4, 2012 at 12:48 PM, Preet prismatic.proj...@gmail.com wrote:

 By default some of the parameters of a camera are computed based on
 the contents of a scene (like the near and far plane). Camera
 manipulators will also behave differently based on the placement of
 objects in the scene. I have one node in my scene that I want the
 camera and any manipulators to 'ignore' in this respect, but I still
 want the node to be rendered. Is there anyway I can do this?


 Probably not. The nodes have to be Culled in order to be added to the Render
 List, and the scene bounds and such are computed during culling.

 The bigger question is what are you trying to do, and why? That answer will
 probably allow us to suggest something useful, like depth partitioning or
 something.


I'm trying to visualize stuff like buildings and roads on the surface
of the Earth. But for reference, I'd also like to display the surface
of the Earth (just as a set of points). Including geometry for the
Earth's surface makes the other stuff disappear (and reappear at
certain angles). To me it looks like an issue with the near/far planes
of the frustum.

I wanted to avoid specifying the near/far planes manually since the
behaviour without the Earth surface geometry is perfect as is. I don't
care about the overhead of drawing the surface geometry since its so
simple, and I don't want the scene graph to account for the surface
geometry (outside of rendering it); the other objects in the scene
should determine the camera frustum.


Preet
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-04 Thread Chris Hanson
I wanted to avoid specifying the near/far planes manually since the

 behaviour without the Earth surface geometry is perfect as is. I don't
 care about the overhead of drawing the surface geometry since its so
 simple, and I don't want the scene graph to account for the surface
 geometry (outside of rendering it); the other objects in the scene
 should determine the camera frustum.



  Due to the way OGL works with near/far, if you want it drawn, you need it
taken into account when computing the near/far planes.

  Are you just worried about the far plane being set too far?

   Including geometry for the
Earth's surface makes the other stuff disappear (and reappear at
certain angles).

  It sounds to me like you're not trying to solve the right problem. You
should first determine WHY these other items aren't displayed at times.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I get the viewer's camera to 'ignore' a node's geometry?

2012-10-04 Thread Preet
On Thu, Oct 4, 2012 at 5:37 PM, Chris Hanson xe...@alphapixel.com wrote:
 I wanted to avoid specifying the near/far planes manually since the

 behaviour without the Earth surface geometry is perfect as is. I don't
 care about the overhead of drawing the surface geometry since its so
 simple, and I don't want the scene graph to account for the surface
 geometry (outside of rendering it); the other objects in the scene
 should determine the camera frustum.



   Due to the way OGL works with near/far, if you want it drawn, you need it
 taken into account when computing the near/far planes.

   Are you just worried about the far plane being set too far?

Including geometry for the
 Earth's surface makes the other stuff disappear (and reappear at
 certain angles).

   It sounds to me like you're not trying to solve the right problem. You
 should first determine WHY these other items aren't displayed at times.


Sorry if it wasn't clear; the items aren't being displayed because the
near and far planes that osg sets creates a frustum that doesn't
include them. I need to manually set the near and far planes to see
everything.

The near and far planes that osg sets without the earth surface
geometry is fine. Once you add the surface geometry though, the near
and far planes are set such that the items are no long in the view
frustum.

I was looking for a flag or something that basically tells osg hey,
don't include this node when you do your view frustum calculations
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org