[osg-users] BW or grayscale vision based on camera.
Hi, I would to implement the possibility to make a blackwhite vision and/or grayscale vision. It's possible to implement this feature modifying the camera properties only and not the geometry? Any suggestions are appreciated. Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53225#53225 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] BW or grayscale vision based on camera.
HI Dario, On 25 March 2013 10:00, Dario Minieri para...@cheapnet.it wrote: I would to implement the possibility to make a blackwhite vision and/or grayscale vision. It's possible to implement this feature modifying the camera properties only and not the geometry? Any suggestions are appreciated. You can use a fragment shaders to compute the greyscale for the geometry you have, but unless you have a very simple scene with simple state usage it'll be rather involved. The other route is to render the whole scene graph to a RGB texture then do a second rendering pass that takes the resulting texture as input and uses a shader to compute the greyscale from the RGB texture input. The osgdisortion example illustrates how you can set up a render to texture and then re-render the resulting texture, all you need to do different is to use a regular quad rather an one with distorted tex coordinates and use a custom shader to the rgb - greyscale. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] BW or grayscale vision based on camera.
Hi, Robert, thanks for your reply. I'm following the shaders way and this works...unfortunatly, I've ocean plugin also to make bw and in this case is more difficult because I've no control over ocean shaders chain...I need to glow ocean shaders chain with mine...hummm Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53288#53288 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] BW or grayscale vision based on camera.
Have a look at the osgprerender example . it is the slower path but should work ... you can do it through an image as attachment to the camera and then bind this image to a texture. This way you get control of the texels .. so you can grey them out Nick On Mon, Mar 25, 2013 at 4:54 PM, Dario Minieri para...@cheapnet.it wrote: Hi, Robert, thanks for your reply. I'm following the shaders way and this works...unfortunatly, I've ocean plugin also to make bw and in this case is more difficult because I've no control over ocean shaders chain...I need to glow ocean shaders chain with mine...hummm Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53288#53288 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org