Re: [osg-users] osgFX::Outline implementation for OpenGL ES?
Hi, osgFX wont help in this case, but I think MatrixTransform or PositionAttitudeTranform (preffered) can do scaling, or second camera, at closer z position. Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50672#50672 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgFX::Outline implementation for OpenGL ES?
So it looks like a viable option for an OpenGL ES 1.x-compatible outline is to scale the model in the second pass (rather than drawing wireframe), calculating the scaling factor so that it outlines the normal-size model by approximately the required amount. With a couple of approximations, the scaling factor works out a bit like this: scalef = ((2 * outlineWidth / viewPortHeight) + 1) * projection[1][1] * distanceFromCentreOfModelBoundingSpehereToEye / modelBoundingSphereRadius; and that's fine, but now the difficult part can a scaling operation even be implemented within the constraints of osgFX's pathways? If so, how? And if so, how can I retrieve the projectionMatrix, viewPort, and distance to the eyepoint? TIA, Phil. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50668#50668 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgFX::Outline implementation for OpenGL ES?
Hi all, osgFX::Outline is quite a useful effect to have, but due to its dependency on glPolygonMode, doesn't function on OpenGL ES implementations. Does anyone have any suggestions or even an implementation of osgFX::Outline that will work on OpenGL ES? There appear to be promising approaches out there which do two passes, where the second moves each vertex along its normal by an amount proportional to the z distance in eye coordinates, but I wouldn't even know where to begin to implement this in OpenSceneGraph within the existing osgFX classes. Regards, Phil ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org