Re: [osg-users] projective texture mapping and lighting

2012-02-21 Thread Michael Schanne
Never mind; I was able to figure out a solution by studying the osgpackeddepthstencil example and some OpenGL stencil buffer tutorials I found online. What I did was add a node to the root where I created a geometry the same size as my video projection, and added a Stencil. I also turned off

Re: [osg-users] projective texture mapping and lighting

2012-02-21 Thread Michael Schanne
Apparently I spoke too soon; the method I described in my last post doesn’t work when I rotate the viewer. If I had an object outside the texture projection area and rotated it so it should obscure the image, I could see the image through the object. Likewise, if I had an object inside the

Re: [osg-users] projective texture mapping and lighting

2012-02-21 Thread Sebastian Messerschmidt
Hello Mike, I didn't dive into the last part, but it seems you want to have your projection only on certain parts. In order to sort out the rest of the scene you can either use stencil tests or depth tests. Think about it like some kind of inverse shadow mapping. You want only those parts

[osg-users] projective texture mapping and lighting

2012-02-20 Thread Michael Schanne
Hi, I am new to OSG and OpenGL. I am attempting to create a scene where an image from a real camera is projected onto a 3d model of the object being photographed. I used the projective texture mapping technique following the osgspotlight example, substituting my image for the spotlight image