[osg-users] Idea to implement a kind of 'rubber mode'

Voerman, L. l.voerman at rug.nl
Wed Sep 12 02:06:52 PDT 2018


Hi Christoph,
attached is an osg file that does what I think you want,
unzip and view with:
"osgviewer cow.osg.0,-5,0.trans erasor.osg.10,10,10.scale"

The osg file works by using a low (negative) render bin number to force the
draw order,
first renderbin -2 draws the erasor geometry and the outline,
than renderbin -1 renders an invisible quad (colormast all OFF)
to fill the depth buffer with 0 (depth range 0-0),
so it's pixels won't be overwritten by the normal rendering done later.
Laurens.

On Wed, Sep 12, 2018 at 7:59 AM Christoph Dohmen <christoph.dohmen at cae.de>
wrote:

> Hi Chris,
>
> the original goal is drawing a decorated line where the decoration
> interrupts and keep the background visible. I tried to visualize the
> elements and the seps which are acutally working. I got a few keywords like
> 'stencil', 'render to texture' but the samples are all related to textured
> items covering textured items and not to polylines covered by textured
> items.
>
> Thank you!
>
> Cheers,
> Christoph
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74716#74716
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180912/f1f1608f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erasor.zip
Type: application/x-zip-compressed
Size: 1402 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180912/f1f1608f/attachment.bin>


More information about the osg-users mailing list