Jason and Paul, Thanks much for the information. Each tile having its own local transform certainly makes sense for precision purposes given the extent of the database as a whole.
I believe transforming the vertex by the modelview matrix will move the vertex into eye-centric world space (i.e. the origin is now the eyepoint rather than the center of the earth). I should be able to leverage this to get the effect I'm looking for in my shader...:) Thanks again, -Shayne -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Thursday, April 09, 2009 7:36 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] terrain vertexes for VPB geocentric database... This is correct. You absolutely must model locally and position with a transform for databases of any significant spatial size (such as VPB DBs) in order to avoid the classic "camera jitter" problem that would manifest itself if you modeled with absolute coordinates. This is also why VPB terrain tiles require skirts. Each tile is positioned with its own Transform, so tile edges might not line up precisely, and cracks would be visible without the skirts. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com <http://www.skew-matrix.com/> +1 303 859 9466 ________________________________ From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Beverage Sent: Thursday, April 09, 2009 6:00 PM To: OpenSceneGraph Users Subject: Re: [osg-users] terrain vertexes for VPB geocentric database... Hi Shayne, The coordinate system produced by VPB is a standard geocentric one, like you described. The actual vertex positions of the terrain tiles are centered around a local origin and positioned using a MatrixTransform. I'm not a shader expert, but I think that the gl_vertex.xyz is actual value that is stored in the vertex. To get the actual world space coordinates of the vert, you'll need to transform it by the modelview matrix. Thanks! Jason On Thu, Apr 9, 2009 at 7:26 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC <shayne.tuel...@hill.af.mil> wrote: Can anyone tell me what space the terrain vertexes (x,y,z) live in for a database built using VPB with the --geocentric option set? I would have thought that the (x,y,z) for each vertex would be the Cartesian coordinates with the center of the ellipsoid (earth) being the origin. The reason for my question is when I reference the gl_Vertex.xyz coordinates in my vertex shader, this doesn't appear to be the case. Hopefully my inquiry makes sense here. My apologies if it doesn't. Any enlightenment on this would be most welcome. Thanks, -Shayne _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org