If culling is switched off, or if the bound volume is very large then
you'll find a cull callback called even when its subgraph doesn't look
it contributes to the scene.

On 7/13/06, Simon Leung <[EMAIL PROTECTED]> wrote:

Hi Robert, thanks for the suggestions and I think we are going to use the
fragment program.

For the custom cull callback that you mentioned, we tried to add a cull
callback to a fire effect but the callback seemed to get called all the time
(i.e. no difference between when the fire effect was on the screen or not).

The code is as follows:

osg::ref_ptr<osgParticle::FireEffect> lFireRP = new
osgParticle::FireEffect();

lFireRP->setCullCallback(new UpdateCallback());

...

class UpdateCallback : public osg::NodeCallback
{
    virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
    {
        std::cout << "in the scene\n";
    }
}

Thank you for your time again.


Simon.



On 7/12/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
> Hi Simon,
>
> Perhaps you can achive this by add a StateSet above your scene to dim
> everything down, but protect the explosion for this diming effect.
> You can use osg::BlendColor to dim thing down, or use muli-texturing,
> or a fragment program.
>
> Robert.
>
> On 7/11/06, Simon Leung <[EMAIL PROTECTED]> wrote:
> >
> > Hi Robert, as a first pass, we are trying to create a simple auto-gain
> > algorithm, which if there is an explosion in the camera's field of view,
> > then we scale everything besides the explosion to very dark, and keeping
the
> > explosion white as it is.  Thanks.
> >
> > Simon.
> >
> >
> > On 7/11/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
> > >
> > On 7/11/06, Simon Leung < [EMAIL PROTECTED]> wrote:
> > > I was wondering if anyone knows how to determine if a node is in the
> > > camera's current field of view.  Thank you for your time.
> >
> > You can add a custom cull callback, if it gets called then its in the
> > view frustum.
> >
> > However, you might want to expland on what you are trying to do as
> > there might well be a simpler solution.
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> >   http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to