[osg-users] rendering edges of an object

John Donovan john.donovan at embryonicstudios.com
Thu Oct 11 02:00:43 PDT 2007

andrej spilak wrote:
> Hi!
> I've exported an object from SolidWorks and stored it in .osg format. 
> Now I'm trying to get rendered the edges of an object (without triangles 
> as are seen in wireframe in the osgviewer - only the edges wireframe). 
> What would be best possible solution(s) to achieve this? I'd like to 
> have those in my version of a viewer later as a separate view option (or 
> both at the same time)
> Thanks in advance, andrej

If you want a silhouette, then a neat trick is to render your mesh as normal.
Then set line thickness to some value, and depth-test to EQUAL, and render
back-faces instead of front-faces in wireframe.
An alternative would be to use RTT and apply an edge filter via a fragment shader.


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 

More information about the osg-users mailing list