[osg-users] Creating Texture2DArray

2016-10-20 Thread Bruno Oliveira
Hello, I'm trying to create a Texture2DArray. My textures are uchar images with size (texWidth, 256), single channel. The combination of texture internalFormat and pixelFormat with pixelType is not working. I use GL_R8UI for internalFormat, GL_RED_INTEGER for pixelFormat and GL_UNSIGNED_BYTE for

Re: [osg-users] Migration from 3.0.1 to 3.2.0 (CEGUI)

2016-10-20 Thread Garthy Dee
Hi jeladi, Not a problem. I'm happy to have been able to help. Cheers, Garthy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69097#69097 ___ osg-users mailing list

Re: [osg-users] Migration from 3.0.1 to 3.2.0 (CEGUI)

2016-10-20 Thread Jeff White
Garth, I have an OSGEarth-based application that uses CEGUI for its widgets. I was running into a similar problem where my CEGUI textures would either go all white or disappear entirely when OSGEarth annotation nodes came into view. Your solution took care of the problem. Thanks for posting

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Trajce Nikolov NICK
almost there .. the flickering is gone, just the shadow texture lookup coordinates are messed up when used view space matrix and vertex. This is the code for constructing the final matrix: osg::Matrixf lmvpm = lightMatrixInViewSpace * osg::Matrixf(camera->getProjectionMatrix()) *

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Glenn Waldron
Up vector doesn't really matter, so just pick one like: side = cross(view_vec, (0,0,1)); up = cross(side, view_vec); Glenn Waldron On Thu, Oct 20, 2016 at 12:00 PM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Just last question .. What the 'up' vector would be now for

[osg-users] performance of QT GUI when integrated with OSG

2016-10-20 Thread Lv Qing
Hi, I have used class ViewerWidget(: public QWidget, public osgViewer::CompositeViewer) to integrate OSG into a QT application. Like this: viewer3DWindow = new ViewerWidget; QMdiSubWindow *tmpsubwin_3D = new QMdiSubWindow ; tmpsubwin_3D->setWidget(viewer3DWindow); And

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Trajce Nikolov NICK
Just last question .. What the 'up' vector would be now for making the light matrix in view space? On Thu, Oct 20, 2016 at 5:39 PM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Glenn, > > this worked ... :-) ... Thanks for the hint ... > > On Thu, Oct 20, 2016 at 5:02 PM, Trajce

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Trajce Nikolov NICK
Glenn, this worked ... :-) ... Thanks for the hint ... On Thu, Oct 20, 2016 at 5:02 PM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > wops .. > > mx.makeLookAt(lightPosInViewSpace,lightPosInViewSpace+lightDirInViewSpace > ,up) > > On Thu, Oct 20, 2016 at 5:00 PM, Trajce Nikolov

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Trajce Nikolov NICK
wops .. mx.makeLookAt(lightPosInViewSpace,lightPosInViewSpace+lightDirInViewSpace ,up) On Thu, Oct 20, 2016 at 5:00 PM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Thanks Glenn, > > actually I was expecting this. I have the math to get the light direction > in view space, just

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Trajce Nikolov NICK
Thanks Glenn, actually I was expecting this. I have the math to get the light direction in view space, just the construction of the light matrix in view space hurts my head a bit ( I missed that part of the class :-) ) vec3 lightDirInViewSpace; vec3 lightPosInViewSpace;

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Glenn Waldron
There's your precision loss, you can't do that with ECEF coordinates or they will be truncated. Better idea: build your light matrix in view space on the CPU (instead of world space), and then use it on the view-space vertex in the shader. (You'll have to update it every time the camera moves, of

Re: [osg-users] Latest OSG cannot realize viewer under Android

2016-10-20 Thread Jordi Torres
Hi Michael, I'm sorry I don't have the time now to dig into the problems you have. But I strongly recommend you base your work in http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/178-building-openscenegraph-for-android-3-4, I've tested it a number of times with

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Trajce Nikolov NICK
Hi Glenn, vec3 vVertex = vec3(gl_ModelViewMatrix * VertexMODEL); worldSpaceVertex = osg_ViewMatrixInverse * vec4( vVertex, 1.0 ); Part of VP On Thu, Oct 20, 2016 at 3:52 PM, Glenn Waldron wrote: > Nick, how did you calculate "worldSpaceVertex"? > > Glenn Waldron > > On

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Glenn Waldron
Nick, how did you calculate "worldSpaceVertex"? Glenn Waldron On Thu, Oct 20, 2016 at 9:13 AM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > hehe .. ok :-) .. Maybe you give me a hint. > > I have F+ lighting (written by a friend of mine) and I have extended it so > local lights

Re: [osg-users] Latest OSG cannot realize viewer under Android

2016-10-20 Thread michael kapelko
Since I can't find the starting point for Android with latest OSG, I'll try to dive back into year 2011 to the point where it first worked for Jorge Izquierdo Ciges who wrote the first Android docs:

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Trajce Nikolov NICK
hehe .. ok :-) .. Maybe you give me a hint. I have F+ lighting (written by a friend of mine) and I have extended it so local lights cast shadows (a bit of complex code - relatively actually, but for me it is ;-) ). Works well for flat terrains with reasonable sizes. I am trying to make it work

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Voerman, L.
yes? we use a variation on OpenSceneGraph\src\osgShadow\ParallelSplitShadowMap.cpp regards, Laurens. On Thu, Oct 20, 2016 at 2:35 PM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Hi Laurens, > > do you have experience with DEPTH32bit and shadowcomparation set to true - > for

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Trajce Nikolov NICK
Hi Laurens, do you have experience with DEPTH32bit and shadowcomparation set to true - for shadow mapping? On Thu, Oct 20, 2016 at 12:08 PM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Hi Voerman, > > Yes, GL_DEPTH_COMPONENT32 was what I was missing ... Thanks a lot! > >

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Trajce Nikolov NICK
Hi Voerman, Yes, GL_DEPTH_COMPONENT32 was what I was missing ... Thanks a lot! Trajce On Thu, Oct 20, 2016 at 9:25 AM, Voerman, L. wrote: > Hi Trajce, > maybe this sniplet helps? > _textureDepthBuffer = new osg::Texture2D; >

Re: [osg-users] Crash using current OSG master with collada dom 2.4.0

2016-10-20 Thread Torben Dannhauer
Hi, I solved the issue: as long as collada is compiled with support for Version 150 AND 141, it is not able toe decide properly and mixes things. Compiling collada only with DOM version 141 support makes things working. Thank you! Cheers, Torben -- Read this topic online

Re: [osg-users] 32bit DEPTH for RTT

2016-10-20 Thread Voerman, L.
Hi Trajce, maybe this sniplet helps? _textureDepthBuffer = new osg::Texture2D; _textureDepthBuffer->setTextureSize(_width+2.0f*_width*_guardBandPercentage, _height+2.0f*_height*_guardBandPercentage); _textureDepthBuffer->setSourceFormat(GL_DEPTH_COMPONENT);