Re: [osg-users] Order Independent Transparency and osg::Viewer

2019-06-14 Thread Chris Hanson
I think you might want to try this OSG library we wrote, which adds order
independent transparency options:

http://alphapixel.com/project/osg-transparency-toolkit/



On Fri, Jun 14, 2019 at 9:56 AM Yu Jie  wrote:

> Hi, everyone. In order to make geometrys in my scene to be transparency, I
> have studied osgoit code. and I am sure "order independent transparency"
> will be the right way for me. But problems happened when i develop this
> function in my application.
>
> In my application, i used osgViewer::CompositeViewer to render scene but
> not osg::Viewer that used in osgoit. Everything is well when use
> osg::Viewer, as showed in below picture. But in my application, all
> geometries disappeared when i add them into DepthPeeling transparency scene.
>
>
>
> is there some special settings should be set for  "order independent
> transparency" in osgViewer::CompositeViewer. I have no solution for this
> problem after searched forum many times.
>
> Can anybody give me some suggestions about this situation. Thank you very
> much!
>
>
>
> Thank you!
>
> Cheers,
> Yu[img][/img]
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76291#76291
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/geometrydisappeared_102.png
> http://forum.openscenegraph.org//files/well_transparency_206.png
>
>
> ___
> 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] Order Independent Transparency and osg::Viewer

2019-06-14 Thread Yu Jie
Hi, everyone. In order to make geometrys in my scene to be transparency, I have 
studied osgoit code. and I am sure "order independent transparency" will be the 
right way for me. But problems happened when i develop this function in my 
application.

In my application, i used osgViewer::CompositeViewer to render scene but not 
osg::Viewer that used in osgoit. Everything is well when use osg::Viewer, as 
showed in below picture. But in my application, all geometries disappeared when 
i add them into DepthPeeling transparency scene.



is there some special settings should be set for  "order independent 
transparency" in osgViewer::CompositeViewer. I have no solution for this 
problem after searched forum many times. 

Can anybody give me some suggestions about this situation. Thank you very much!



Thank you!

Cheers,
Yu[img][/img]

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




Attachments: 
http://forum.openscenegraph.org//files/geometrydisappeared_102.png
http://forum.openscenegraph.org//files/well_transparency_206.png


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


Re: [osg-users] Force OSG for GLES 2.0 to reenable vertex attributes before drawing geometry

2019-06-14 Thread Robert Osfield
Hi Plamen,

There is no explicit mechanism for forcing extra
glEnableVertexAttribArray calls as they shouldn't be required.  What
you describe sounds like a bug in the driver or the OSG.

Which version of the OSG are you using?  What hardware target are you using?

What happens when you don't use osg::ShapeDrawable? For instance just
use a normal osg::Geometry.  FYI, osg::ShapeDrawable was never meant
for widespread usage back when it was originally written, it's was
simply written to provide a quick a dirty means of visualizing
primitive shapes for debug purposes - this is going back to 2002 :-)

Robert.

On Fri, 14 Jun 2019 at 05:57, Plamen Terziev  wrote:
>
> Hi,
>
> I've built OSG for Android with GLES 2.0 support. I've created very simple 
> scene where I render a sphere using ShapeDrawable.
>
> In the first frame I can see that OSG calls glEnableVertexAttribArray() and 
> sets the data using glVertexAttribPointer(). After that it calls 
> glDrawElements() and the sphere renders fine.
>
> However at the end of the frame the app calls glDisableVertexAttribArray() (I 
> am using Qt for OSG integration and Qt changes the vertex arrays). That's why 
> the next frame no geometry draws because OSG does not call again 
> glEnableVertexAttribArray() and glVertexAttribPointer() but only 
> glDrawElements().
>
> I'd like to force OSG to call on each frame glEnableVertexAttribArray() and 
> glVertexAttribPointer() before calling glDrawElements() because the vertex 
> arrays state has changed between the frames and needs to provide again the 
> correct data.
>
> How I can do this?
>
>
> Thank you!
>
> Cheers,
> Plamen
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76274#76274
>
>
>
>
>
> ___
> 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] Transparency problem

2019-06-14 Thread Yu Jie
Hi icf80,

thanks for you help. I solved this problem with your suggestion to setting 
cull. Now the transparency of my cube is normal. Thank you very much for your 
help.


Cheers,
Yu

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





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