sorry, my first comment is not correct... it is possible to build a regular
quad using w=0.. the rest of the comment (about the plane not moving if it
is infinity) is right, i believe ;]

On Fri, Apr 11, 2008 at 10:06 AM, Pablo Carneiro Elias <[EMAIL PROTECTED]>
wrote:

>
> On Thu, Apr 10, 2008 at 8:07 PM, Daniel Sperka <[EMAIL PROTECTED]>
> wrote:
>
> > I ran into a problem like this a while back. Not as simple as I'd have
> > liked it to be, that's for sure.
>
>
> >
> > You can't just make a quad "extending to infinity" because ultimately
> > you have to feed actual coordinates to opengl.
>
>
> well, I think it is possible to make an infinity plane using homogeneous
> projective-3 coordinates... I realize after testing it that any coodinate
> with w=0 represents only a direction within homogeneous projective-3d
> space.. so, if you have 4 vertices in a quad with w=0 than you have 4
> directions... but then you will not be able to do something like a regular
> quad : (1,0,-1,0), (-1,0,-1,0),(-1,0,1,0), (1,0,1,0). It is because
> (1,0,-1,0) and (-1,0,1,0)  are not perpendicular directions.. so, in this
> example you have 4 directions but only 2 perpendicular directions... the
> directions are collinear 2 by 2...I thnk if you do something like
>
> glNormal3f(0,1,0);
>     glBegin( GL_QUADS );
>         glVertex4f( 1,0,0,0 );
>         glVertex4f( 0,0,-1,0 );
>         glVertex4f( -1,0,0,0 );
>         glVertex4f( 0,0,1,0 );
>     glEnd();
>
> you'll then have 4 perpendicular directions within the xz plane, and then
> your infinity plane is created! ;]
>
> since w=0, the camera translation has no effect within the relative
> position of the plane, only the rotation since
>
> p' = [Proj][R][T][ 1 0 0 0 ]^t (the las col of translation matrix will
> multiply 0)
>
> ... but it think theres a problem... if you put textures within this plane
> I dont know how the perspective correction of opengl will look like and I
> think the relative position of the textures will never change related to the
> observer.. so if you have tiled texture, it will seem that the floor is not
> moving, only rotating... some how very strange
>
>
> so one will need to do something pretty like you've described, something
> like a projective grid within the clip space.
>
>
>
> >
> > You can make a really big quad, assuming you can ensure that your
> > viewing volume will never extend beyond the edges of it.
>
>
> yep. for now it is exactly what I did... I only needed something very
> simple by now ;]
>
> >
> >
> > I needed my ground plane to have random dots on it, and the camera moves
> > around the ground plane, so it was impractical to generate a single
> > ground plane prior to the application running. My solution was to create
> > a custom node core OSGGroundPlaneCore. When it is rendered, this core
> > fetches the camera beacon and the camera's viewing volume parameters
> > (near plane, far plane, etc). I use all that to compute the viewable
> > region of the plane, and generate graphics which cover only that region.
> > I use pre-computed grids with plain colors and random dots, though the
> > technique could be extended to to use textures or simple
> > colors/patterns.
> >
> > That's considerably more complicated than the simplest solution, so I
> > won't bore you with the details unless you really need them. Let me know
> > - I'd be glad to share the code with the list.
>
>
> well, it would be great if you can share your code ;] Thanks again
>
> >
> >
> > Another option, though its one I know little about, is to use a terrain
> > generator.... it seems there has been some discussion of these on this
> > list, and I've seen or heard of them before. These are for generating 3D
> > surfaces, not planes. YMMV.
>
>
> ;]
>
>  Thank you very much Dan!
>
> >
> >
> > Dan
> >
> >
> >
> > Pablo Carneiro Elias wrote:
> > > Hi there.. is there any way to create a plane extending to infinity in
> > > every direction? as the ocean surface or something like that... I've
> > > tried w = 0 using osg::Vec4f , but it doesnt work...
> > >
> > > any hints?
> > >
> > > its is just a geo quad extending to infinity (creating horizon line).
> > > In fact, extending to infinity means that translation has no efect,
> > > only rotation... it means that if there is any whay of specifying that
> > > my coordinates are already within camera coordinate system it will be
> > > perfect.. is there any way to do this or I'll need to take the inverse
> > > translation of the camera and set it as the node's translation? In
> > > OpenSceneGraph there is a flag that sets a transform as being within
> > > camera coordinate system.
> > >
> > >
> > > thanks
> > >
> > > []'s!
> > >
> > > Pablo
> > >
> > ------------------------------------------------------------------------
> > >
> > >
> > -------------------------------------------------------------------------
> > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > > Don't miss this year's exciting event. There's still time to save
> > $100.
> > > Use priority code J8TL2D2.
> > >
> > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > >
> > ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Opensg-users mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/opensg-users
> > >
> >
> > --
> > Daniel J. Sperka, Ph. D.
> > UC Davis Center for Neuroscience
> >
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Don't miss this year's exciting event. There's still time to save $100.
> > Use priority code J8TL2D2.
> >
> > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > _______________________________________________
> > Opensg-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/opensg-users
> >
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to