Re: [osg-users] Consistent lighting across different cameras

2009-07-07 Thread Paul Melis
Julian Looser wrote: > Hi Ulrich, >> (The model and lightsource are a shared graph, right?) > Yes, that's right. >> With regards to the different lighting, how is your model >> tessellated? If it's coarsely tessellated and/or you're using face >> normals then the lighting calculation might only be

Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Julian Looser
Hi Ulrich, (The model and lightsource are a shared graph, right?) Yes, that's right. With regards to the different lighting, how is your model tessellated? If it's coarsely tessellated and/or you're using face normals then the lighting calculation might only be done on the corner vertices an

Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Terry Welsh
00 > From: Julian Looser > Subject: [osg-users] Consistent lighting across different cameras > To: OpenSceneGraph Users > Message-ID: <4a517d5a.5060...@roarmot.co.nz> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi, > >

Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Paul Melis
Julian Looser wrote: Hi, I am using OSG in a multi-wall stereo rendering environment. We have three walls, and we render both a left and right eye view for each wall. To do this, in my application I create six osg::Cameras and update their projection and view matrices each frame based on hea

Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Julian Looser
Hi Simon, Thanks for the promising link, but I don't think I'm misusing the projection matrix. I calculate the left, right, top and bottom values and set the projection matrix via osg::Camera's setProjectionMatrixAsFrustum. The view matrix is set with setViewMatrixAsLookAt using the head-trac

Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Ulrich Hertlein
Hi Julian, On 6/7/09 6:28 AM, Julian Looser wrote: root -- camera (mv & proj for left wall) --- model --- lightsource -- camera (mv & proj for center wall) --- model --- lightsource -- camera (mv & proj for right wall) --- model --- lightsource Am I putting my lightsource in the wrong place in

Re: [osg-users] Consistent lighting across different cameras

2009-07-06 Thread Simon Hammett
Just a quick guess, but are you putting rotation into your left & right projection matrices? If so that's what's mucking up your lighting: http://sjbaker.org/steve/omniv/projection_abuse.html 2009/7/6 Julian Looser : > Hi, > > I am using OSG in a multi-wall stereo rendering environment. We have t

[osg-users] Consistent lighting across different cameras

2009-07-05 Thread Julian Looser
Hi, I am using OSG in a multi-wall stereo rendering environment. We have three walls, and we render both a left and right eye view for each wall. To do this, in my application I create six osg::Cameras and update their projection and view matrices each frame based on head-tracking. I add the