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

2018-10-31 Thread Christoph Dohmen
Hi Laurens,

in the end it took some time but finally I could create source to create the 
eraser and it is up and running quite smooth. Thank you!

Thank you!

Cheers,
Christoph

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75156#75156





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-13 Thread Voerman, L.
Hi Christoph,
I can combine this with a scene that uses shaders without modification. If
that's not working for you I don't understand why.
Using the depth buffer to block further rendering will need the
GL_DEPTH_TEST to be active, did that change for your shader/fixed scene?
Laurens.

On Thu, Sep 13, 2018 at 9:59 AM Christoph Dohmen 
wrote:

> Hi Laurens,
>
> it's working if I reduce the current drawing sources to fixed function
> pipeline. But unfortunately we use several shaders. As far as I understand
> the idea, I will need to access the ColorMask from within the fragment
> shader, right? Any hints for that or am I totally wrong?
>
> Thank you!
>
> Cheers,
> Christoph
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74736#74736
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-13 Thread Christoph Dohmen
Hi Laurens,

it's working if I reduce the current drawing sources to fixed function 
pipeline. But unfortunately we use several shaders. As far as I understand the 
idea, I will need to access the ColorMask from within the fragment shader, 
right? Any hints for that or am I totally wrong?

Thank you!

Cheers,
Christoph

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74736#74736





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-13 Thread Voerman, L.
Hi Chris,
> Will it work with more than one layer of red-frame-green-symbol objects?
I don't fully understand your question. The renderBin numbers can force the
render order of lots of "layers",
but the invisible quad fills the depth buffer with zeros - so that will not
really scale with a layer system.
Laurens.

On Wed, Sep 12, 2018 at 11:49 PM Chris Hanson  wrote:

> That's a clever trick. Will it work with more than one layer of
> red-frame-green-symbol objects?
>
> Does it need to work in that situation?
>
> "Rubber" means something else in US English. ;)
>
>
> On Wed, Sep 12, 2018 at 4:18 PM Christoph Dohmen 
> wrote:
>
>> Thank you, Laurens!
>>
>> Cheers,
>> Christoph
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=74725#74725
>>
>>
>>
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
> --
> Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
> http://www.alphapixel.com/
> Training • Consulting • Contracting
> 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4
> • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
> Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
> osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
> iPhone/iPad/iOS • Android
> @alphapixel  facebook.com/alphapixel (775)
> 623-PIXL [7495]
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-12 Thread Chris Hanson
That's a clever trick. Will it work with more than one layer of
red-frame-green-symbol objects?

Does it need to work in that situation?

"Rubber" means something else in US English. ;)


On Wed, Sep 12, 2018 at 4:18 PM Christoph Dohmen 
wrote:

> Thank you, Laurens!
>
> Cheers,
> Christoph
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74725#74725
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-12 Thread Christoph Dohmen
Thank you, Laurens!

Cheers,
Christoph

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74725#74725





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-12 Thread Voerman, L.
Hi Christoph,
I don't have a piece of source code that will create this file, I exported
the basic shapes from 3dsmax and edited the file to set the renderbins,
depth and colormask.
Laurens.

On Wed, Sep 12, 2018 at 1:50 PM Christoph Dohmen 
wrote:

> Yes, Laurens, that's exactely what I was looking for!
>
> Do you have any source which created the file?
>
> Thank you!
>
> Cheers,
> Christoph
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74720#74720
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-12 Thread Christoph Dohmen
Yes, Laurens, that's exactely what I was looking for!

Do you have any source which created the file?

Thank you!

Cheers,
Christoph

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74720#74720





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-12 Thread Christoph Dohmen
Hi Daniel,

it's not a drawing programm.

Thank you!

Cheers,
Christoph

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74718#74718





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-12 Thread Voerman, L.
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 
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@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
<>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-12 Thread Daniel Trstenjak
Hi Christoph,

On Tue, Sep 11, 2018 at 07:09:26PM +0200, Christoph Dohmen wrote:
> Well, Chris, thanks for the question. It shows that I was not precise
> enough. Currently I'm drawing the black line on top of a quite
> complex background (light blue). And as a second item I draw the quad
> with the red frame showing the green symbol and having transparent
> colour in the background so the scene background hat visible and the
> black line.  My goal is to use the textured quad as a rubber and
> remove the black line but not the scene background like in symbol.png.

are you making some kind of drawing program, and you want to be able
to move the rubber/erasier around and delete the previously drawn lines?

If this is the case, then you most likely don't want to implement the
erasing operation as an OpenGL graphics operation, but as an operation
on your program data describing the lines.

You're modifying the internal program state and then draw this new state.

Greetings,
Daniel
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-11 Thread Christoph Dohmen
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@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-11 Thread Tony Vasile
Hi Chris
  Actually in non US English the words rubber and eraser are interchangeable.

Tony


Tony V

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74715#74715





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-11 Thread Chris Hanson
I think some parts were lost in translation. I think the word you want to
use is "eraser" instead of "rubber", though I can see how it could be
mistranslated from another language.

I can think of a way to do this with your current draw order (black line
then green line) by using a shader and a texture holding the background
image.

Otherwise, you'd have to probably change the draw order so that the black
line was drawn later than the green line.


I often recommend users with complex questions "take a step back" and
explain the non-simple-abstract problem. Many times we find people asking a
specific question believing it is the only solution, and finding no good
ways to achieve it, when in fact the same overall goal could easily be
accomplished a different way if we knew what they were really trying to do.

Could you explain more about the real-world problem you're trying to solve,
instead of this simplified abstract summary?

As an example, imagine if someone came to you asking how to safely operate
a flamethrower in their kitchen, and you answered it was impossible. Later
you found out that all they wanted to do was make tea, but had pre-decided
on "flamethrower" as the way to get there, but if they'd just said "I want
to make tea", an electric kettle would have neatly solved the problem.
Don't be the flamethrower tea guy.



On Tue, Sep 11, 2018 at 6:08 PM Christoph Dohmen 
wrote:

> Well, Chris, thanks for the question. It shows that I was not precise
> enough.
> Currently I'm drawing the black line on top of a quite complex background
> (light blue). And as a second item I draw the quad with the red frame
> showing the green symbol and having transparent colour in the background so
> the scene background hat visible and the black line.
> My goal is to use the textured quad as a rubber and remove the black line
> but not the scene background like in symbol.png.
>
> I hope that clarified it a bit more?!
>
> Thank you!
>
> Cheers,
> Christoph
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74709#74709
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-11 Thread Christoph Dohmen
Well, Chris, thanks for the question. It shows that I was not precise enough.
Currently I'm drawing the black line on top of a quite complex background 
(light blue). And as a second item I draw the quad with the red frame showing 
the green symbol and having transparent colour in the background so the scene 
background hat visible and the black line.
My goal is to use the textured quad as a rubber and remove the black line but 
not the scene background like in symbol.png.

I hope that clarified it a bit more?!

Thank you!

Cheers,
Christoph

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74709#74709





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-11 Thread Chris Hanson
I think there's a little bit of communication issue here.

You are saying you want the look of symbol.jpg? How do you mean "rubber
mode"? What is "rubber" about it?

You could possibly create a dummy quad with the background blue color on it
that encompasses the screen-space bounding box of the green line, and
render it after the black line but before the green one. Would that give
you the effect you want?

On Tue, Sep 11, 2018 at 12:50 PM Christoph Dohmen 
wrote:

> Hi all,
>
> I'm looking for some inspiration for solving the following 'problem':
> Currently I'm drawing basic line geometries like in attachment line.png.
> And I'm able to draw items above the geometries (combo.png). But the final
> goal must be some kind of 'rubber mode' which makes the geometry
> transparent and keeps the background (liek in symbol.png).
>
> What may be the technique to solve this?
>
> Thank you!
>
> Cheers,
> Christoph
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74703#74703
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2018-09-11 Thread Christoph Dohmen
Hi all,

I'm looking for some inspiration for solving the following 'problem':
Currently I'm drawing basic line geometries like in attachment line.png. And 
I'm able to draw items above the geometries (combo.png). But the final goal 
must be some kind of 'rubber mode' which makes the geometry transparent and 
keeps the background (liek in symbol.png).

What may be the technique to solve this?

Thank you!

Cheers,
Christoph

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74703#74703



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org