2009/5/24 Paul Martz <pma...@skew-matrix.com>: >> http://www.sstk.co.uk/portalRendering/portal.php > > Unless I'm missing something, couldn't you do this in OSG using an Occluder > (for host-side culling) and the stencil buffer (to control screen > rendering)? > You don't even need that.
Just set up the clip planes properly. Translate the cameras position into the portals coordinate frame, then use each edge of the portal and the camera position to construct a clip plane. This should be easy to do in osg. Just need to know where to put the callback. Course it will all go pear shaped if the stuff though the portal uses clip planes, unless your h/w supports lots of them. But I suspect that might happen even with using the stencil buffer. I think you need to get clever to support multi level portals. ie ones where you can see a portal through a portal. IIRC most games with portal rendering don't support multiple levels. -- http://www.ssTk.co.uk _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org