I thought one of Roberts examples shows this ( cannot rightly remember which though), but I think that is with fix pipe line textures
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Art Tevs Sent: Thursday, April 10, 2008 9:21 AM To: OpenSceneGraph Users Subject: Re: [osg-users] How to retrieve a U,V texture coordinate from a picking action ? Hi Jerome, what you want to do is not an easy task. However here is a simple todo list to achieve that: - find intersection of the ray and a triangle - the intersection computatiuon would give you back the barycentric coordinates of the intersection point in the triangle domain - use this coordinates and the uv coordinates of the vertices of the triangle to interpolate the uv coordinates of the intersection point (bilinear interpolation) Osg does already provide a capability to find the intersection between the ray and geometry. However I am not sure if barycentric coordinates are also provided or if you have to write your own intersector ;-) Best regards, Art > Hi, > > > > I guess this is a beginner question here but I was wondering if there > was an easy way to retrieve a u,v coordinate from a ray with osg? > > > > The use case is the following: > > -a 3D Object is loaded (let's say a cube) > > -it is textured with a glsl shader > > -The user picks a point on the cube (using the > mouse) > > > > >From the 3D point in world coordinate, how can I > retrieve the uv point in > the texture ? > > Thanks for your help, > > > > Regards, > > Jerome > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > __________________________________________________________ Gesendet von Yahoo! Mail. Der Lieblings-Mailbox der Welt. http://de.overview.mail.yahoo.com _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

