I have also previously tried to set the colormask of a camera either with 
setColormask or on the stateset of the camera but it did not work. It can be a 
bug because the colormask is also in use directly in the SceneView class to 
create anaglyphic stereo from a single camera and also used to set it back to 
mono again. My workaround was to have a single separate child  under each 
camera ( osg::Group) and add the scenegraph under the group. Then set the 
colormask on the stateset of the first child of the camera (the group). John 
Ivar Haugland.

----- Original Message -----
From: Mukund Keshav <osgfo...@tevs.eu>
Sent: 30. mars 2011 08:39
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] OSG Stereoscopy (2)

Hi J-S,

Well i made the following changes. But it doesn't seem to work.
 

Code:
osg::ColorMask *col1 = new osg::ColorMask; 
col1->setRedMask(true);
col1->setMask(false, true, true, true);
osg::StateSet *state1 = new osg::StateSet;      
state1->setAttribute(col1);



Also, i tried changing the projection matrix for both cameras, but even that 
did not work.

i tried matching the human eye's intrinsics with the following frustum:
(an FOV of 95 degrees was assumed and the near plane was set)


Code:
camera1->setProjectionMatrixAsFrustum(-640, 640, -480, 480, 585, 200000); // 
Doesn't work.

 

But this doesn't work. Could you please let me know where i'm going wrong?

i went through the SceneView example code. i have used an osg::Camera instead 
of osgUtil::SceneView. Does it make any difference?


Thanks,
Mukund

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38060#38060





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to