Hi Andrew,

It shouldn't make any difference whether the data is an ImageStream or
an straight Image.  Try getting what you are doing working with a
normal image and then see how you get on.

Also have a look at example that use TexGenNode such as osgspotlight.

Robert.

On 7/12/07, Weitz, Andrew C. <[EMAIL PROTECTED]> wrote:
Robert,

I am not using a TextureRectangle or specifying any texture coordinates.
That is because I'm using a TexGenNode.  I use the following code to
specify the projection plane, which works when projecting an Image:

tex_gen_node->getTexGen()->
    setPlanesFromMatrix( osg::Matrixd::ortho2D( upper_left_x,
                                                lower_right_x,
                                                lower_right_y,
                                                upper_left_y ) *
                         osg::Matrix::translate( 1.0, 1.0, 1.0 ) *
                         osg::Matrix::scale( 0.5, 0.5, 0.5 ));

Will this code have to change to accommodate the ImageStream?  Or does
my problem lie elsewhere?

Thanks!
Andrew


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, July 12, 2007 1:30 AM
To: osg users
Subject: Re: [osg-users] ImageStream Projection

HI Andrew,

Most likely its simply that your tex coords are off.  If you are using
a TextureRectangle then the tex coords go from 0,0 to width,height
rather than 0,0 to 1,1 like on normal textures.

Robert.

On 7/12/07, Weitz, Andrew C. <[EMAIL PROTECTED]> wrote:
> Hi,
>
> My goal is to project an ImageStream onto some geometry.  I'm using
the
> QuickTime plugin to read an AVI file as an ImageStream.
>
> I can successfully project an Image onto my geometry by using a
> TexGenNode and TexEnv.  My code for projecting an ImageStream is
> identical, except that I cast the Image to an ImageStream and then
call
> play().  The problem is that I never see the movie; instead, I see a
> solid gray image projected where the movie should be.
>
> Is it possible to do what I'm attempting?
>
> Thanks,
> Andrew
> _______________________________________________
> osg-users mailing list
> osg-users@openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to