Open GoogleCodeExporter opened 9 years ago
I suspect this is something to do with the camera tracking on the sky dome, I
believe
there was a similar problem with the ocean surface tracking a while back.
I'll have a look at this. If you need an urgent fix, take a look at the
callback
attached to the skydome.
Kim
Original comment by kcb...@googlemail.com
on 27 Jan 2010 at 9:21
Hey Kim,
Don't know if you looked at this or not.....but i found out that it has
something to
do with culling.
As i said before, the dome comes back when I move around.....well...its more
when the
database origin gets inside the cameras culling volume. Also, i can see the
dome snap
back into place above me if i start my prog very far off looking at the
origin....if
im looking away from the origin, there will be no sky until i turn to it.....
Also if you play around with various camera culling modes....the sky will work
with
some...and not with others....
MS
Original comment by maxims...@gmail.com
on 16 Mar 2010 at 11:57
I've seen the same problem in my application. You can reproduce that issue in
oceanExample by setting the camera far off the origin (for example "osgOcean
--initialCameraPosition -10400 -10100 120"). In this case the cull stage sees
the OceanScene and the SkyDome outside of viewing frustum. Those nodes get
rejected after computing the bounding sphere. Therefore the cull callbacks are
never called and the ocean and sky stays at origin.
I've done a crude workaround. I apply a custom bounding sphere callback to both
the OceanScene and the SkyDome. It returns a huge bounding sphere:
struct BoundingSphereCallbackHack : public
osg::Node::ComputeBoundingSphereCallback
{
virtual osg::BoundingSphere computeBound(const osg::Node &) const
{
return osg::BoundingSphere(osg::Vec3(0.0, 0.0, 0.0), 1.0e10);
}
};
However I don't like this hack. I guess there is a better way achieve this by
customizing the cull traversal. I don't know much of the details of the cull
stage, so any comments are welcome.
Jean-Claude
Original comment by jcmon...@gmail.com
on 21 Dec 2011 at 4:27
Original issue reported on code.google.com by
maxims...@gmail.com
on 27 Jan 2010 at 5:36