Re: [osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-30 Thread Trajce Nikolov NICK
Actually it worked after rethinking it. Thanks Glenn

On Tue, Mar 30, 2021, 17:10 Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Thanks Glenn. How this will work with setting the render target
> implementation to the main view camera? I am trying to avoid multiple
> cameras and I am not sure this is doable
>
> On Tue, Mar 30, 2021, 15:07 Glenn Waldron  wrote:
>
>> Nick,
>> Pretty sure you can only attach one texture to a FRAME_BUFFER render
>> target. And in that case, it is just copying the framebuffer to your
>> texture after rendering it. Consider using a FRAME_BUFFER_OBJECT instead.
>>
>> On Monday, March 29, 2021 at 10:45:27 PM UTC-4 trajce.ni...@gmail.com
>> wrote:
>>
>>> Nonone on this? Robert?
>>>
>>> Thank you
>>> Nick
>>>
>>> On Sun, Mar 28, 2021 at 5:24 PM Trajce Nikolov NICK <
>>> trajce.ni...@gmail.com> wrote:
>>>
>>>> Attached is the minimal code that reproduce the problem
>>>>
>>>> Thanks a bunch as always!
>>>>
>>>> Nick
>>>>
>>>> On Sun, Mar 28, 2021 at 2:49 PM Trajce Nikolov NICK <
>>>> trajce.ni...@gmail.com> wrote:
>>>>
>>>>> Hi Community,
>>>>>
>>>>> I am attaching to the main camera DepthBuffer and ColorBuffer as
>>>>> Texture2D - attached is the setup. I also have shader to check the depth
>>>>> buffer - so it is ok as on the image. And I am displaying it on a quad. 
>>>>> The
>>>>> depth buffer is still getting me zeros when the colorbuffer is attached,
>>>>> otherwise when it is not, then it works as it should.
>>>>>
>>>>> Any hints?
>>>>>
>>>>> mOsgExternalDepth = new osg::Texture2D;
>>>>> mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
>>>>> mOsgExternalDepth->setSourceType(GL_FLOAT);
>>>>> mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
>>>>> mOsgExternalDepth->setTextureWidth(screenWidth);
>>>>> mOsgExternalDepth->setTextureHeight(screenHeight);
>>>>> mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\
>>>>>
>>>>> mOsgExternalColor = new osg::Texture2D;
>>>>> mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
>>>>> mOsgExternalColor->setSourceFormat(GL_RGBA);
>>>>> mOsgExternalColor->setSourceType(GL_FLOAT);
>>>>> mOsgExternalColor->setTextureWidth(screenWidth);
>>>>> mOsgExternalColor->setTextureHeight(screenHeight);
>>>>> mOsgExternalColor->setResizeNonPowerOfTwoHint(false);
>>>>>
>>>>> mainCamera->attach(osg::Camera::COLOR_BUFFER,
>>>>> (osg::Texture*)mOsgExternalColor);
>>>>> mainCamera->attach(osg::Camera::DEPTH_BUFFER,
>>>>> (osg::Texture*)mOsgExternalDepth);
>>>>>
>>>>> osg::ref_ptr camera = new osg::Camera;
>>>>> camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0,
>>>>> screenHeight));
>>>>> camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
>>>>> camera->setViewMatrix(osg::Matrixd::identity());
>>>>> camera->setClearMask(0);
>>>>> camera->setRenderOrder(osg::Camera::POST_RENDER);
>>>>> camera->setAllowEventFocus(false);
>>>>>
>>>>>
>>>>> context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);
>>>>>
>>>>> osg::ref_ptr quad =
>>>>> osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0),
>>>>> osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
>>>>> quad->getOrCreateStateSet()->setMode(GL_LIGHTING,
>>>>> osg::StateAttribute::OFF);
>>>>> quad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
>>>>> mOsgExternalDepth);
>>>>>
>>>>> const std::string vertShader = ""\
>>>>> "void main() "\
>>>>> "{ "\
>>>>> " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
>>>>> " gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
>>>>> "}";
>>>>>
>>>>> const std::string fragShader = ""\
>>>>> "uniform sampler2D texture0; "\
>&g

Re: [osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-30 Thread Trajce Nikolov NICK
Thanks Glenn. How this will work with setting the render target
implementation to the main view camera? I am trying to avoid multiple
cameras and I am not sure this is doable

On Tue, Mar 30, 2021, 15:07 Glenn Waldron  wrote:

> Nick,
> Pretty sure you can only attach one texture to a FRAME_BUFFER render
> target. And in that case, it is just copying the framebuffer to your
> texture after rendering it. Consider using a FRAME_BUFFER_OBJECT instead.
>
> On Monday, March 29, 2021 at 10:45:27 PM UTC-4 trajce.ni...@gmail.com
> wrote:
>
>> Nonone on this? Robert?
>>
>> Thank you
>> Nick
>>
>> On Sun, Mar 28, 2021 at 5:24 PM Trajce Nikolov NICK <
>> trajce.ni...@gmail.com> wrote:
>>
>>> Attached is the minimal code that reproduce the problem
>>>
>>> Thanks a bunch as always!
>>>
>>> Nick
>>>
>>> On Sun, Mar 28, 2021 at 2:49 PM Trajce Nikolov NICK <
>>> trajce.ni...@gmail.com> wrote:
>>>
>>>> Hi Community,
>>>>
>>>> I am attaching to the main camera DepthBuffer and ColorBuffer as
>>>> Texture2D - attached is the setup. I also have shader to check the depth
>>>> buffer - so it is ok as on the image. And I am displaying it on a quad. The
>>>> depth buffer is still getting me zeros when the colorbuffer is attached,
>>>> otherwise when it is not, then it works as it should.
>>>>
>>>> Any hints?
>>>>
>>>> mOsgExternalDepth = new osg::Texture2D;
>>>> mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
>>>> mOsgExternalDepth->setSourceType(GL_FLOAT);
>>>> mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
>>>> mOsgExternalDepth->setTextureWidth(screenWidth);
>>>> mOsgExternalDepth->setTextureHeight(screenHeight);
>>>> mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\
>>>>
>>>> mOsgExternalColor = new osg::Texture2D;
>>>> mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
>>>> mOsgExternalColor->setSourceFormat(GL_RGBA);
>>>> mOsgExternalColor->setSourceType(GL_FLOAT);
>>>> mOsgExternalColor->setTextureWidth(screenWidth);
>>>> mOsgExternalColor->setTextureHeight(screenHeight);
>>>> mOsgExternalColor->setResizeNonPowerOfTwoHint(false);
>>>>
>>>> mainCamera->attach(osg::Camera::COLOR_BUFFER,
>>>> (osg::Texture*)mOsgExternalColor);
>>>> mainCamera->attach(osg::Camera::DEPTH_BUFFER,
>>>> (osg::Texture*)mOsgExternalDepth);
>>>>
>>>> osg::ref_ptr camera = new osg::Camera;
>>>> camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0,
>>>> screenHeight));
>>>> camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
>>>> camera->setViewMatrix(osg::Matrixd::identity());
>>>> camera->setClearMask(0);
>>>> camera->setRenderOrder(osg::Camera::POST_RENDER);
>>>> camera->setAllowEventFocus(false);
>>>>
>>>>
>>>> context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);
>>>>
>>>> osg::ref_ptr quad =
>>>> osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0),
>>>> osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
>>>> quad->getOrCreateStateSet()->setMode(GL_LIGHTING,
>>>> osg::StateAttribute::OFF);
>>>> quad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
>>>> mOsgExternalDepth);
>>>>
>>>> const std::string vertShader = ""\
>>>> "void main() "\
>>>> "{ "\
>>>> " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
>>>> " gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
>>>> "}";
>>>>
>>>> const std::string fragShader = ""\
>>>> "uniform sampler2D texture0; "\
>>>> "void main() "\
>>>> "{ "\
>>>> " float d = texture2D( texture0, gl_TexCoord[0].xy ).x; "\
>>>> " gl_FragColor = vec4(d, d, d, 1); "\
>>>> "}";
>>>>
>>>> osg::ref_ptr vert = new osg::Shader(osg::Shader::VERTEX,
>>>> vertShader);
>>>> osg::ref_ptr frag = new osg::Shader(osg::Shader::FRAGMENT,
>>>> fragShader);
>>>>
>>>> osg::ref_ptr program 

Re: [osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-29 Thread Trajce Nikolov NICK
Nonone on this? Robert?

Thank you
Nick

On Sun, Mar 28, 2021 at 5:24 PM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Attached is the minimal code that reproduce the problem
>
> Thanks a bunch as always!
>
> Nick
>
> On Sun, Mar 28, 2021 at 2:49 PM Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi Community,
>>
>> I am attaching to the main camera DepthBuffer and ColorBuffer as
>> Texture2D - attached is the setup. I also have shader to check the depth
>> buffer - so it is ok as on the image. And I am displaying it on a quad. The
>> depth buffer is still getting me zeros when the colorbuffer is attached,
>> otherwise when it is not, then it works as it should.
>>
>> Any hints?
>>
>> mOsgExternalDepth = new osg::Texture2D;
>> mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
>> mOsgExternalDepth->setSourceType(GL_FLOAT);
>> mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
>> mOsgExternalDepth->setTextureWidth(screenWidth);
>> mOsgExternalDepth->setTextureHeight(screenHeight);
>> mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\
>>
>> mOsgExternalColor = new osg::Texture2D;
>> mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
>> mOsgExternalColor->setSourceFormat(GL_RGBA);
>> mOsgExternalColor->setSourceType(GL_FLOAT);
>> mOsgExternalColor->setTextureWidth(screenWidth);
>> mOsgExternalColor->setTextureHeight(screenHeight);
>> mOsgExternalColor->setResizeNonPowerOfTwoHint(false);
>>
>> mainCamera->attach(osg::Camera::COLOR_BUFFER,
>> (osg::Texture*)mOsgExternalColor);
>> mainCamera->attach(osg::Camera::DEPTH_BUFFER,
>> (osg::Texture*)mOsgExternalDepth);
>>
>> osg::ref_ptr camera = new osg::Camera;
>> camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0,
>> screenHeight));
>> camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
>> camera->setViewMatrix(osg::Matrixd::identity());
>> camera->setClearMask(0);
>> camera->setRenderOrder(osg::Camera::POST_RENDER);
>> camera->setAllowEventFocus(false);
>>
>>
>> context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);
>>
>> osg::ref_ptr quad =
>> osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0),
>> osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
>> quad->getOrCreateStateSet()->setMode(GL_LIGHTING,
>> osg::StateAttribute::OFF);
>> quad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
>> mOsgExternalDepth);
>>
>> const std::string vertShader = ""\
>> "void main() "\
>> "{ "\
>> " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
>> " gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
>> "}";
>>
>> const std::string fragShader = ""\
>> "uniform sampler2D texture0; "\
>> "void main() "\
>> "{ "\
>> " float d = texture2D( texture0, gl_TexCoord[0].xy ).x; "\
>> " gl_FragColor = vec4(d, d, d, 1); "\
>> "}";
>>
>> osg::ref_ptr vert = new osg::Shader(osg::Shader::VERTEX,
>> vertShader);
>> osg::ref_ptr frag = new osg::Shader(osg::Shader::FRAGMENT,
>> fragShader);
>>
>> osg::ref_ptr program = new osg::Program;
>> program->addShader(vert);
>> program->addShader(frag);
>>
>> quad->getOrCreateStateSet()->setAttributeAndModes(program);
>> quad->getOrCreateStateSet()->addUniform(new
>> osg::Uniform(osg::Uniform::SAMPLER_2D, "texture0", 0));
>> osg::ref_ptr quadColor =
>> osg::createTexturedQuadGeometry(osg::Vec3(screenWidth / 2, 0, 0),
>> osg::Vec3(screenWidth/2 , 0, 0), osg::Vec3(0, screenHeight/2, 0));
>> quadColor->getOrCreateStateSet()->setMode(GL_LIGHTING,
>> osg::StateAttribute::OFF);
>> quadColor->getOrCreateStateSet()->setTextureAttributeAndModes(0,
>> mOsgExternalColor);
>>
>> camera->addChild(quadColor);
>> camera->addChild(quad);
>>
>> --
>> trajce nikolov nick
>>
>
>
> --
> trajce nikolov nick
>


-- 
trajce nikolov nick

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAO-%2Bzim8AG_PaxkzoRdKDEvMMtvykWW6aFy0OE6K%3DNP47PHB9A%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-28 Thread Trajce Nikolov NICK
Attached is the minimal code that reproduce the problem

Thanks a bunch as always!

Nick

On Sun, Mar 28, 2021 at 2:49 PM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Community,
>
> I am attaching to the main camera DepthBuffer and ColorBuffer as Texture2D
> - attached is the setup. I also have shader to check the depth buffer - so
> it is ok as on the image. And I am displaying it on a quad. The depth
> buffer is still getting me zeros when the colorbuffer is attached,
> otherwise when it is not, then it works as it should.
>
> Any hints?
>
> mOsgExternalDepth = new osg::Texture2D;
> mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
> mOsgExternalDepth->setSourceType(GL_FLOAT);
> mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
> mOsgExternalDepth->setTextureWidth(screenWidth);
> mOsgExternalDepth->setTextureHeight(screenHeight);
> mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\
>
> mOsgExternalColor = new osg::Texture2D;
> mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
> mOsgExternalColor->setSourceFormat(GL_RGBA);
> mOsgExternalColor->setSourceType(GL_FLOAT);
> mOsgExternalColor->setTextureWidth(screenWidth);
> mOsgExternalColor->setTextureHeight(screenHeight);
> mOsgExternalColor->setResizeNonPowerOfTwoHint(false);
>
> mainCamera->attach(osg::Camera::COLOR_BUFFER,
> (osg::Texture*)mOsgExternalColor);
> mainCamera->attach(osg::Camera::DEPTH_BUFFER,
> (osg::Texture*)mOsgExternalDepth);
>
> osg::ref_ptr camera = new osg::Camera;
> camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0,
> screenHeight));
> camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
> camera->setViewMatrix(osg::Matrixd::identity());
> camera->setClearMask(0);
> camera->setRenderOrder(osg::Camera::POST_RENDER);
> camera->setAllowEventFocus(false);
>
>
> context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);
>
> osg::ref_ptr quad =
> osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0),
> osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
> quad->getOrCreateStateSet()->setMode(GL_LIGHTING,
> osg::StateAttribute::OFF);
> quad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
> mOsgExternalDepth);
>
> const std::string vertShader = ""\
> "void main() "\
> "{ "\
> " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
> " gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
> "}";
>
> const std::string fragShader = ""\
> "uniform sampler2D texture0; "\
> "void main() "\
> "{ "\
> " float d = texture2D( texture0, gl_TexCoord[0].xy ).x; "\
> " gl_FragColor = vec4(d, d, d, 1); "\
> "}";
>
> osg::ref_ptr vert = new osg::Shader(osg::Shader::VERTEX,
> vertShader);
> osg::ref_ptr frag = new osg::Shader(osg::Shader::FRAGMENT,
> fragShader);
>
> osg::ref_ptr program = new osg::Program;
> program->addShader(vert);
> program->addShader(frag);
>
> quad->getOrCreateStateSet()->setAttributeAndModes(program);
> quad->getOrCreateStateSet()->addUniform(new
> osg::Uniform(osg::Uniform::SAMPLER_2D, "texture0", 0));
> osg::ref_ptr quadColor =
> osg::createTexturedQuadGeometry(osg::Vec3(screenWidth / 2, 0, 0),
> osg::Vec3(screenWidth/2 , 0, 0), osg::Vec3(0, screenHeight/2, 0));
> quadColor->getOrCreateStateSet()->setMode(GL_LIGHTING,
> osg::StateAttribute::OFF);
> quadColor->getOrCreateStateSet()->setTextureAttributeAndModes(0,
> mOsgExternalColor);
>
> camera->addChild(quadColor);
> camera->addChild(quad);
>
> --
> trajce nikolov nick
>


-- 
trajce nikolov nick

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAO-%2BzimhqOZ0Yok6hMFWtXR3MsXeVFod7fUnHTc-vXFcg3dgtA%40mail.gmail.com.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield
 *
 * This application is open source and may be redistributed and/or modified
 * freely and without restriction, both in commercial and non commercial 
applications,
 * as long as this copyright notice is maintained.
 *
 * This application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

#include 
#include 
#include 

#include 

[osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-28 Thread Trajce Nikolov NICK
Hi Community,

I am attaching to the main camera DepthBuffer and ColorBuffer as Texture2D
- attached is the setup. I also have shader to check the depth buffer - so
it is ok as on the image. And I am displaying it on a quad. The depth
buffer is still getting me zeros when the colorbuffer is attached,
otherwise when it is not, then it works as it should.

Any hints?

mOsgExternalDepth = new osg::Texture2D;
mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
mOsgExternalDepth->setSourceType(GL_FLOAT);
mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
mOsgExternalDepth->setTextureWidth(screenWidth);
mOsgExternalDepth->setTextureHeight(screenHeight);
mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\

mOsgExternalColor = new osg::Texture2D;
mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
mOsgExternalColor->setSourceFormat(GL_RGBA);
mOsgExternalColor->setSourceType(GL_FLOAT);
mOsgExternalColor->setTextureWidth(screenWidth);
mOsgExternalColor->setTextureHeight(screenHeight);
mOsgExternalColor->setResizeNonPowerOfTwoHint(false);

mainCamera->attach(osg::Camera::COLOR_BUFFER,
(osg::Texture*)mOsgExternalColor);
mainCamera->attach(osg::Camera::DEPTH_BUFFER,
(osg::Texture*)mOsgExternalDepth);

osg::ref_ptr camera = new osg::Camera;
camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0,
screenHeight));
camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
camera->setViewMatrix(osg::Matrixd::identity());
camera->setClearMask(0);
camera->setRenderOrder(osg::Camera::POST_RENDER);
camera->setAllowEventFocus(false);

context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);

osg::ref_ptr quad =
osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0),
osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
quad->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
quad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
mOsgExternalDepth);

const std::string vertShader = ""\
"void main() "\
"{ "\
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
" gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
"}";

const std::string fragShader = ""\
"uniform sampler2D texture0; "\
"void main() "\
"{ "\
" float d = texture2D( texture0, gl_TexCoord[0].xy ).x; "\
" gl_FragColor = vec4(d, d, d, 1); "\
"}";

osg::ref_ptr vert = new osg::Shader(osg::Shader::VERTEX,
vertShader);
osg::ref_ptr frag = new osg::Shader(osg::Shader::FRAGMENT,
fragShader);

osg::ref_ptr program = new osg::Program;
program->addShader(vert);
program->addShader(frag);

quad->getOrCreateStateSet()->setAttributeAndModes(program);
quad->getOrCreateStateSet()->addUniform(new
osg::Uniform(osg::Uniform::SAMPLER_2D, "texture0", 0));
osg::ref_ptr quadColor =
osg::createTexturedQuadGeometry(osg::Vec3(screenWidth / 2, 0, 0),
osg::Vec3(screenWidth/2 , 0, 0), osg::Vec3(0, screenHeight/2, 0));
quadColor->getOrCreateStateSet()->setMode(GL_LIGHTING,
osg::StateAttribute::OFF);
quadColor->getOrCreateStateSet()->setTextureAttributeAndModes(0,
mOsgExternalColor);

camera->addChild(quadColor);
camera->addChild(quad);

-- 
trajce nikolov nick

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAO-%2BzinLTwJppWDbAVy1r9ovjOgZgX0gj0ufrdqBMr%3DRwQqPpw%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D model preparation question

2021-03-26 Thread Trajce Nikolov NICK
Hi Jeff,

I know this problem as well. Obviously each .obj file has .mtl file with
it. It is a text file where materials and textures are defined. You can
edit with values you find appropriate . As well check the texture paths

On Thu, Mar 25, 2021 at 8:46 PM Jeff White  wrote:

> A few of my 3D model files (which are in .obj format) look different when
> loaded into Blender compared to viewing them in osgviewer.  I can see all
> the colors clearly in Blender but in osgviewer the model appears dark.  I
> have attached a few pictures here.  I commonly see this with older model
> files that have materials specified but no associated textures.
>
> I am a developer and not a 3D modeler so I don't have enough Blender
> experience to know why it looks different in that software.  Is there
> something else I need to do to prepare these models for use in OSG?  I know
> that Blender places a light in the scene but I thought that osgviewer had a
> small light pointing out of the camera as well.
>
> Any help would be appreciated.  Thanks,
>
> Jeff
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/96f91a17-9cdd-4f03-9d98-7e2defcbcf55n%40googlegroups.com
> <https://groups.google.com/d/msgid/osg-users/96f91a17-9cdd-4f03-9d98-7e2defcbcf55n%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
trajce nikolov nick

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAO-%2BzinaeCFHF%3D2rc_NwZ0fYL9HZTvvYPUMJ4VHkXHMXkJg4_g%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to properly transfer texture coordinates in geometric shaders in Shader #130 version?

2020-12-13 Thread Trajce Nikolov NICK
Hi,

have a look here MuseOpenIG/Plugin-GPUVegetation at master ·
CCSI-CSSI/MuseOpenIG · GitHub
<https://github.com/CCSI-CSSI/MuseOpenIG/tree/master/Plugin-GPUVegetation> ...
This is code for generating forests with geometry shaders. It might give
you better clue

On Sun, Dec 13, 2020 at 7:08 AM mirr...@gmail.com 
wrote:

> sorry, the screenshot is wrong. It should be  samplerU.
> I'm basically not sure how to get texture coordinates into
> Shader::FRAGMENT  in Geometric shaders.
>
>
> 在2020年12月10日星期四 UTC+8 下午11:13:21 写道:
>
>> What error are you getting?
>> I do see an undefined "samplerY" in there.
>>
>> On Wednesday, December 9, 2020 at 9:03:47 PM UTC-5 mirr...@gmail.com
>> wrote:
>>
>>> env is win10 osg3.6.4 GTX1660
>>> [image: QQ图片20201210095944.jpg]
>>>
>>> osg::ref_ptr createProgram()
>>> {
>>> osg::Program *program = new osg::Program();
>>> program->addShader(new osg::Shader(osg::Shader::VERTEX,vertSource));
>>> program->addShader(new
>>> osg::Shader(osg::Shader::GEOMETRY,geomSource));
>>> program->addShader(new
>>> osg::Shader(osg::Shader::FRAGMENT,fragSource));
>>> program->setParameter(GL_GEOMETRY_VERTICES_OUT_EXT, 3);
>>> program->setParameter(GL_GEOMETRY_INPUT_TYPE_EXT, GL_TRIANGLES);
>>> program->setParameter(GL_GEOMETRY_OUTPUT_TYPE_EXT,  GL_TRIANGLES  );
>>> return program;
>>> }
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/89abc9a3-66bf-4248-8e3d-3dfd23235622n%40googlegroups.com
> <https://groups.google.com/d/msgid/osg-users/89abc9a3-66bf-4248-8e3d-3dfd23235622n%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
trajce nikolov nick

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAO-%2BzinF1fFZnS3QkT9VTgScKQ4XVF1oVB_L9vQRZT-reQvAEA%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Imported .obj file not showing textures.

2020-01-15 Thread Trajce Nikolov NICK
Hi,

the .mtl file is text file where the materials are defined. You can change
the ambient, diffuse there with text editor

On Wed, Jan 15, 2020 at 10:15 AM Voerman, L.  wrote:

> Hi Jiljith,
> I see no problem in your code, and it works when I add it to my osgviewer.
> with OSG_NOTIFY_LEVEL=NOTICE it generates 2 messages:
> Obj Found map in options, [DIFFUSE]=0
> Scaling image 'D:\laurens\Download\objDog/Dog_diffuse.jpg' from (450,450)
> to (512,512)
>
> I suggest you can convert your file with "osgconv -O DIFFUSE=0
> 12228_Dog_v1_L2.obj 12228_Dog_v1_L2.obj.osgt"
> so you can read it in your program with "osgDB::readRefNodeFile(path.
> toStdString() + ".osgt", opt);"
> maybe your scene has no light, or other reasons why the dog shows up black.
> Laurens.
>
>
> On Wed, Jan 15, 2020 at 8:10 AM JILJITH JOHN 
> wrote:
>
>> Hi Laurens,
>>
>> The answer is so great. I am getting the texture applied. But it is in
>> the osgviewer.exe only.
>> Problematically I tried to add the option. Its not working.
>>
>> osgDB::Options* opt = new osgDB::Options;
>>
>>
>> opt->setOptionString("DIFFUSE=0");
>>
>>
>> osg::ref_ptr model1= osgDB::readNodeFile(path.toStdString(), opt);
>>
>>
>>
>>
>> On Tuesday, January 14, 2020 at 6:39:07 PM UTC+5:30, L. Voerman wrote:
>>>
>>> repost in google group; It seems like my reply to the mailing list does
>>> not show up in google groups.
>>>
>>>
>>> Hi Jiljith,
>>>
>>> The material has both an ambient and a diffuse texture (both refer to
>>> the same file)
>>> while this can be made to work with a shader, using the fixed function
>>> pipeline means you'll have to choose one:
>>>
>>> osgviewer -O DIFFUSE=0 12228_Dog_v1_L2.obj
>>> Laurens.
>>>
>>> On Tuesday, January 14, 2020 at 10:52:54 AM UTC+1, JILJITH JOHN wrote:
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I am developing a tool for editing 3D models using openscenegraph. When
>>>> I tried to load an .obj file, the texture is not applied. I am getting only
>>>> black shade.
>>>> The model is imported using the below code.
>>>>
>>>>
>>>>  osg::ref_ptr model1= osgDB::readNodeFile(path.toStdString
>>>> ());
>>>>  model1->setDataVariance(osg::Object::DYNAMIC);
>>>>
>>>>
>>>>
>>>> --
>> You received this message because you are subscribed to the Google Groups
>> "OpenSceneGraph Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to osg-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/osg-users/424783f2-415d-4351-8bf7-83bc25d30936%40googlegroups.com
>> <https://groups.google.com/d/msgid/osg-users/424783f2-415d-4351-8bf7-83bc25d30936%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> ___
>> 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
>


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


Re: [osg-users] Render normal vectors to image

2019-11-11 Thread Trajce Nikolov NICK
Hi,

you can use the normals pseudoloader. just append .normals to your osgb
file on reading - mymodel.osgb.normals

On Mon, Nov 11, 2019 at 10:20 AM Han Hu  wrote:

> Hi,
>
> I would like to do offscreen rendering of a mesh.
> Currently, I have suceeded to do this for both the color (RGB) and depth
> data using the built-in functions as below.
>
>
> Code:
>
>
> osg::ref_ptr rttImage = new osg::Image;
> osg::ref_ptr depthImage = new osg::Image;
>
> camera->attach(osg::Camera::COLOR_BUFFER, rttImage.get());
> camera->attach(osg::Camera::DEPTH_BUFFER, depthImage.get());
>
> rttImage->allocateImage(ATInfo.width, ATInfo.height, 1, GL_RGB,
> GL_UNSIGNED_BYTE);
> depthImage->allocateImage(ATInfo.width, ATInfo.height, 1,
> GL_DEPTH_COMPONENT, GL_FLOAT);
>
>
>
>
> But I also need to render the normal vectors to images too. I have googled
> this topic using native opengl, it seems that I have to write shaders for
> it. But my mesh are defined using the osgb plugin format, so I must
> implement in the osg.
>
> I would like to know, is there an approach to do this in osg? Thanks!
>
> Thank you!
>
> Cheers,
> Han
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76892#76892
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] DirectionalArrow

2019-11-07 Thread Trajce Nikolov NICK
Hi Asif,

probably you will need screen aligned camera. Have a look at osghud
example. When your cylinder is part of the screen camera, it doesnt scale
or translate unless you do it. Probably you want to make something like
compass

On Thu, Nov 7, 2019 at 9:09 AM Asif Bahrainwala 
wrote:

> Hi,
>
> Just attached a tripped down version of my code
> Notice that I am using cylinders to function as directional arrow
> Here the cylinders go through the same transformation as al the other nodes
> I would like the cylinders to rotate but NOT translate and NOT scale
>
> Thank you!
>
> Cheers,
> Asif
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76869#76869
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/main_984.cpp
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


[osg-users] OpenGL 4.4 and ARB_buffer_storage

2019-11-05 Thread Trajce Nikolov NICK
Hi Community,

I am trying to implement 4.4 Persistent Mapping Streaming, within the
context  of OSG. Bellow is from the spec. I am struggling at the moment
with making the buffer object sections, with the current OSG implementation
and not sure if it is possible so I am asking here for hints if any of you
have done something similar. Thanks a bunch as always!

Persistent mapped streaming

Given the availability of OpenGL 4.4 or ARB_buffer_storage
<http://www.opengl.org/registry/specs/ARB/buffer_storage.txt>, the use of
persistent mapping of buffers becomes a possibility.

The idea here is to allocate an immutable buffer 2-3x the size you need,
and while you're executing operations from one region of the buffer while
you are writing to a different region. The difference between the prior
mapping scheme is that you are not frequently mapping and unmapping the
buffer. You map it persistently when you create the buffer, and keep it
mapped until it's time to delete the buffer.

This requires using glBufferStorage
<https://www.khronos.org/opengl/wiki/GLAPI/glBufferStorage> with the
GL_MAP_WRITE and GL_PERSISTENT_BITs. It also requires using glMapBufferRange
<https://www.khronos.org/opengl/wiki/GLAPI/glMapBufferRange> with those
same bits when mapping it.

The general algorithm is as follows. The buffer is logically divided into 3
sections: the section you're writing to, and two sections that could
currently be in use.

The first step is to write to section 1 of the buffer. Once you have
finished writing, you must make this range of data visible to OpenGL by
flushing it (if you aren't mapping coherently). Then, you do whatever you
need to in order to ensure that this data is visible to OpenGL
<https://www.khronos.org/opengl/wiki/Buffer_Object_Streaming#Persistent_visibility>.
Once the data is visible, you issue some number of Rendering Commands
<https://www.khronos.org/opengl/wiki/Rendering_Command> that read from that
section of the buffer. After issuing all of the commands that read from the
buffer, you create a fence sync object
<https://www.khronos.org/opengl/wiki/Sync_Object>.

Next frame, you start writing to buffer section 2. You do all of the above,
and create a new fence sync object. Keep each buffer section's sync objects
separate.

You do the same with buffer section 3 on the next frame.

On the fourth frame, you want to start using section 1 again. However, you
need to check section 1's sync object to see if it has completed *before* you
can start. You can only start writing to a section if that section's sync
object has completed.

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


[osg-users] potential bug in osgUtil::RenderStage wrt. setting user defined FBO

2019-10-25 Thread Trajce Nikolov NICK
Hi Robert,

I have a case where I want to provide my own implementation of the FBO for
the RenderStage

via
 /** Set a framebuffer object to render into. It is permissible for the
  * framebuffer object to be multisampled, in which case you should
also
  * set a resolve framebuffer object - see
setMultisampleResolveFramebufferObject(). */
void setFrameBufferObject(osg::FrameBufferObject* fbo) { _fbo =
fbo; }

However, my provided fbo gets overwritten in void
RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)

by a local fbo = new FrameBufferObject (ln: 357), so I am wondering how
this is intended to work with user defined FBO.

Can you share a word or two about this?

Thanks a lot!

Cheers,
Nick

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


[osg-users] FBO handle from the Camera renderImplementation

2019-10-18 Thread Trajce Nikolov NICK
Hi Community,

when I set a Camera's renderTargetImplementation to be FBO, how to get the
FBO handle afterwards, any clue?

Thanks a bunch as always!

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


Re: [osg-users] what should I dirty when I change ColorArray on the fly?

2019-10-14 Thread Trajce Nikolov NICK
Hi Claudio,

it depends how your Geometry is setup. You might need to call
osg::Geometry->dirtyDisplayList() or if you use VertexBufferObjects you
might need to call colorArrays->getBufferObject()->dirty()

On Mon, Oct 14, 2019 at 11:16 PM Claudio Benghi 
wrote:

> Hello All,
>
> I have implemented a colour change visitor along the lines of the class
> found at:
> http://www.vis-sim.com/osg/code/osgcode_color1.htm
>
> While debugging I note that the following code is executed, including the
> colorArrays->dirty(), but the colour in the render is not affected.
>
> Could it depend from the way in which the colorArray is initialliy
> instantiated?
> Should I mark some state as Dynamic?
>
>
> Code:
>
> void XbimNodeColorVisitor::apply(osg::Geometry )
> {
>   osg::Vec4Array *colorArrays = dynamic_cast *>(curGeom.getColorArray());
>   if (colorArrays) {
> for (unsigned int i = 0; i < colorArrays->size(); i++) {
>   osg::Vec4 *color = >operator [](i);
>   color->set(m_color._v[0], m_color._v[1], m_color._v[2],
> m_color._v[3]);
> }
> colorArrays->dirty();
>   }
>   else {
> // code never enters this path
>   }
> }
>
>
>
>
>
> Thank you!
>
> Cheers,
> Claudio
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76829#76829
>
>
>
>
>
> ___________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] Orient a node to face another

2019-10-02 Thread Trajce Nikolov NICK
Hi Paul,

you subtract the two input vectors and by this you get the direction from
one to the other, then normalize and make the Quaternion to rotate the axis
(in the code bellow is Y-forward) to the normalized vector. Something like
this:

osg::Quat GetRotation(const osg::Vec3& tgtPos, const osg::Vec3& subjectPos)
{

osg::Vec3 v = tgtPos - subjectPos;
v.normalize();

osg::Quat ret;
ret.makeRotate(osg::Vec3(0, 1, 0), v);

return Quat;
}

Nick

On Wed, Oct 2, 2019 at 6:04 PM Paul Leopard  wrote:

> Hi,
>
> What would be the best approach to solve the following problem where I
> need one node to be updated through a callback to face another node? I
> understand how to get a node to face the screen with a billboard but that's
> not the problem here...
>
> Here is the problem:
>
> I've got a satellite node that is a child of a PAT and currently, I am
> updating that PAT position only to orbit the satellite around a planet
> node. I want to update the satellite PAT rotation also so that the
> satellite Z-Axis always faces the planet node origin. So, I need to compute
> the proper rotation Quat …
>
>
> Code:
>
> Quat GetRotation( const Vec3& tgtPos, const Vec3& subjectPos )
> {
> Quat ret = what?;
> return Quat;
> }
>
> Vec3 targetPosition(...);
> Vec3 satellitePosition(...);
> Quat rotation = GetRotation( satellitePosition, targetPosition );
>
> satellitePAT->setPosition( satellitePosition );
> satellitePAT->setRotation( rotation );
>
>
>
>
> What would be the best approach for the calculations in GetRotation(...)
> using OSG functions? I can work out the math on my own but I'd like to know
> if there are any cool OSG utilities to do this.
>
> Thank you!
>
> Cheers,
> Paul
>
> 
> things are more like they are now than they have ever been before
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76770#76770
>
>
>
>
>
> ___________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


[osg-users] Integrate Qt into OSG - not OSG into Qt osgQt

2019-10-02 Thread Trajce Nikolov NICK
Hi community,

I am struggling with the design of such a task. And I am a bit familiar
with Qt and other UI frameworks. The task is to embed the whole Qt
framework into OSG - including the event processing and let OSG render (
through RTT ) the widgets content.

Any clue, hints what direction I should take?

Thanks a bunch as always!
Nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-24 Thread Trajce Nikolov NICK
Cool!

I just revisited the part of the code to set the texture parameters and
here is how it should be set more efficiently and more proper if the model
have assigned texture attribute on any level in the scenegraph

https://pastebin.com/P9z98FYS

On Wed, Sep 25, 2019 at 3:14 AM Dae Woo Ryu  wrote:

> Hi, Nick
>
> Thanks to you, I got a lot of knowledge.
>
> This time the Texture is moving as I want.
>
> Thank you so much.
>
> Have a good Time
>
>
> Trajce Nikolov NICK wrote:
> > Here you go
> >
> >
> > https://pastebin.com/2uuUC2zL (https://pastebin.com/2uuUC2zL)
> >
> >
> > Let me know if the url works for you. Otherwise I will post it here
> >
> >
> >
> > On Mon, Sep 23, 2019 at 8:57 AM Dae Woo Ryu < ()> wrote:
> >
> >
> > > Hi, Nick
> > >
> > > The reason I did _geom-> setUseVertexBufferObjects (true) was because
> the return value of _coord->getBufferObject() was NULL.
> > > So I added _geom-> setUseVertexBufferObjects (true) .
> > >
> > > Here is the cloud model I am testing(.flt).
> > > Can you move the cloud texture on the surface in uv direction?
> > >
> > >
> > >
> > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > >
> > > > I don't think you should call
> _geom->setUseVertexBufferObjects(true); here. I bet the flt plugin is
> setting this on creation time. If you have a use case code you can share
> and the model it will help more for me to see what is going on
> > > >
> > > >
> > >
> > >
> > > --
> > > Read this topic online here:
> > > http://forum.openscenegraph.org/viewtopic.php?p=76729#76729 (
> http://forum.openscenegraph.org/viewtopic.php?p=76729#76729)
> > >
> > >
> > >
> > > ___
> > > osg-users mailing list
> > >  ()
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> )
> > >
> >
> >
> > --
> > trajce nikolov nick
> >
> >  --
> > Post generated by Mail2Forum
>  |-)
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76742#76742
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-23 Thread Trajce Nikolov NICK
Here you go

https://pastebin.com/2uuUC2zL

Let me know if the url works for you. Otherwise I will post it here

On Mon, Sep 23, 2019 at 8:57 AM Dae Woo Ryu  wrote:

> Hi, Nick
>
> The reason I did _geom-> setUseVertexBufferObjects (true) was because the
> return value of _coord->getBufferObject() was NULL.
> So I added _geom-> setUseVertexBufferObjects (true) .
>
> Here is the cloud model I am testing(.flt).
> Can you move the cloud texture on the surface in uv direction?
>
>
>
> >
> >
> > Hi,
> >
> >
> > I don't think you should call  _geom->setUseVertexBufferObjects(true);
> here. I bet the flt plugin is setting this on creation time. If you have a
> use case code you can share and the model it will help more for me to see
> what is going on
> >
>
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76729#76729
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-20 Thread Trajce Nikolov NICK
Hi,

I don't think you should call  _geom->setUseVertexBufferObjects(true);
here. I bet the flt plugin is setting this on creation time. If you have a
use case code you can share and the model it will help more for me to see
what is going on

On Fri, Sep 20, 2019 at 10:19 AM Dae Woo Ryu  wrote:

> hi NICK.
> Thank you for your reply.
>
> I did what you tried and nothing changed.
> Can you tell me another way?
>
> Here is the code I did.
>
> Code:
>
> virtual void operator()(osg::Node*, osg::NodeVisitor* nv)
> {
> if (nv->getFrameStamp())
> {
> if (_coord)
> {
> for (unsigned int u = 0; u < _coord->size(); u++)
> {
> _coord->at(u).x() += 0.6f;
> _coord->at(u).y() += 0.6f;
> _coord->dirty();
> }
> _geom->setUseVertexBufferObjects(true);
>         _coord->getBufferObject()->dirty();
> }
> }
> }
>
>
>
>
>
>
> Trajce Nikolov NICK wrote:
> >
> > You may need to call _coord->getBufferObject()->dirty() and do it
> outside of the for loop
> >
> > On Wed, Sep 18, 2019, 02:34 Dae Woo Ryu < ()> wrote:
> >
> >
> > > hi Laurens.
> > > Thank you for the your reply.
> > >
> > > I've tried adding dirty() and it still doesn't work.
> > >
> > > Code:
> > >
> > > virtual void operator()(osg::Node*, osg::NodeVisitor* nv)
> > > {
> > > if (nv->getFrameStamp())
> > > {
> > > _coord =
> dynamic_cast(_geom->getTexCoordArray(0));
> > >
> > > if (_coord)
> > > {
> > > for (unsigned int u = 0; u < _coord->size();
> u++)
> > > {
> > > _coord->at(u).x() += 0.01f;
> > > _coord->at(u).y() += 0.01f;
> > > _coord->dirty();
> > > _geom->dirtyDisplayList();
> > > }
> > > }
> > > }
> > > }
> > >
> > >
> > >
> > > What should I do more?
> > >
> > >
> > > Voerman, L. wrote:
> > >
> > > > Hi Dae,add _coord->dirty()
> > > > after modification.
> > > > Laurens.
> > > >
> > > >
> > > >
> > > >
> > > > On Tue, Sep 17, 2019 at 3:16 AM Dae Woo Ryu < ()> wrote:
> > > >
> > > >
> > > >
> > > > > Hi,
> > > > >
> > > > > As shown in the code below,
> > > > > I get the geometry information from the model of Openflight(.flt)
> format and move the coordinates of the vertices.
> > > > > But the texture doesn't move.
> > > > > How can I move a texture?
> > > > >
> > > > > **main**
> > > > >
> > > > >
> > > > > Code:
> > > > >
> > > > > ...
> > > > > osg::ref_ptr model =
> osgDB::readNodeFile("test/env_cloud.flt");
> > > > >
> > > > > coneUpdateVisitor coneV;
> > > > > model->accept(coneV);
> > > > >
> > > > > scene->addChild(model);
> > > > > ...
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > **visitor**
> > > > >
> > > > > Code:
> > > > >
> > > > >
> > > > > class coneUpdateVisitor : public osg::NodeVisitor
> > > > > {
> > > > > ...
> > > > >
> > > > > void apply(osg::Geode& geode)
> > > > > {
> > > > > for (unsigned int i = 0; i > > > > {
> > > > > scene->setUpdateCallback(new
> coneUpdateCallback(geode.getDrawable(i)->asGeometry()));
> > > > > }
> > > > > }
> > > > > }
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > **callback**
> > > > >
> > > > >
> > > > >

Re: [osg-users] How do I move a Texture in an model of Openflight format (.flt) in the UV direction?

2019-09-17 Thread Trajce Nikolov NICK
You may need to call _coord->getBufferObject()->dirty() and do it outside
of the for loop

On Wed, Sep 18, 2019, 02:34 Dae Woo Ryu  wrote:

> hi Laurens.
> Thank you for the your reply.
>
> I've tried adding dirty() and it still doesn't work.
>
> Code:
>
> virtual void operator()(osg::Node*, osg::NodeVisitor* nv)
> {
> if (nv->getFrameStamp())
> {
> _coord =
> dynamic_cast(_geom->getTexCoordArray(0));
>
> if (_coord)
> {
> for (unsigned int u = 0; u < _coord->size(); u++)
> {
> _coord->at(u).x() += 0.01f;
> _coord->at(u).y() += 0.01f;
> _coord->dirty();
> _geom->dirtyDisplayList();
> }
> }
> }
> }
>
>
>
> What should I do more?
>
>
> Voerman, L. wrote:
> > Hi Dae,add _coord->dirty()
> > after modification.
> > Laurens.
> >
> >
> >
> >
> > On Tue, Sep 17, 2019 at 3:16 AM Dae Woo Ryu < ()> wrote:
> >
> >
> > > Hi,
> > >
> > > As shown in the code below,
> > > I get the geometry information from the model of Openflight(.flt)
> format and move the coordinates of the vertices.
> > > But the texture doesn't move.
> > > How can I move a texture?
> > >
> > > **main**
> > >
> > >
> > > Code:
> > >
> > > ...
> > > osg::ref_ptr model =
> osgDB::readNodeFile("test/env_cloud.flt");
> > >
> > > coneUpdateVisitor coneV;
> > > model->accept(coneV);
> > >
> > > scene->addChild(model);
> > > ...
> > >
> > >
> > >
> > >
> > > **visitor**
> > >
> > > Code:
> > >
> > >
> > > class coneUpdateVisitor : public osg::NodeVisitor
> > > {
> > > ...
> > >
> > > void apply(osg::Geode& geode)
> > > {
> > > for (unsigned int i = 0; i > > {
> > > scene->setUpdateCallback(new
> coneUpdateCallback(geode.getDrawable(i)->asGeometry()));
> > > }
> > > }
> > > }
> > >
> > >
> > >
> > >
> > > **callback**
> > >
> > >
> > > Code:
> > >
> > > class coneUpdateCallback : public osg::NodeCallback
> > > {
> > > ...
> > > _geom->setUseDisplayList(false);
> > > ...
> > >
> > > virtual void operator()(osg::Node*, osg::NodeVisitor* nv)
> > > {
> > > if (nv->getFrameStamp())
> > > {
> > > _coord =
> dynamic_cast(_geom->getTexCoordArray(0));
> > >
> > > for (unsigned int u = 0; u < _coord->size(); u++)
> > > {
> > > _coord->at(u).x() += 0.01f;
> > > }
> > >
> > > }
> > > }
> > > }
> > >
> > >
> > >
> > >
> > >
> > >
> > > Thank you!
> > >
> > > Cheers,
> > > Dae
> > >
> > > --
> > > Read this topic online here:
> > > http://forum.openscenegraph.org/viewtopic.php?p=76684#76684 (
> http://forum.openscenegraph.org/viewtopic.php?p=76684#76684)
> > >
> > >
> > >
> > >
> > >
> > > ___
> > > osg-users mailing list
> > >  ()
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> )
> > >
> >
> >
> >  --
> > Post generated by Mail2Forum
>
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76688#76688
>
>
>
>
>
> ___
> 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] [build] Building OSG 3.6.4 in Win64 TDM GNU.

2019-09-11 Thread Trajce Nikolov NICK
I will

On Wed, Sep 11, 2019 at 9:23 AM Zachary1234  wrote:

> Dear Nick,
>
> can you reply to my email address with a contact email address for
> yourself?
>
> The private messaging on this forum doesn't seem to be working or coming
> up for me.  Can you email me at the following:
>
> powerus...@live.com.au
>
> So that I can talk to you.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76671#76671
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] [build] Building OSG 3.6.4 in Win64 TDM GNU.

2019-09-09 Thread Trajce Nikolov NICK
Hi Zachary,

I read a bit about TDM. I have some experience with building osg with MinGW
and I have some free time to allocate and try to help you. Write me
privately, and if my rate and conditions are ok with you, I can start this
week.

Cheers,
Nick

On Mon, Sep 9, 2019 at 12:13 PM Damian Dixon  wrote:

> Until you mentioned the TDM compiler suite I had not heard of it.
>
>
>
> A lot of developers/companies will only engage on something like this on a
> Time and Materials basis with clear goals.
>
>
>
> The costs for engaging a bespoke port of OSG and all dependencies will not
> be cheap. Day rates will probably be on the order of £350 to £800 depending
> on if you are able to engage a developer directly or a small software
> house.
>
>
>
> I would suggest that you need to define clearly the following:
>
>- What Plugins you need for OSG
>- What Windows OS variants you need this to work on
>- If you need debug/release libraries
>- If you need 64bit and/or 32bit support
>- What GPU(s) you are targeting
>- Fixed pipeline OpenGL or modern OpenGL or both
>- Do you need osgQt
>- How you intend to perform acceptance test.
>
>
>
> I would also suggest answering some of the questions already raised such
> as the one from Robert ‘Could you explain what your project goals and
> constraints are’.
>
>
>
> I would also suggest asking yourself the question; would it be cheaper to
> port your application to Visual Studio?
>
>
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *Zachary1234 
> *Sent: *09 September 2019 10:43
> *To: *osg-users@lists.openscenegraph.org
> *Subject: *Re: [osg-users] [build] Building OSG 3.6.4 in Win64 TDM GNU.
>
>
>
> Back to the main thread,
>
>
>
> Dear kornerr,
>
>
>
> is there somewhere else other than AlphaPixel that could
>
> help with a TDM/GNU Win64 build, given that AlphaPixel
>
> can't help me?
>
>
>
> --
>
> Read this topic online here:
>
> http://forum.openscenegraph.org/viewtopic.php?p=76649#76649
>
>
>
>
>
>
>
>
>
>
>
> ___
>
> 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
>


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


Re: [osg-users] osgUI and osgWidgets

2019-08-13 Thread Trajce Nikolov NICK
Here you have some good resources with code

https://github.com/xarray/osgRecipes

On Tue, Aug 13, 2019 at 3:38 PM Noè Murr  wrote:

> Hi,
>
> I need to integrate a user interface inside my OSG program.
>
> I want to use the osgUI library but I cannot find a good tutorial or guide
> about that?
> Can someone recommend me a good starting point?
>
> Thank you!
>
> Cheers,
> Noè
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76579#76579
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] Fixed pipeline lighting to shaders

2019-08-10 Thread Trajce Nikolov NICK
Hi Catalin,

Lighting is very interesting topic in OpenGL (and OSG). Have a look at this
opensource project for inspiration about lighting with shaders (
http://openig.compro.net/ ). It is hosted on github where you can find the
sources including the shaders. https://github.com/CCSI-CSSI/MuseOpenIG ..
It has implementation of Forward+ where you can have hunderds of lights in
realtime. Here some video https://www.youtube.com/watch?v=l1EXIYBVH5g ..
This project is stopped but it is still interesting and I know few
companies is using it for simulation

On Sat, Aug 10, 2019 at 7:49 AM Catalin  wrote:

> Hi,
>
> Does OSG has some shaders that replicates the fixed pipeline of OpenGL
> (1.x) with the 8 lights?
>
> Thank you,
> Catalin
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] Geode and Drawable Classes

2019-07-29 Thread Trajce Nikolov NICK
Hi,

osg::Geometry was modified to inherit from osg::Node at later date after
the book was published. You are free to use it without osg::Geode if you
don't need backwards compatibility

On Mon, Jul 29, 2019, 14:38 Catalin Flower  wrote:

> Hi,
>
> In the book that I have it says to use the Geode class to add your
> geometries, but the osg::Geometry class is extended from osg::Node and it
> can be added directly on the scene graph and it works.
>
> Is there any reason to use osg::Geode?
>
> Thank you!
>
> Cheers,
> Catalin
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76530#76530
>
>
>
>
>
> ___
> 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] silhouette bitmap into vector

2019-07-05 Thread Trajce Nikolov NICK
Thanks Chris!!! Lots of info :)

Nick

On Fri, Jul 5, 2019 at 7:02 PM Chris Hanson  wrote:

>
> And here's a completely unrelated (CPU driven, and very slow & intensive)
> research paper on the state of the art of vectorization that I came across
> while looking into this. Not useful in this case, but still very
> informative if anyone is interested in vectorization algorithms:
> https://open.library.ubc.ca/cIRcle/collections/ubctheses/24/items/1.0376350
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] silhouette bitmap into vector

2019-07-05 Thread Trajce Nikolov NICK
Thanks Chris!

any links? I am interested

On Fri, Jul 5, 2019 at 2:43 PM Chris Hanson  wrote:

> Sorry, Nick, I missed this query of yours!
>
> I could have given you some suggestions. If your OpenCV solution ever is
> inadequate, you could probably make something really fast in GPU using
> transform feedback. Could even do simplification in-GPU too.
>
> On Fri, Jul 5, 2019 at 2:11 PM Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi Community,
>>
>> just if someone else will need this:
>>
>> I was able to work it with OpenCV. But if you really want to exercise it
>> here is a nice link with different algorithms explained in big detail:
>> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4813928/
>>
>> Cheers,
>> Nick
>>
>> On Tue, Jul 2, 2019 at 1:03 PM Trajce Nikolov NICK <
>> trajce.nikolov.n...@gmail.com> wrote:
>>
>>> Hi Community,
>>>
>>> This is a bit more CG question rather then OSG related, but I think
>>> there are lots of CG folks in this community so I dare to ask
>>>
>>> I am after processing of a rendering outline of a scene (which is a
>>> bitmap as a result of RTT in OSG) and then having this outline as an array
>>> of 2D coordinates. And preferable close to real time. Anyone with some
>>> suggestions?
>>>
>>> Thanks a bunch as always! Meanwhile I am googling this one
>>>
>>> Cheers,
>>> Nick
>>>
>>> --
>>> trajce nikolov nick
>>>
>>
>>
>> --
>> trajce nikolov nick
>> ___
>> 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 <https://twitter.com/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
>


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


Re: [osg-users] silhouette bitmap into vector

2019-07-05 Thread Trajce Nikolov NICK
Hi Community,

just if someone else will need this:

I was able to work it with OpenCV. But if you really want to exercise it
here is a nice link with different algorithms explained in big detail:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4813928/

Cheers,
Nick

On Tue, Jul 2, 2019 at 1:03 PM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Community,
>
> This is a bit more CG question rather then OSG related, but I think there
> are lots of CG folks in this community so I dare to ask
>
> I am after processing of a rendering outline of a scene (which is a bitmap
> as a result of RTT in OSG) and then having this outline as an array of 2D
> coordinates. And preferable close to real time. Anyone with some
> suggestions?
>
> Thanks a bunch as always! Meanwhile I am googling this one
>
> Cheers,
> Nick
>
> --
> trajce nikolov nick
>


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


[osg-users] silhouette bitmap into vector

2019-07-02 Thread Trajce Nikolov NICK
Hi Community,

This is a bit more CG question rather then OSG related, but I think there
are lots of CG folks in this community so I dare to ask

I am after processing of a rendering outline of a scene (which is a bitmap
as a result of RTT in OSG) and then having this outline as an array of 2D
coordinates. And preferable close to real time. Anyone with some
suggestions?

Thanks a bunch as always! Meanwhile I am googling this one

Cheers,
Nick

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


Re: [osg-users] two pass rendering without enhancing osg::Drawable

2019-07-02 Thread Trajce Nikolov NICK
Thanks Robert :). Sometimes I struggle :-))) ... Thanks again !

On Tue, Jul 2, 2019 at 12:22 PM Robert Osfield 
wrote:

> Hi Nick,
>
> On Tue, 2 Jul 2019 at 10:58, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> is there any elegant way to have multipass rendering then inheriting and
>> enhancing osg::Drawable? Thanks a bunch for any hint
>>
>
> Have you forgotten how the OSG works?
>
> There are dozens of examples in the OpenSceneGraph/example that use
> mulit-pass and multi-stage rendering without ever subclassing Drawable or
> using callbacks. One simple uses osg::Camera to manage mulit-stage
> rendering, like render to texture. and using StateSet's::RenderBin details
> when you want to have multiple bins, or you can just put the same subgraph
> into the scene graph multiple times and decorate each branch with different
> state to select what you want.
>
> Robert.
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


[osg-users] two pass rendering without enhancing osg::Drawable

2019-07-02 Thread Trajce Nikolov NICK
Hi Community,

is there any elegant way to have multipass rendering then inheriting and
enhancing osg::Drawable? Thanks a bunch for any hint

Cheers,
Nick

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


Re: [osg-users] How to properly compile osg with EGL support?

2019-06-24 Thread Trajce Nikolov NICK
we are very interested in hearing about the "GPU affinity" approach you are
mentioning as you know

On Mon, Jun 24, 2019 at 10:04 PM Chris Hanson  wrote:

> Can you just side-load the binary built on the personal machine onto the
> administered system and see what happens? The result, even if it's a
> failure, might be insightful.
>
> I'm glad the process works. We need to document this build recipe because
> the utility of it is potentially very powerful for many users.
>
> Now we just need to figure out binding to a particular GPU in multi-GPU
> systems, and it will be a serious breakthrough to be able to access
> multiple GPUs on Linux without the overhead of X!
>
> On Fri, Jun 21, 2019 at 2:12 PM Roy Lichtenheldt 
> wrote:
>
>> Hi Nick,
>>
>> Thanks for the hint. After being unsuccessful on our administrated
>> systems, I ported a small example to a self-administrated ubuntu machine
>> --> few adaptions to the cmakeLists and it runs. I guess everything is
>> running fine, as the viewer loop keeps running without showing the viewer
>> on the screen (I ran the main.cpp from the repository in this thread).
>>
>> So my next task will be to figure out what is wrong in the administrated
>> system and to try our simulation tool on the ubuntu one in order to see if
>> it would also work.
>>
>> Thanks Again!
>>
>> Cheers,
>> Roy
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=76319#76319
>>
>>
>>
>>
>>
>> ___
>> 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 <https://twitter.com/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
>


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


Re: [osg-users] How to properly compile osg with EGL support?

2019-06-19 Thread Trajce Nikolov NICK
Hi Roy,

the CMakeLists.txt I posted are replacement of the osgviewer from the
repository. Just give it a try there in that scope and then we can
investigate further how to adopt it for the osgEGL project

On Wed, Jun 19, 2019 at 9:02 PM Roy Lichtenheldt 
wrote:

> Hi Nick,
>
> Thank you very much! Unfortunately, I did not get it working yet: I got a
> similar solution as yours - I fear it is rather our institutional Linux
> might be the problem - I need to check if everthing is fine there in terms
> of libraries.
>
> If I link only against the libraries your cmakeLists provides, I won't get
> my examples running with either EGL or OpenGL (I guess libGLX is missing
> then).
>
> Could using OSG 3.4 be a problem? (currently porting to 3.6 is not a fast
> option as osg::program changed sufficiently)
>
> Cheers,
> Roy
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76312#76312
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] How to properly compile osg with EGL support?

2019-06-19 Thread Trajce Nikolov NICK
Hi Roy,

as promissed. See attached

On Tue, Jun 18, 2019 at 9:58 PM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Roy,
>
> I am not on Linux box at the moment but as I can recall I had to link
> against the NVIDIA libraries, for OpenGL and for the GLdispatch. No idea
> how this works on Windows. Tomorrow from work I can send you the whole
> working project
>
> On Tue, Jun 18, 2019 at 6:27 PM Roy Lichtenheldt 
> wrote:
>
>> Hi Nick,
>>
>> I got exactly the same stack trace you got on running my example - I
>> tried linking explicitly to EGL, GLdispatch and OpenGL, but it seems I got
>> that wrong. Any hints (or possibly an adapted cmakeLists ;-) )?
>>
>> Thank you!
>>
>> Cheers,
>> Roy
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=76300#76300
>>
>>
>>
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
> --
> trajce nikolov nick
>


-- 
trajce nikolov nick
SET(TARGET_SRC osgviewer.cpp )

LINK_DIRECTORIES(/usr/lib/nvidia-384/)



SET(TARGET_COMMON_LIBRARIES
OpenThreads
osg
osgDB
osgUtil
osgGA
osgViewer
osgText
)

SETUP_APPLICATION(osgviewer)

TARGET_LINK_LIBRARIES(${TARGET_TARGETNAME} EGL GLdispatch OpenGL)





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


Re: [osg-users] How to properly compile osg with EGL support?

2019-06-18 Thread Trajce Nikolov NICK
Hi Roy,

I am not on Linux box at the moment but as I can recall I had to link
against the NVIDIA libraries, for OpenGL and for the GLdispatch. No idea
how this works on Windows. Tomorrow from work I can send you the whole
working project

On Tue, Jun 18, 2019 at 6:27 PM Roy Lichtenheldt 
wrote:

> Hi Nick,
>
> I got exactly the same stack trace you got on running my example - I tried
> linking explicitly to EGL, GLdispatch and OpenGL, but it seems I got that
> wrong. Any hints (or possibly an adapted cmakeLists ;-) )?
>
> Thank you!
>
> Cheers,
> Roy
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76300#76300
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] Rendering a Depthmap

2019-06-12 Thread Trajce Nikolov NICK
Hi Lucas,

I have this working (Lidar scans simulation). If you post snippets I might
be able to help you. You can private msg me too

Cheers
Nick

On Wed, Jun 12, 2019 at 2:25 PM Glenn Waldron  wrote:

> Lucas,
> Just guessing, but it sounds like you are experiencing a problem knows as
> "shadow acne." There's a good explanation of it here along with some
> possible mitigation ideas. Very common problem when projecting a depth map
> back onto the main camera.
>
>
> http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/
>
>
> Glenn Waldron
>
>
> On Wed, Jun 12, 2019 at 6:47 AM Lucas Amparo 
> wrote:
>
>> Hi, everyone
>>
>> I'm trying to render a depthmap using shaders. Very simple, just using
>> the distance from an arbitrary point P to the camera's eye. That map will
>> be deprojected into a pointcloud.
>>
>> The problem is an unexpected (by me lol) behavior from the deprojection.
>> Using a tutorial (can't post links yet), I've done the work but the result
>> seems weird.
>>
>> For example, if I had a perfect wall on the scene, the depthmap is
>> projected similar to a "rinnegan" (do you remember naruto? Is the best way
>> to represent the problem )
>>
>> Someone already did something similar to that? What's the best way to
>> make a depthmap on OSG? Tutorials, examples, books are very welcomed.
>>
>> Thank you!
>>
>> Cheers,
>> Lucas
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=76186#76186
>>
>>
>>
>>
>>
>> ___
>> 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
>


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


[osg-users] remove mipmap data from osg::Image

2019-05-28 Thread Trajce Nikolov NICK
Hi Community,

I am struggling with this simple issue. Any hints availabe?

Thanks a bunch as always!

Cheers,
Nick

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


Re: [osg-users] adding object models in osgEarth best practices

2019-05-03 Thread Trajce Nikolov NICK
Hi David,

to set up a Quat with your hpr you can do something like this:
osg::Quat q;
q.makeRotate(h,osg::Vec3(0,0,1),p,osg::Vec3(1,0,0),r,osg::Vec3(0,1,0));

of course you can tune the order

Cheers,
Nick

On Thu, May 2, 2019 at 11:02 PM David Bobavid 
wrote:

> Hi Eran,
>
> Ok, thanks! I'll look into that.
>
> Last question (I think) for now... I'm trying to set my cow's orientation.
> From what you have suggested previously, would I add another
> MatrixTransform node with the rotations set into it?
>
> Or should I add a PositionAttitudeTransform instead? If so, are there some
> helper classes that I can use that will create the Quat properly based on
> my heading, pitch and roll? I've been looking through the headers and
> cannot seem to find something that will help.
>
> Thank you again!
>
> Cheers,
> David
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75944#75944
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] How to properly compile osg with EGL support?

2019-04-30 Thread Trajce Nikolov NICK
me again :)

I had to re-read what Omar wrote in this thread. To make it work you really
need to link explicitly to EGL, GLdispatch and OpenGL. All works now

Thanks Omar and Chris!

On Tue, Apr 30, 2019 at 7:38 AM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Community,
>
> we are back on this issue now days. I have tried the osgEGL project from
> guthub and I am having the same problem I had before. Crash .. Here is the
> stack trace. Any clue?
>
> 0glGetString0x762ccae9
> 1osg::State::initializeExtensionProcs()0x76d1e3ed
> 2osg::GraphicsContext::makeCurrent()0x76c2a4f2
> 3osg::GraphicsThread::run()0x76c30117
> 4OpenThreads::ThreadPrivateActions::StartThread(void *)
> 0x76873375
> 5start_thread
> /usr/lib/debug/.build-id/b1/7c21299099640a6d863e423d99265824e7bb16.debug
> 3330x748d46ba
> 6clone/usr/lib/debug/lib/x86_64-linux-gnu/libc-2.23.so109
> 0x7599741d
>
>
>
>
> On Fri, Jan 25, 2019 at 9:47 AM Omar Álvarez 
> wrote:
>
>> I have created a small repo with my changes based on your code. I will
>> try to update the readme today, but compiling it is pretty straightforward.
>>
>> https://github.com/omaralvarez/osgEGL
>>
>> I still need to clean up the code and see what is going on with the
>> warnings, but it looks like it is working properly with the OSG master
>> branch.
>>
>> El jue., 24 ene. 2019 a las 23:49, Trajce Nikolov NICK (<
>> trajce.nikolov.n...@gmail.com>) escribió:
>>
>>> Hi,
>>>
>>> here is how far we have got (not too far but I think it is in the right
>>> direction). Let see if you have some
>>>
>>> On Thu, Jan 24, 2019 at 12:06 AM Omar Álvarez 
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Sounds good. Tomorrow morning I will compile it. I will probably also
>>>> make some changes in how GL is used in CMake since to make EGL work you
>>>> need to link to GLVND GL. Thanks for the tips to get OSG to compile.
>>>>
>>>> If you have some code already I will gladly take a look and see if I
>>>> can make it work. I’ll be happy to share my findings with everybody. If
>>>> everything goes ok we should have a working example and maybe a tutorial.
>>>> Do you have a github repo?
>>>>
>>>> Regards,
>>>>
>>>> Omar.
>>>> ___
>>>> osg-users mailing list
>>>> osg-users@lists.openscenegraph.org
>>>>
>>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>>
>>>
>>>
>>> --
>>> trajce nikolov nick
>>> ___
>>> 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
>>
>
>
> --
> trajce nikolov nick
>


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


Re: [osg-users] How to properly compile osg with EGL support?

2019-04-29 Thread Trajce Nikolov NICK
Hi Community,

we are back on this issue now days. I have tried the osgEGL project from
guthub and I am having the same problem I had before. Crash .. Here is the
stack trace. Any clue?

0glGetString0x762ccae9
1osg::State::initializeExtensionProcs()0x76d1e3ed
2osg::GraphicsContext::makeCurrent()0x76c2a4f2
3osg::GraphicsThread::run()0x76c30117
4OpenThreads::ThreadPrivateActions::StartThread(void *)
0x76873375
5start_thread
/usr/lib/debug/.build-id/b1/7c21299099640a6d863e423d99265824e7bb16.debug
3330x748d46ba
6clone/usr/lib/debug/lib/x86_64-linux-gnu/libc-2.23.so109
0x7599741d




On Fri, Jan 25, 2019 at 9:47 AM Omar Álvarez  wrote:

> I have created a small repo with my changes based on your code. I will try
> to update the readme today, but compiling it is pretty straightforward.
>
> https://github.com/omaralvarez/osgEGL
>
> I still need to clean up the code and see what is going on with the
> warnings, but it looks like it is working properly with the OSG master
> branch.
>
> El jue., 24 ene. 2019 a las 23:49, Trajce Nikolov NICK (<
> trajce.nikolov.n...@gmail.com>) escribió:
>
>> Hi,
>>
>> here is how far we have got (not too far but I think it is in the right
>> direction). Let see if you have some
>>
>> On Thu, Jan 24, 2019 at 12:06 AM Omar Álvarez 
>> wrote:
>>
>>> Hi,
>>>
>>> Sounds good. Tomorrow morning I will compile it. I will probably also
>>> make some changes in how GL is used in CMake since to make EGL work you
>>> need to link to GLVND GL. Thanks for the tips to get OSG to compile.
>>>
>>> If you have some code already I will gladly take a look and see if I can
>>> make it work. I’ll be happy to share my findings with everybody. If
>>> everything goes ok we should have a working example and maybe a tutorial.
>>> Do you have a github repo?
>>>
>>> Regards,
>>>
>>> Omar.
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>
>>
>> --
>> trajce nikolov nick
>> ___
>> 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
>


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


Re: [osg-users] where osgUtil::TriStripVisitor has gone over the newer versions

2019-04-26 Thread Trajce Nikolov NICK
Thanks for the fast response Robert! I will have a look

Cheers,
Nick

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Fri, Apr 26, 2019 at 10:00 PM Robert Osfield 
wrote:

> Hi Nick,
>
> TriStripVisitor is still in 3.6, it's been removed from master as it's not
> the best thing to use for modern hardware - the osgUtil::MeshOptimizer
> classes are a better alternative,
>
> Robert
>
> On Fri, 26 Apr 2019 at 20:12, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi Community,
>>
>> I recall this class was present before but now can not find it. Any clue
>> is there is something else replacing it?
>>
>> Thanks a bunch as always
>>
>> Nick
>>
>> --
>> trajce nikolov nick
>>
>>
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=icon>
>>  Virus-free.
>> www.avast.com
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=link>
>> <#m_-2181725659128811696_m_5004491317266644099_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>> ___
>> 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
>


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


[osg-users] where osgUtil::TriStripVisitor has gone over the newer versions

2019-04-26 Thread Trajce Nikolov NICK
Hi Community,

I recall this class was present before but now can not find it. Any clue is
there is something else replacing it?

Thanks a bunch as always

Nick

-- 
trajce nikolov nick

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Image capture in memory

2019-04-24 Thread Trajce Nikolov NICK
Hi Catalin,

I don't have build env at the moment but looking into the code, can you try
this:

osgposter.cpp, Ln: 377
just add:
viewer_camera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);

this shouldn't open any window

On Wed, Apr 24, 2019 at 11:12 AM Catalin Flower  wrote:

> Hi Alberto,
>
> This example is half baked as I see it:
>
> if you run it:
>
> osgposter.exe cow.osg --inactive --use-pbuffer
>
> --inactive - suppose to be without windows but it creates a window anyway
> --use-pbuffer still creates a window
>
> This is the code path that I tried to import in my app but no image is
> generated and it creates a black .bmp image.
>
> if you run it:
>
> osgposter.exe cow.osg
>
> if you can see the cow in a window and you can press 'P' and it captures
> an image fine to the disk
>
> I need a simple example to capture an image off-screen without any windows
> popping up on screen. This is a basic feature that should be simple
> implement and understand.
>
> Does OSG even support such a basic feature?
>
>
> Thank you!
>
> Cheers,
> Catalin
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75884#75884
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] culling / bounding calculation for shader scaled geometries

2019-03-28 Thread Trajce Nikolov NICK
Hi Christoph,

there is something like setCullingActive(bool) in the interface of the Node
classes

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, Mar 28, 2019 at 2:16 PM Christoph Dohmen 
wrote:

> Hi all,
>
> I need to display textured items in a pixel-constant size even on zooming.
> For my implementation I use the position as vertices and store the size in
> the normals. The vertex shader handles it all corrrectly and the image is
> shown in a constant size.
>
> Unfortunately these items are culled if the position is outside the
> viewport. That's bad :-(
>
> I tried to use setInitialBound() with a maximum area to define the
> bounding box to prevent these items from being culled away. But instead of
> keeping the items on screen this results in scaled items!
>
> What other way could I go to prevent the items from beeing culled? Maybe I
> have to read back the vertices somehow?
>
> Thank you!
>
> Cheers,
> Christoph
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75742#75742
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] [build] Particular Build Problems with OSG.

2019-03-27 Thread Trajce Nikolov NICK
Hi Zachary,

osg is cmake based for configuration. so instead of ./configure;make;make
install you should do something like

cmake .
make
make install

cmake will generate the Makefiles

On Wed, Mar 27, 2019 at 5:23 PM Robert Osfield 
wrote:

> Hi Zachary,
>
> You will need to post us the errors you are seeing without this there
> is no way for us to know what is wrong.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


[osg-users] osgPhysics + physX

2019-03-13 Thread Trajce Nikolov NICK
Hi community,

anyone familiar with these two and willing to give some hints, answers on
simple questions I am struggling with?

Please let me know

Thanks a bunch as always!
Nick

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


Re: [osg-users] How do I continuously read the mouse position as the mouse is moving, without a click event in osg

2019-02-13 Thread Trajce Nikolov NICK
Hi Kris,

are you on windows? If so, you can force the Windows Manager to pass all
events to the osgView. Here is some snippet:

osgViewer::CompositeViewer::Windows wins;
viewer->getWindows(wins);

while (!viewer->done())
{

#if defined(_WIN32)
MSG msg;
if (::PeekMessage(,NULL,0,0,PM_NOREMOVE))
{
::GetMessage(, NULL, 0, 0);

if (wins.size())
{
osgViewer::GraphicsHandleWin32 *hdl = dynamic_cast
(wins.at(0));
if(hdl)
{
WNDPROC fWndProc = (WNDPROC)::GetWindowLongPtr(hdl->getHWND(),
GWLP_WNDPROC);
if (fWndProc && hdl->getHWND())
{
::CallWindowProc(fWndProc,hdl->getHWND(),msg.message, msg.wParam,
msg.lParam);
}
}
}
}
#endif

On Wed, Feb 13, 2019 at 8:31 AM Kris Bartowski  wrote:

>
> gwaldron wrote:
> > Kris,You want to install an osgGA::GUIEventHandler, override the handle
> method, and listen for the MOVE or DRAG events. DRAG fires when moving the
> mouse with a button down.
> > Glenn Waldron / osgEarth
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Feb 8, 2019 at 6:03 AM Kris Bartowski < ()> wrote:
> >
> >
> > > Hi,
> > >
> > > I want to read the mouse location at any time, but unfortunately when
> i try to read it for example when event type is FRAME, it always gives me
> the last clicked mouse coordinates.
> > >
> > > Thank you!
> > >
> > > Cheers,
> > > Kris
> > >
> > > --
> > > Read this topic online here:
> > > http://forum.openscenegraph.org/viewtopic.php?p=75598#75598 (
> http://forum.openscenegraph.org/viewtopic.php?p=75598#75598)
> > >
> > >
> > >
> > >
> > >
> > > ___
> > > osg-users mailing list
> > >  ()
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> )
> > >
> >
> >
> >  --
> > Post generated by Mail2Forum
>
>
> That's what i do, but for some reason ea->getEventType() is never equal to
> osgGA::GUIEventAdapter::MOVE, i am notified only when the DRAG and PUSH
> events fire.
>
> I use OpenSceneGraph Library 3.2.3
>
> ~Kris
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75624#75624
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


[osg-users] osgprerender and render to Window

2019-02-04 Thread Trajce Nikolov NICK
Hi Robert, Community,

I was experimenting with RTT and for debug I turn the
renderTargetImplementation for the Camera to be
osg::Camera::SEPARATE_WINDOW - just to see what I am rendering into my
FBOs. Since there were dozen of Cameras involved (intentionally) I was
expecting lots of windows to open - but my app opened even more then
expected. I was not able  to trace it down why, but the same happens when I
run 'osgprerender --window' which leads to open 2 windows for the same
Camera with this output:

osgprerender --window
void StateSet::setGlobalDefaults() ShaderPipeline disabled.
void StateSet::setGlobalDefaults() ShaderPipeline disabled.
ContextData::incrementContextIDUsageCount(0) to 2
ContextData::incrementContextIDUsageCount(0) to 3

XUbuntu 16.4
OSG master
NVIDIA 384.130

Is this expected? Thanks a bunch for any insight!

Cheers,
Nick

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


Re: [osg-users] [3rdparty] How to change camera's yaw and pitch, and move front, back and sideways according to that?

2019-01-31 Thread Trajce Nikolov NICK
Hi,

viewer.getCamera()->setViewMatrixAsLookAt

On Thu, Jan 31, 2019 at 10:01 AM Rodrigo Dias  wrote:

> I want to change the camera direction with the mouse, and position with
> the keyboard. I've found an example on how to change the position, but
> still couldn't find anything explaining how to change the direction (and
> not sure if the position will change correctly when the direction changes).
> All I find is "take a look at the manipulator source code, it will give
> inspiration" etc. But I just don't get how can I implement that from the
> source code I saw.
>
> Considering this is such a trivial task, why is it virtually impossible to
> find a simple source code showing how it's done?
>
> Thanks,
> Rodrigo
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75567#75567
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] How to properly compile osg with EGL support?

2019-01-24 Thread Trajce Nikolov NICK
Hi,

here is how far we have got (not too far but I think it is in the right
direction). Let see if you have some

On Thu, Jan 24, 2019 at 12:06 AM Omar Álvarez  wrote:

> Hi,
>
> Sounds good. Tomorrow morning I will compile it. I will probably also make
> some changes in how GL is used in CMake since to make EGL work you need to
> link to GLVND GL. Thanks for the tips to get OSG to compile.
>
> If you have some code already I will gladly take a look and see if I can
> make it work. I’ll be happy to share my findings with everybody. If
> everything goes ok we should have a working example and maybe a tutorial.
> Do you have a github repo?
>
> Regards,
>
> Omar.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
trajce nikolov nick
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield
 *
 * This application is open source and may be redistributed and/or modified
 * freely and without restriction, both in commercial and non commercial applications,
 * as long as this copyright notice is maintained.
 *
 * This application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

#include 
#include 
#include 

#include 
#include 
#include 

#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 

#include 

#include 
#include 
#include 
#include 

#include 

class EGLGraphicsWindowEmbedded : public osgViewer::GraphicsWindowEmbedded
{
protected:
EGLDisplay  eglDpy;
EGLint  major, minor;
EGLint  numConfigs;
EGLConfig   eglCfg;
EGLSurface  eglSurf;
EGLContext  eglCtx;
public:

EGLGraphicsWindowEmbedded()
{
const EGLint configAttribs[] = {
  EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
  EGL_BLUE_SIZE, 8,
  EGL_GREEN_SIZE, 8,
  EGL_RED_SIZE, 8,
  EGL_DEPTH_SIZE, 8,
  EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
  EGL_NONE
};

static const int pbufferWidth = 256;
static const int pbufferHeight = 256;

const EGLint pbufferAttribs[] = {
EGL_WIDTH, pbufferWidth,
EGL_HEIGHT, pbufferHeight,
EGL_NONE,
};

// 1. Initialize EGL
eglDpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
eglInitialize(eglDpy, , );

// 2. Select an appropriate configuration
eglChooseConfig(eglDpy, configAttribs, , 1, );

// 3. Create a surface
eglSurf = eglCreatePbufferSurface(eglDpy, eglCfg, pbufferAttribs);

// 4. Bind the API
eglBindAPI(EGL_OPENGL_API);

// 5. Create a context and make it current
eglCtx = eglCreateContext(eglDpy, eglCfg, EGL_NO_CONTEXT, NULL);

init();

}
virtual ~EGLGraphicsWindowEmbedded()
{
// 6. Terminate EGL when finished
eglTerminate(eglDpy);
}

virtual bool isSameKindAs(const Object* object) const { return dynamic_cast(object)!=0; }
virtual const char* libraryName() const { return "osgViewer"; }
virtual const char* className() const { return "EGLGraphicsWindowEmbedded"; }

void init()
{
if (valid())
{
setState( new osg::State );
getState()->setGraphicsContext(this);

getState()->setContextID( osg::GraphicsContext::createNewContextID() );
}
}

// dummy implementations, assume that graphics context is *always* current and valid.
virtual bool valid() const { return true; }
virtual bool realizeImplementation() { return true; }
virtual bool isRealizedImplementation() const  { return true; }
virtual void closeImplementation() {}
virtual bool makeCurrentImplementation() {
eglMakeCurrent(eglDpy, eglSurf, eglSurf, eglCtx);
return true;
}
virtual bool releaseContextImplementation() { return true; }
virtual void swapBuffersImplementation() {}
virtual void grabFocus() {}
virtual void grabFocusIfPointerInWindow() {}
virtual void raiseWindow() {}
};

int main(int argc, char** argv)
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(,argv);

arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...&quo

Re: [osg-users] How to properly compile osg with EGL support?

2019-01-23 Thread Trajce Nikolov NICK
Hi Omar,

we are trying to get this running as well. Julien's hints should be enough
to get it built. I also wrote some code to support EGL based on some
off-list disucussion we had with Chris. All was great but got some crashes
in osg and was not able to actually run it. I can share my work with you
(tomorrow) if you want to give it a try and maybe together we make it work
and share it with the community?

Cheers,
Nick

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, Jan 23, 2019 at 7:51 PM Chris Hanson  wrote:

> I know of a couple other people trying to do this. Let me know how you get
> on with the X-less OSG.
>
> On Wed, Jan 23, 2019 at 7:31 PM Julien Valentin <
> julienvalenti...@gmail.com> wrote:
>
>> few advices:
>> check your driver support with eglinfo
>> try adding -legl to the linker flags
>> try VERBOSE=1 make
>> to check used linkerflags
>> Cheers
>>
>>
>>
>> Omar Álvarez wrote:
>> > Hi.
>> > I am trying to compile OSG with EGL support in order to be able to run
>> OSG server side without an X display server. I have installed EGL headers
>> and the latest and the NVIDIA driver. EGL is detected by OSG and I am
>> requesting GLVND GL:
>> > > cmake -DOpenGL_GL_PREFERENCE=GLVND .
>> >
>> >
>> > I am getting linking errors:
>> > > [ 33%] Linking CXX executable ../../bin/osgversion
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glDrawArrays'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glCallList'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glPointSize'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glTexParameteriv'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glFrontFace'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glLightModeli'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glGetBooleanv'
>> > > .
>> >
>> >
>> > Is this the proper way for compiling OSG with EGL support?
>> > I am using CMake 3.13, Ubuntu 18.04 and gcc 7.3. I think the way in
>> which the OpenGL library is linked has to change (to support the new CMake
>> flag OpenGL_GL_PREFERENCE).
>> >
>> >  --
>> > Post generated by Mail2Forum
>>
>>
>> 
>> Twirling twirling twirling toward freedom
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=75535#75535
>>
>>
>>
>>
>>
>> ___
>> 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 <https://twitter.com/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
>


-- 
trajce nikolov nick

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Scale object based on camera distance

2019-01-06 Thread Trajce Nikolov NICK
Hi David,

have a look at osg::AutoTransform

On Mon, Jan 7, 2019 at 1:41 AM David Mitchell  wrote:

> I have certain nodes/objects in my scene that I always want to be the same
> size regardless of their distance from the camera and I'm trying to figure
> out the best way to go about doing this.  My first thought is to create a
> custom NodeCallback to add to the node as a cull callback and then get the
> distance from the node to the camera and apply the appropriate scale to the
> node (as a MatrixTransform).  Is that a reasonable approach?
>
> The other thing I'm struggling with is how to calculate the proper scale.
> What I'd like is for the object's geometry to translate to pixel units,
> meaning if the vertices range from (-10, -10, -10) to (10, 10, 10), then it
> would take up roughly 20x20 pixels on the screen when scaled.  Rather than
> fumbling around with different matrices and transforms trying to get this
> to work, I thought I'd try asking first.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75383#75383
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] Precipitation problems

2018-12-20 Thread Trajce Nikolov NICK
Hi Bruce,

you familiar with SilverLining ? Atmosphere model by SunDog (
https://sundog-soft.com) .. It works well in ECEF Geocentric and it is
really affordable .. Give it a shot, there is a evaluation license .. You
get the code too

On Thu, Dec 20, 2018 at 2:31 PM Bruce Clay  wrote:

> Robert:
>   Thanks for your reply.
>   It was not the answer I hoped for but we move on
>
> Bruce
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75328#75328
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] Update node color on demand

2018-11-26 Thread Trajce Nikolov NICK
; };
>
> void ColorVisitor::setColor(const osg::Vec4 ) {
> // ---
> //
> // Set the color to change apply to the nodes geometry
> //
> // -----------
> osg::Vec4 *c = _colorArrays->operator [](0);
> m_color = color;
> *c = m_color;
> };
>
>
>
>
>
> Cheers,
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75248#75248
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] Update node color on demand

2018-11-26 Thread Trajce Nikolov NICK
Hi Diego,

can you post your Visitor code? It can be something like missing calling
->dirty() on the color array or such

On Mon, Nov 26, 2018 at 8:30 PM Diego Mancilla  wrote:

> Hello,
>
> I have tried Eran's suggestion with no success. I have successfully
> created the handler, and it gets called but no color change...
>
> My current code:
>
> On main:
>
> Code:
> _lines = osgDB::readNodeFile("lines.dxf");
> _topo->setDataVariance(osg::Object::DYNAMIC);
> osg::Geode* geode = new osg::Geode;
>
> _mViewer->addEventHandler(new ColorHandler);
>
> ColorVisitor newColor;
> newColor.setColor( 1.0f, 0.0f, 0.0f );
> _lines->accept(newColor);
> geode->addChild(_lines);
> _mViewer->realize();
>
>
>
>
> The handler:
>
>
> Code:
> bool ColorHandler::handle(const osgGA::GUIEventAdapter& ea,
> osgGA::GUIActionAdapter& aa)
> {
> if (ea.getEventType() == ea.USER)
> {
> auto changeColorEvent = dynamic_cast ChangeColorEvent*>(ea.getUserData());
> if (changeColorEvent != nullptr)
> {
> std::cout << "Hola Handler!!!" << std::endl;
> std::cout << "new color: " <<
> changeColorEvent->r<<" "<< changeColorEvent->g<< " "<<
> changeColorEvent->b< ColorVisitor newColor;
> newColor.setColor(changeColorEvent->r,
> changeColorEvent->g, changeColorEvent->b);
> changeColorEvent->node->accept(newColor);
> return true;
> }
> }
> return false;
>
>
>
> Thank you!
>
> Cheers,
> Diego
>
> ------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75245#75245
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] playing videos with audio channels with the ffmpeg plugin

2018-11-23 Thread Trajce Nikolov NICK
Thanks Raymond ! I will look into it

On Fri, Nov 23, 2018 at 12:00 PM Raymond de Vries 
wrote:

> Hi,
>
> That's not necessary, it is included in the vlc installers and installed
> in the sdk directory. Some versions don't contain it though so check
> different versions.
>
> Cheers,
> Raymond
>
>
> On 11/22/2018 7:29 PM, Trajce Nikolov NICK wrote:
>
> Hi all,
>
> anyone has libVLC compiled for Windows and willing to share?
>
> Thanks a bunch!
>
> On Thu, Nov 22, 2018 at 11:15 AM Raymond de Vries 
> wrote:
>
>> Hi,
>>
>> Reading the source code of the osgmovie example there is sample code for
>> using SDL or SDL2. Maybe that helps?
>>
>> Cheers, good luck,
>> Raymond
>>
>>
>> On 11/21/2018 10:31 PM, Chris Hanson wrote:
>>
>> Refer to Mattias Helsing's answer here:
>> http://forum.openscenegraph.org/viewtopic.php?t=9707
>>
>> You need an audio subsystem like osgAudio or even SDL to output the audio
>> to.
>>
>> On Wed, Nov 21, 2018 at 10:16 PM Trajce Nikolov NICK <
>> trajce.nikolov.n...@gmail.com> wrote:
>>
>>> Hi Community,
>>>
>>> I have video with audio and when I playback the file with osgmovie I see
>>> in the debug the audio channel is attached but can not hear anything :-).
>>> Is there any magic, perheps to set the audio device somehow? Thank you for
>>> any hint!
>>>
>>> Here is the ouput
>>>
>>> osgmovie VID00032.mpg.ffmpeg
>>> void StateSet::setGlobalDefaults() ShaderPipeline disabled.
>>> ffmpeg::open(VID00032.mpg) size(720, 480) aspect ratio 1.18519
>>> Attaching FFmpegAudioStream
>>> image->s()720 image-t()=480 aspectRatio=1.18519
>>> void StateSet::setGlobalDefaults() ShaderPipeline disabled.
>>>
>>> --
>>> trajce nikolov nick
>>> ___
>>> 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 <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
>> 623-PIXL [7495]
>>
>>
>> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=emailclient>
>>  Virus-free.
>> www.avg.com
>> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=emailclient>
>> <#m_2638975204706327138_m_-2018913617241985491_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>> ___
>> osg-users mailing 
>> listosg-users@lists.openscenegraph.orghttp://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
>>
>
>
> --
> trajce nikolov nick
>
> ___
> osg-users mailing 
> listosg-users@lists.openscenegraph.orghttp://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
>


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


Re: [osg-users] playing videos with audio channels with the ffmpeg plugin

2018-11-22 Thread Trajce Nikolov NICK
Hi all,

anyone has libVLC compiled for Windows and willing to share?

Thanks a bunch!

On Thu, Nov 22, 2018 at 11:15 AM Raymond de Vries 
wrote:

> Hi,
>
> Reading the source code of the osgmovie example there is sample code for
> using SDL or SDL2. Maybe that helps?
>
> Cheers, good luck,
> Raymond
>
>
> On 11/21/2018 10:31 PM, Chris Hanson wrote:
>
> Refer to Mattias Helsing's answer here:
> http://forum.openscenegraph.org/viewtopic.php?t=9707
>
> You need an audio subsystem like osgAudio or even SDL to output the audio
> to.
>
> On Wed, Nov 21, 2018 at 10:16 PM Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi Community,
>>
>> I have video with audio and when I playback the file with osgmovie I see
>> in the debug the audio channel is attached but can not hear anything :-).
>> Is there any magic, perheps to set the audio device somehow? Thank you for
>> any hint!
>>
>> Here is the ouput
>>
>> osgmovie VID00032.mpg.ffmpeg
>> void StateSet::setGlobalDefaults() ShaderPipeline disabled.
>> ffmpeg::open(VID00032.mpg) size(720, 480) aspect ratio 1.18519
>> Attaching FFmpegAudioStream
>> image->s()720 image-t()=480 aspectRatio=1.18519
>> void StateSet::setGlobalDefaults() ShaderPipeline disabled.
>>
>> --
>> trajce nikolov nick
>> ___
>> 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 <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
> 623-PIXL [7495]
>
>
> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=emailclient>
>  Virus-free.
> www.avg.com
> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=emailclient>
> <#m_-2018913617241985491_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> ___
> osg-users mailing 
> listosg-users@lists.openscenegraph.orghttp://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
>


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


Re: [osg-users] playing videos with audio channels with the ffmpeg plugin

2018-11-22 Thread Trajce Nikolov NICK
Thanks Chris, Raymond!

On Thu, Nov 22, 2018 at 9:00 AM Raymond de Vries  wrote:

> Hi,
>
> Also check this one: https://github.com/xarray/osgRecipes/wiki and then
> search for VLC. The VLC will play your audio too, and is synchronised. Not
> ready for spatial audio though...
>
> Cheers, hth,
> Raymond
>
>
>
> On 11/21/2018 10:31 PM, Chris Hanson wrote:
>
> Refer to Mattias Helsing's answer here:
> http://forum.openscenegraph.org/viewtopic.php?t=9707
>
> You need an audio subsystem like osgAudio or even SDL to output the audio
> to.
>
> On Wed, Nov 21, 2018 at 10:16 PM Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi Community,
>>
>> I have video with audio and when I playback the file with osgmovie I see
>> in the debug the audio channel is attached but can not hear anything :-).
>> Is there any magic, perheps to set the audio device somehow? Thank you for
>> any hint!
>>
>> Here is the ouput
>>
>> osgmovie VID00032.mpg.ffmpeg
>> void StateSet::setGlobalDefaults() ShaderPipeline disabled.
>> ffmpeg::open(VID00032.mpg) size(720, 480) aspect ratio 1.18519
>> Attaching FFmpegAudioStream
>> image->s()720 image-t()=480 aspectRatio=1.18519
>> void StateSet::setGlobalDefaults() ShaderPipeline disabled.
>>
>> --
>> trajce nikolov nick
>> ___
>> 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 <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
> 623-PIXL [7495]
>
>
> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=emailclient>
>  Virus-free.
> www.avg.com
> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=emailclient>
> <#m_-1463051273389647395_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> ___
> osg-users mailing 
> listosg-users@lists.openscenegraph.orghttp://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
>


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


[osg-users] playing videos with audio channels with the ffmpeg plugin

2018-11-21 Thread Trajce Nikolov NICK
Hi Community,

I have video with audio and when I playback the file with osgmovie I see in
the debug the audio channel is attached but can not hear anything :-). Is
there any magic, perheps to set the audio device somehow? Thank you for any
hint!

Here is the ouput

osgmovie VID00032.mpg.ffmpeg
void StateSet::setGlobalDefaults() ShaderPipeline disabled.
ffmpeg::open(VID00032.mpg) size(720, 480) aspect ratio 1.18519
Attaching FFmpegAudioStream
image->s()720 image-t()=480 aspectRatio=1.18519
void StateSet::setGlobalDefaults() ShaderPipeline disabled.

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


Re: [osg-users] Change color of node read from dxf file

2018-11-21 Thread Trajce Nikolov NICK
"... to add a Node as a child of a Drawable ..."

child of a Geode ;-) .. Now Drawable as a Node can be as a Geode child

On Wed, Nov 21, 2018 at 9:58 PM Chris Hanson  wrote:

> I guess I missed that one. I don't even know what it means to add a Node
> as a child of a Drawable so I can't comment on why this works the way it
> does.
>
> On Wed, Nov 21, 2018 at 10:11 AM Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> It happened when Drawable become a Node
>>
>> On Wed, Nov 21, 2018 at 10:06 AM Alberto Luaces  wrote:
>>
>>> Chris Hanson writes:
>>>
>>> > I dunno man, your code is making my head explode. I don't think Geode
>>> HAS an addChild method, so I don't even know why what you're doing would
>>> compile.
>>> >
>>> > I don't think I can help any further. I'm missing something or you are.
>>> >
>>>
>>> Hi, Chris, Geode was subclassed from Group some time ago, see
>>>
>>>
>>> https://github.com/openscenegraph/OpenSceneGraph/commit/3dde165f140ab5f973e50709235cf40c4862bc17
>>>
>>> I don't remember exactly the rationale, but it was about making the code
>>> more straightforward.
>>>
>>> --
>>> Alberto
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>
>>
>> --
>> trajce nikolov nick
>> ___
>> 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 <https://twitter.com/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
>


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


Re: [osg-users] Change color of node read from dxf file

2018-11-21 Thread Trajce Nikolov NICK
It happened when Drawable become a Node

On Wed, Nov 21, 2018 at 10:06 AM Alberto Luaces  wrote:

> Chris Hanson writes:
>
> > I dunno man, your code is making my head explode. I don't think Geode
> HAS an addChild method, so I don't even know why what you're doing would
> compile.
> >
> > I don't think I can help any further. I'm missing something or you are.
> >
>
> Hi, Chris, Geode was subclassed from Group some time ago, see
>
>
> https://github.com/openscenegraph/OpenSceneGraph/commit/3dde165f140ab5f973e50709235cf40c4862bc17
>
> I don't remember exactly the rationale, but it was about making the code
> more straightforward.
>
> --
> Alberto
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


[osg-users] possible (probable) state leakage in the master

2018-11-19 Thread Trajce Nikolov NICK
Hi Robert,

I was experiencing this the last month or a two with the master without
making noise about but it seam it is a real problem. I was under lazy
impression that maybe my implementation wsa wrong but now with very simple
case I can reproduce it:

I have two files, one simple geometry as ive with colors per vertex, and
other file as obj without any materials. The colors from the first file are
somehow getting it thru to the other model by simply osgviewer file1 file2.

In previous facing of this behavior, I was having shaders in the scene
where I wanted parts to be rendered by shaders, parts by ffp, in a
scenegraph like this: root->child1 with shader, root->child2 ffp. After
updating (was really about two months ago) to 3.6.3 if I can recall (or
even now with the master) I had to explicitly disable the shader from
child1 to not be applied to child2 by setting it an empty Program(
setModeEtc...(new osg::Program) ).

If you are not in rush and have some time I can send you the files I have
here that reproduce the problem (not for public), just ping me.

XUbuntu 16.04
Windows 10
osg 3.7.0

Thanks a bunch as always!
Cheers, Nick

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


Re: [osg-users] Shadow frustum culling

2018-10-30 Thread Trajce Nikolov NICK
Hi Gedalia,

is this implementation of the cascaded shadows map something public or you
can share , or it is proprietary

On Tue, Oct 30, 2018 at 4:47 AM Gedalia Pasternak 
wrote:

> Thanks Terry, yes that’s my exact problem, I have a cascaded shadow map
> system for a directional light, where objects just outside the shadow map
> frustra don’t alway cast into the shadow map. I’ll take a look at the view
> class.
> Gedalia
>
> On Mon, Oct 29, 2018 at 5:06 PM Terry Welsh  wrote:
>
>> Gedalia,
>> If I understand the original question correctly, you're not seeing
>> shadows that are cast by off-screen objects. I had that exact problem
>> back around 2006 and Robert solved it with the introduction of the
>> View class. Sorry, I don't remember the details beyond that and can't
>> find our old discussion archived anywhere.
>> - Terry
>>
>> > Hi Gadalia,
>> >
>> > The OSG doesn't culling per Camera with each camera's own view frustum
>> used
>> > for culling, this means the shadow camera should only cull things that
>> are
>> > in it's frustum.  If it's culling objects that you think should be in
>> the
>> > frustum then perhaps it's just set up with the wrong projection matrix
>> > settings.
>> >
>> > Robert
>> >
>> > On Mon, 29 Oct 2018 at 18:44, Gedalia Pasternak 
>> wrote:
>> >
>> > >
>> > > Hi List,
>> > > I've noticed that when using a camera for shadow casting it can often
>> cull
>> > > out objects that are just outside of the frustum but cast shadows
>> into the
>> > > scene. Is there any way to decouple the camera frustum culling
>> calculation
>> > > from the rendering one, even just increasing the culling frustum size
>> by
>> > > 10-15% might help.
>> > > Thanks
>> > > -Gedalia
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> --
> DI-Guy Engineering Lead, VT MÄK
> 150 Cambridge Park Drive, 3rd Floor, Cambridge, MA 02140
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] Selecting a GPU to be used in a dual-GPU laptop

2018-10-18 Thread Trajce Nikolov NICK
I owned laptop with same configuration and obviously the Radeon driver
software kit (or how it is called) comes with an app where you select the
card per app. You select your app in this Radeon app and it will run on the
selected device

On Thu, Oct 18, 2018 at 9:09 PM Chris Hanson  wrote:

> I believe I was previously told that there are some secret C symbols
> wherein if you create a variable of a particular name, it acts as a hint to
> the driver to trigger particular behavior.
>
> I can't at the moment find the names of the symbols or what they do, but
> I'll look around. Maybe you can find it before I do based on that knowledge.
>
> On Thu, Oct 18, 2018 at 5:04 PM Alberto Luaces  wrote:
>
>> Hi,
>>
>> some client owns a laptop with a dual GPU system —the typical integrated
>> Intel card plus an additional Radeon 530 one into a windows10 system.
>>
>> It seems that the driver selects automatically the Radeon when using
>> some CAD applications, but only the integrated Intel when running our
>> OSG program (checked from the Program Manager window).
>>
>> I heard that in some analogous nVidia systems one can set manually a
>> given program to run with the powerful GPU in the Control Panel, but at
>> least, if it were possible in the AMD drivers, it is not immediately
>> apparent (we didn't find how).
>>
>> Does anybody have experience in this kind of Radeon systems?
>>
>> Thank you!
>>
>> --
>> Alberto
>>
>> ___
>> 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 <https://twitter.com/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
>


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


Re: [osg-users] osg apps on gpu cluster

2018-10-05 Thread Trajce Nikolov NICK
Thanks David,

> You might also have to think about synchronization if you are driving
multiple projectors that are blended to form a single image...and if you
have a decent amount of motion, you can get noticeable tearing in the blend
regions.

The output is not that much important in our case and there are no blending
or such (projectors etc). Anyway, this is the info I believe we need to
start investigate ...

Thanks again !

Cheers,
Nick

p.s.
> I do have an modification of OSG I could share that sets the GPU affinity
mask.but its ugly.
Anything will help at this point :-)

On Thu, Oct 4, 2018 at 10:50 PM David Heitbrink 
wrote:

> GPU affinity is really only available with Quadro cards. AMD has there own
> system that is a little more complicated, and has a few more
> featuresbut I am not really experienced with those, and I believe they
> are only usable on the FirePro/Radeon Pro cards.
>
> We have found setting the GPU affinity is an absolute must for multi GPU
> systems on windows.
>
> Basically from what I understand, windows will by default dispatch the
> OpenGL commands to what it thinks is the fastest GPU in the system, then
> copies the result to the other GPU(s). Linux by default dispatches the
> commands to the GPU attached to the display the window is on..so
> setting the GPU affinity is most likely only worth while if you are using
> windows.
>
> FYI I think this was the talk I sat through on the subject:
>
> https://docplayer.net/29825650-Programming-multi-gpus-for-scalable-rendering-shalini-venkataraman-senior-applied-engineer-nvidia.html
>
> I do have an modification of OSG I could share that sets the GPU affinity
> mask.but its ugly.
>
> You might also have to think about synchronization if you are driving
> multiple projectors that are blended to form a single image...and if you
> have a decent amount of motion, you can get noticeable tearing in the blend
> regions.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75038#75038
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


[osg-users] osg apps on gpu cluster

2018-10-01 Thread Trajce Nikolov NICK
Hi Community,

I am totally new to this topic and that is the reason I am pinging you this
time. Anyone with some experience or hints? I am after running (Linux) osg
app N times so each app to have dedicated GPU, something in this fashion.

I will investigate this too, but any word from you is highly appreciated.

Thanks a bunch as always!

Cheers,
Nick

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


Re: [osg-users] problems with osg-3.4.0 port to osg-3.6.0

2018-09-12 Thread Trajce Nikolov NICK
Hi,

Yes, it is. You can start with posting questions and you can also find
professional paid osg consultancy here on this forum/user list. Either way
the community is well responsive

Good luck,

On Wed, 12 Sep 2018, 16:24 Herman Varma,  wrote:

> Is this the right forum to request help for porting code from
> openscenegraph-3.4.0 to openscenegraph-3.6.0???
> ___
> 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] osgText 3.6.3 crash

2018-09-12 Thread Trajce Nikolov NICK
Hi Robert,

That was the right hint and I must admit that I always forget it :-).
Setting the datavaraiance to osg::Object::DYNAMIC fixed the crash! As for
the other hints re performance, this is for sort of DEBUG mode for the sim
so we are ok, but thanks for these as well!

On Wed, Sep 12, 2018 at 4:09 PM Robert Osfield 
wrote:

> Hi Nick,
>
> There are plenty of ways mutlti-thread setting of Text labels could
> cause problems if the threads reading from the Text are running in
> parallel to the ones setting it.  A mutex "might" help but it could
> easily be done in the wrong way.  If you are modifying text
> dynamically then you should set the DataVariance to DYNAMIC.  However,
> adding mutex and using DataVariance of DYNAMIC might protect things if
> you do it all right but performance issues can easily become dominant
> as it can easily stall the various threads.
>
> It may be that trying to dynamically update Text is simply the wrong
> solution for your application.  It might be that writing your own
> custom shader to implement text is the better thing to do.
>
> Robert.
>
>
>
>
> On Wed, 12 Sep 2018 at 13:24, Trajce Nikolov NICK
>  wrote:
> >
> > Hi Robert,
> >
> > we are experiencing some crashes in our sim software. And I know you
> will not like this post since I can not produce minimal case exercising
> this issue - I tried to mimic the sim code into one simple app but in this
> minimal app all works just great. So I will try to explain and count on you
> with hints
> >
> > The environment is multithreaded:
> > - high res thread updating labels guarded by mutex
> > - the osg threads with update callbacks on osgText::Text that is setting
> the labels with setText(...) guarded  by mutex
> >
> > The env is XUbuntu 18, NVIDIA GTX 1080
> >
> > And the crash happens at
> > Text::drawImplementationSinglePass ln: 1151
> glyphquad._primitives->draw(state, usingVertexBufferObjects);
> >
> > which furthers
> >
> > DrawElementsUShort::draw ln: 266
> >
> > if (_numInstances>=1) state.glDrawElementsInstanced(mode, size(),
> GL_UNSIGNED_SHORT, (const GLvoid *)(ebo->getOffset(getBufferIndex())),
> _numInstances);
> > else glDrawElements(mode, size(), GL_UNSIGNED_SHORT, (const
> GLvoid *)(ebo->getOffset(getBufferIndex(;
> >
> > _numInstances is 0 when the crash happens so the crash happens here:
> >
> > glDrawElements(mode, size(), GL_UNSIGNED_SHORT, (const GLvoid
> *)(ebo->getOffset(getBufferIndex())));
> >
> > Any clue or at least a thought when this can happen? Mean while I will
> continue testing and will really try again to make a small app reproducing
> this behavior
> >
> > Thanks a bunch as always!
> >
> > Cheers,
> > Nick
> >
> > --
> > trajce nikolov nick
> > ___
> > 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
>


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


[osg-users] osgText 3.6.3 crash

2018-09-12 Thread Trajce Nikolov NICK
Hi Robert,

we are experiencing some crashes in our sim software. And I know you will
not like this post since I can not produce minimal case exercising this
issue - I tried to mimic the sim code into one simple app but in this
minimal app all works just great. So I will try to explain and count on you
with hints

The environment is multithreaded:
- high res thread updating labels guarded by mutex
- the osg threads with update callbacks on osgText::Text that is setting
the labels with setText(...) guarded  by mutex

The env is XUbuntu 18, NVIDIA GTX 1080

And the crash happens at
Text::drawImplementationSinglePass ln: 1151
glyphquad._primitives->draw(state, usingVertexBufferObjects);

which furthers

DrawElementsUShort::draw ln: 266

if (_numInstances>=1) state.glDrawElementsInstanced(mode, size(),
GL_UNSIGNED_SHORT, (const GLvoid *)(ebo->getOffset(getBufferIndex())),
_numInstances);
else glDrawElements(mode, size(), GL_UNSIGNED_SHORT, (const
GLvoid *)(ebo->getOffset(getBufferIndex(;

_numInstances is 0 when the crash happens so the crash happens here:

glDrawElements(mode, size(), GL_UNSIGNED_SHORT, (const GLvoid
*)(ebo->getOffset(getBufferIndex(;

Any clue or at least a thought when this can happen? Mean while I will
continue testing and will really try again to make a small app reproducing
this behavior

Thanks a bunch as always!

Cheers,
Nick

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


Re: [osg-users] osgDB XmlParser and localization

2018-09-04 Thread Trajce Nikolov NICK
Thanks a bunch Robert!

I will check it first thing tomorrow morning

On Tue, Sep 4, 2018 at 4:40 PM Robert Osfield 
wrote:

> On Fri, 31 Aug 2018 at 08:06, Trajce Nikolov NICK
>  wrote:
> > can you fix this too when you get back to OSG dev please?
>
> This morning I have checked in UTF8 handling in XmlNode/Input to
> master and the 3.6 branch.
>
>
> https://github.com/openscenegraph/OpenSceneGraph/commit/afe5644b9fcf39a22a2ba0c8aefb26a340a5a457
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] osgDB XmlParser and localization

2018-08-31 Thread Trajce Nikolov NICK
Hi Robert,

can you fix this too when you get back to OSG dev please?

Thank you a bunch
Nick

On Mon, Jul 9, 2018 at 1:58 PM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi again Robert,
>
> fast hint: The nodes to be parsed are root->osm->node->tag and their
> properties contains these non asci codes. But probably fastest is to write
> recursive parser
>
> Thanks again
>
> On Mon, Jul 9, 2018 at 1:54 PM Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Thanks so much Robert !!! Attached is the file
>>
>>
>>
>> On Mon, Jul 9, 2018 at 1:50 PM Robert Osfield 
>> wrote:
>>
>>> Hi Nick,
>>>
>>> On Mon, 9 Jul 2018 at 12:26, Trajce Nikolov NICK
>>>  wrote:
>>> > >   are changes for changes sake rather than likely to make any
>>> > functional difference
>>> >
>>> > I knew you will have comments ;-). It works just fine with these
>>> changes but yes, you are right - quick and somewhat dirty. So can you look
>>> at it or you want to do a ping-pong code review with my changes by your
>>> advice? :-)
>>>
>>> I might be quicker just to provide a link to or attach an xml file
>>> that causes problem with the present parser, and then I can look at
>>> what happens when the present code encounters it, and how your changes
>>> affect things.
>>>
>>> As a general note, PRs/commits should be focused on addressing one
>>> issue at a time, so bundling a fix for a specific bug along with other
>>> cosmetic or other changes just confuses what is functional and what is
>>> not.  It's not uncommon to have to go back to various revisions in
>>> code to see where regressions may have occurred so having commits that
>>> just wrap up a small set of associated changes is really helpful in
>>> identifying what has been changed and why.
>>>
>>> Robert.
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>
>>
>> --
>> trajce nikolov nick
>>
>
>
> --
> trajce nikolov nick
>


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


Re: [osg-users] New glTexStorage code is disrupting FBO initialization

2018-08-21 Thread Trajce Nikolov NICK
Hi Robert,

I had the same issue with the FBO failing to initialize. Works now with the
master.

On Tue, Aug 21, 2018 at 2:34 PM Robert Osfield 
wrote:

> Hi Glenn,
>
> We have had a bash at resolve this issue.  Could you please try out
> OSG master or the OpenSceneGraph-3.6-TexStorage branch to see if this
> issue still exists.
>
> Cheers,
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] OSG users in Scandinavia / Northern Europe?

2018-07-31 Thread Trajce Nikolov NICK
Hey Chris,

thanks for visiting us !! Finally to meet in person!!! I really enjoyed our
talks and brainstorming (the best delaunay is no delaunay :-) ). Have a
safe future trips and stay in touch !!

Cheers,
Nick

On Mon, Jul 30, 2018 at 10:02 PM Chris Hanson  wrote:

> I had a great time meeting with and talking OSG, osgEarth and OpenIG with
> Per and Nick here in Goteborg. I'm heading to Oslo tomorrow. I seem to
> recall there were some OSG users in the Norwegian ship and oil business
> (Statoil, perhaps?). If anyone wants to meet up, I'll be in Norway for
> several days before heading to Denmark, northern Germany, Netherlands, etc.
>
> On Tue, Jul 24, 2018 at 1:10 AM Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Chris, I am in Gothenburg, and few others from the team I work with, all
>> OSG developers .. Drop a line
>>
>> On Mon, Jul 23, 2018 at 9:27 AM Chris Hanson 
>> wrote:
>>
>>>   Hi northern European OSG folks. I'm in Stockholm early this week and
>>> going to Norway and Denmark in the following week(s) and will likely be in
>>> other northern European countries in the next few months.
>>>
>>>   I would love to drop by and talk shop with any osg / osgEarth (and
>>> just OpenGL / 3D) folks while we're traveling. Please reply publicly or
>>> message me privately if you're interested. Maybe we can spark some more
>>> local gatherings even without my presence.
>>>
>>>   Also, I have cool AlphaPixel mini technical screwdriver schwag I'm
>>> distributing around the continent (and don't want to pay to transport
>>> home), so there's that. ;)
>>> https://photos.app.goo.gl/kaSGZgn9yrxC9gU1A
>>>
>>> --
>>> 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 <https://twitter.com/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
>>>
>>
>>
>> --
>> trajce nikolov nick
>> ___
>> 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 <https://twitter.com/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
>


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


Re: [osg-users] OSG users in Scandinavia / Northern Europe?

2018-07-23 Thread Trajce Nikolov NICK
Chris, I am in Gothenburg, and few others from the team I work with, all
OSG developers .. Drop a line

On Mon, Jul 23, 2018 at 9:27 AM Chris Hanson  wrote:

>   Hi northern European OSG folks. I'm in Stockholm early this week and
> going to Norway and Denmark in the following week(s) and will likely be in
> other northern European countries in the next few months.
>
>   I would love to drop by and talk shop with any osg / osgEarth (and just
> OpenGL / 3D) folks while we're traveling. Please reply publicly or message
> me privately if you're interested. Maybe we can spark some more local
> gatherings even without my presence.
>
>   Also, I have cool AlphaPixel mini technical screwdriver schwag I'm
> distributing around the continent (and don't want to pay to transport
> home), so there's that. ;)
> https://photos.app.goo.gl/kaSGZgn9yrxC9gU1A
>
> --
> 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 <https://twitter.com/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
>


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


Re: [osg-users] Can I use Material, Color, LightSource, etc. in Android?

2018-07-19 Thread Trajce Nikolov NICK
Hi,

http://forum.openscenegraph.org/viewtopic.php?t=11390

Chris is explaining well here. Hope it helps

Cheers,
Nick

On Thu, Jul 19, 2018 at 12:09 PM Daniel Ponsoda  wrote:

> Hi,
>
> I'm playing with the OSG sample code for Android (GLES2) and as I see, it
> attaches user defined GLSL shaders to the drawable objects in order to
> display them with the proper shading effects.
>
> Is it not possible to use the OSG API Objects such as Material, Color,
> LightSource etc. when programming for Android?
>
> I tried them but all I get is plain color shapes for my 3d objects with no
> shading effects at all as we can see in the PC version of the sample code.
>
> I tried this code (scene draws shaded on Windows, but with plain colors on
> Android):
>
>
> Code:
>
> // Create a light source
> osg::LightSource ls = new LightSource;
> ls->getLight()->setPosition(Vec4(10, 10, 20, 0));
> ls->getLight()->setAmbient(Vec4(0.2, 0.2, 0.2, 1.0));
> ls->getLight()->setDiffuse(Vec4(0.7, 0.4, 0.6, 1.0));
> ls->getLight()->setSpecular(Vec4(1.0, 1.0, 1.0, 1.0));
> root->addChild(ls.get());
>
> // Create a sphere
> ShapeDrawable* sphere = new ShapeDrawable(new Sphere(Vec3f(0, 0, 0), 2));
> Material *material = new Material();
> material->setDiffuse(Material::FRONT, Vec4(0, 1, 0, 1));
> sphere->getOrCreateStateSet()->setAttribute(material);
>
>
>
>
> Is there a portable way to do this in Android?
>
> Thank you!
>
> Cheers,
> Daniel[/code]
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74361#74361
>
>
>
>
>
> ___________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


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


Re: [osg-users] osgUtil Delaunay and a bit complex intersecting constraints

2018-07-10 Thread Trajce Nikolov NICK
Hi Robert,

thanks for the fast reply. And I agree with you.

My call was more for those in the community that have experience with this
and are willing to share. In the last couple of years I worked with
commercial software (at least two big names, like Oktal, TrianGraphics) and
the core for their products is OSG and their work is just something (at
least to some small degree) I am after. I know, this might be naive to
expect from someone to give hints from their IP, but you never know.

Also, I am in a role of consultant for this so there might be a budget
(?-really can not say at this moment), to have some stable light-weight osg
constrained triangulation. I like it as is, really, simple thin interface,
just a bit complex to chase bugs in there :-) 

I think this topic will be actuall in the next couple of months.

Thanks anyway !

Nick

On Tue, Jul 10, 2018 at 1:17 PM Robert Osfield 
wrote:

> Hi Nick,
>
> I regret merging the osgUtil::DelaunayTriangulator submission all
> those years back.  While it comes close to working OK it just isn't
> robust enough and making it robust will require support for a robust
> incircle/same side test that isn't trivial to implement, and require
> some novel tricks that aren't appropriate for a general purpose scene
> graph project.  Go research robust-predicate.
>
> So if the osgUtil::DelaunayTriangulator works for you as is great, but
> if it doesn't it's not something I'm going to spend my time on trying
> to help you through it as I think it's a dead end.  My recommendation
> would be to use a dedicated 3rd party library to do the triangulation
> and handling of constraints.
>
> Robert.
> On Tue, 10 Jul 2018 at 12:06, Trajce Nikolov NICK
>  wrote:
> >
> > Hi Community,
> >
> > over the last 2 years I was working for a client on prototyping
> integrating road network into terrains and I did it with the Delaunay
> triangulation available in OSG, and for simple test demo cases is working
> fine (if you are curious here some video
> https://www.dropbox.com/s/jlwbzs00pv4ifur/TerrainTool-4.mp4?dl=0 ).
> >
> > Now on the same topic again, and it is for real apps (OSG based) not
> prototyping. And I need error free constrained triangulation. The one in
> OSG gives me results like in the attached images (holes etc). I tried to
> look at this CGAL lib but found it over-complicated (for me) to use and I
> do prefer to stick with what we have in OSG. Anyone with some hints on
> maybe how to work with complex constraints and osg delaunay? My code is
> based on the depricated osgdelaunay example. Maybe something extra? Any
> word will help!
> >
> > Thanks a bunch as always!
> >
> > Cheers,
> > Nick
> >
> > --
> > trajce nikolov nick
> > ___
> > 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
>


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


Re: [osg-users] osgDB XmlParser and localization

2018-07-09 Thread Trajce Nikolov NICK
Hi again Robert,

fast hint: The nodes to be parsed are root->osm->node->tag and their
properties contains these non asci codes. But probably fastest is to write
recursive parser

Thanks again

On Mon, Jul 9, 2018 at 1:54 PM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Thanks so much Robert !!! Attached is the file
>
>
>
> On Mon, Jul 9, 2018 at 1:50 PM Robert Osfield 
> wrote:
>
>> Hi Nick,
>>
>> On Mon, 9 Jul 2018 at 12:26, Trajce Nikolov NICK
>>  wrote:
>> > >   are changes for changes sake rather than likely to make any
>> > functional difference
>> >
>> > I knew you will have comments ;-). It works just fine with these
>> changes but yes, you are right - quick and somewhat dirty. So can you look
>> at it or you want to do a ping-pong code review with my changes by your
>> advice? :-)
>>
>> I might be quicker just to provide a link to or attach an xml file
>> that causes problem with the present parser, and then I can look at
>> what happens when the present code encounters it, and how your changes
>> affect things.
>>
>> As a general note, PRs/commits should be focused on addressing one
>> issue at a time, so bundling a fix for a specific bug along with other
>> cosmetic or other changes just confuses what is functional and what is
>> not.  It's not uncommon to have to go back to various revisions in
>> code to see where regressions may have occurred so having commits that
>> just wrap up a small set of associated changes is really helpful in
>> identifying what has been changed and why.
>>
>> Robert.
>> ___________
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
> --
> trajce nikolov nick
>


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


Re: [osg-users] osgDB XmlParser and localization

2018-07-09 Thread Trajce Nikolov NICK
hi Robert,

>   are changes for changes sake rather than likely to make any
functional difference

I knew you will have comments ;-). It works just fine with these changes
but yes, you are right - quick and somewhat dirty. So can you look at it or
you want to do a ping-pong code review with my changes by your advice? :-)

Please let me know

Nick

On Mon, Jul 9, 2018 at 1:09 PM Robert Osfield 
wrote:

> Hi Nick,
>
> I had a quick look at your changes and it seems to be like most of
> them are changes for changes sake rather than likely to make any
> functional difference.  For non ascii char support I think what you'd
> actually want to do is change the XmllNode::Input::string _buffer
> member var to a std::vector _buffer, and have the
> Input::readAllDataIntoBuffer() method be adapted to read the file
> accepting only chars greater than 0 rather than limiting to the ascii
> 0 to 255 range.
>
> Robert.
> On Mon, 9 Jul 2018 at 11:41, Trajce Nikolov NICK
>  wrote:
> >
> > Hi Robert,
> >
> > I am working with some localized XML files (with chars out of 0-255
> range) and at present the XML Node parsing is not suitable to manage it.
> And I think the support for is important - at my case it is OpenStreetMap
> with street names containing these chars.
> >
> > Attached is the modified source (based on the master) that fixes ity, if
> you have time and will to review. I can do PR if you want
> >
> > Thanks and cheers!
> >
> > Nick
> >
> > p.s. welcome back
> >
> > --
> > trajce nikolov nick
> > ___
> > 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
>


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


[osg-users] osgDB XmlParser and localization

2018-07-09 Thread Trajce Nikolov NICK
Hi Robert,

I am working with some localized XML files (with chars out of 0-255 range)
and at present the XML Node parsing is not suitable to manage it. And I
think the support for is important - at my case it is OpenStreetMap with
street names containing these chars.

Attached is the modified source (based on the master) that fixes ity, if
you have time and will to review. I can do PR if you want

Thanks and cheers!

Nick

p.s. welcome back

-- 
trajce nikolov nick
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
 *
 * This library is open source and may be redistributed and/or modified under
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * OpenSceneGraph Public License for more details.
*/

#include 
#include 

#include 

using namespace osgDB;

XmlNode* osgDB::readXmlFile(const std::string& filename,const Options* options)
{
std::string foundFile = osgDB::findDataFile(filename, options);
if (!foundFile.empty())
{
XmlNode::Input input;
input.open(foundFile);
input.readAllDataIntoBuffer();

if (!input)
{
OSG_NOTICE<<"Could not open XML file: "< root = new XmlNode;
root->read(input);

return root.release();
}
else
{
OSG_NOTICE<<"Could not find XML file: "< root = new XmlNode;
root->read(input);

return root.release();
}

XmlNode::ControlMap::ControlMap()
{
setUpControlMappings();
}

void XmlNode::ControlMap::addControlToCharacter(const std::string& control, int 
c)
{
_controlToCharacterMap[control] = c;
_characterToControlMap[c] = control;
}

void XmlNode::ControlMap::setUpControlMappings()
{
addControlToCharacter("",'&');
addControlToCharacter("",'<');
addControlToCharacter("",'>');
addControlToCharacter("",'"');
addControlToCharacter("",'\'');
addControlToCharacter("",'\n');
}

XmlNode::Input::Input():
_currentPos(0)
{
}

XmlNode::Input::Input(const Input&):
ControlMap(),
_currentPos(0)
{
}

XmlNode::Input::~Input()
{
}
void XmlNode::Input::open(const std::string& filename)
{
_fin.open(filename.c_str());
}

void XmlNode::Input::attach(std::istream& fin)
{
std::ios  = _fin;
fios.rdbuf(fin.rdbuf());
}

void XmlNode::Input::readAllDataIntoBuffer()
{
while(_fin)
{
int c = _fin.get();
//if (c>=0 && c<=255)
{
_buffer.push_back(c);
}
}
}

void XmlNode::Input::skipWhiteSpace()
{
while(_currentPos<_buffer.size() && (_buffer[_currentPos]==' ' || 
_buffer[_currentPos]=='\t' || _buffer[_currentPos]=='\n' || 
_buffer[_currentPos]=='\r'))
{

//OSG_NOTICE<<"_currentPos="<<_currentPos<<"_buffer.size()="<<_buffer.size()<<" 
v="<type = XmlNode::COMMENT;
children.push_back(commentNode);

input += 4;
XmlNode::Input::size_type end = input.find("-->");
commentNode->contents = input.substr(0, end);
if (end!=std::string::npos)
{
OSG_INFO<<"Valid Comment record 
["<contents<<"]"<contents<<"]"<");
std::string comment = input.substr(0, end);
if (end!=std::string::npos)
{
OSG_INFO<<"Valid end tag ["<type = XmlNode::INFORMATION;
children.push_back(commentNode);

++input;
XmlNode::Input::size_type end = input.find(">");
commentNode->contents = input.substr(0, end);
if (end!=std::string::npos)
{
OSG_INFO<<"Valid information record 
["<contents<<"]"<contents<<"]"<type = XmlNode::INFORMATION;
children.push_back(commentNode);

input += 9;
XmlNode::Input::size_type end = input.find("]]>");
commentNode->contents = input.substr(0, end);
if (end!=std::string::npos)
{
OSG_INFO<<"Valid information record 
["<contents<<"]"<contents<<"]"<type = XmlNode::INFORMATION;
children.push_back(commentNode);

input += 2;
XmlNode::Input::size_type end = input.find("?>");
commentNode->

[osg-users] projecting a model to geocentric

2018-03-27 Thread Trajce Nikolov NICK
Hi Community,

I am trying to project a model (like a runway) on curved geocentric (ECEF)
shape. Here is the snippet what I do on the model vertices (xforms,
lightpoints etc). But it is wrong :/ .. Anyone can spot something unobvious?

https://pastebin.com/snJyQZ09

Thanks a bunch as always!

Cheers,
Nick

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


Re: [osg-users] sign language avatar with osg

2018-03-16 Thread Trajce Nikolov NICK
Thanks Richard, Jan,

indeed, there is a lot of research to be done for this. I have done some
consultancy in of the the CS UNI in Macedonia with teachers who tried this
in the past so there are already some insights. I would see the first
simple app on mobile device, something like an app that will teach the sign
alphabet only ... For real translator it will take some time. And thanks
again Richard, I will ping you for sure on this...

Cheers and thanks
Nick

On Mon, Mar 12, 2018 at 12:32 PM, Richard Kennaway <rich...@kennaway.org.uk>
wrote:

> On Sun, March 11, 2018 8:18 pm, Trajce Nikolov NICK wrote:
> > Hello Community,
> >
> >
> > I carry this idea with me from my UNI days (which is about 20 years ago)
> > and since recent it was just an idea. Over time it was even close to get
> > some funding but it did not happen.
> >
> > The idea is to have virtual 3D avatar that can "speak" the sign language
> > based on text or voice input. The recent technology from Google made the
> > realization of  the language translation doable.
> >
> > So I am here to ask you if someone might be interested in actually make
> > this happen. I personally work with an artist (friend of mine, decades of
> > friendship, also worked together on various projects). And we want to do
> > this opensource, based on OSG.
> >
> > All suggestions, brainstorms, hints, anything, are highly welcome!
>
> I did some work on signing avatars 10 to 20 years ago, in an academic
> context. In fact, several of the first page of hits for the Google search
> that Jan Ciger posted refer to that project (Virtual Humans at UEA).
>
> My own role in that was to create software to turn signing transcriptions
> written in an avatar-independent notation into animation data for driving
> any humanoid avatar, in real time. Feel free to email me for more
> information if this sounds relevant to what you have in mind. My
> publications on this can be found through ResearchGate or Google Scholar.
> As Jan says, there has been a large amount of work on this, by other
> groups as well, although it seems to me that none of it has really taken
> off. Perhaps because it is a very niche application. The demand would be
> primarily from the pre-lingually deaf, i.e., those for whom signing is
> their first language. With all respect to that population, it is a very
> small one.
>
> Personally, I would be more interested in extending my work to do
> procedural animation of more general sorts of movement, but I've haven't
> done anything substantial on that.
>
> --
> Richard Kennaway
> John Innes Centre and University of East Anglia
> Norwich, U.K.
>
> _______
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


[osg-users] sign language avatar with osg

2018-03-11 Thread Trajce Nikolov NICK
Hello Community,

I carry this idea with me from my UNI days (which is about 20 years ago)
and since recent it was just an idea. Over time it was even close to get
some funding but it did not happen.

The idea is to have virtual 3D avatar that can "speak" the sign language
based on text or voice input. The recent technology from Google made the
realization of  the language translation doable.

So I am here to ask you if someone might be interested in actually make
this happen. I personally work with an artist (friend of mine, decades of
friendship, also worked together on various projects). And we want to do
this opensource, based on OSG.

All suggestions, brainstorms, hints, anything, are highly welcome!

Cheers,
Nick

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


[osg-users] osg and the latest android ndk 27

2018-03-09 Thread Trajce Nikolov NICK
Hi community,

I did this years ago and now I am on it again - osg on android. Anyone
succeeded to configure and compile osg with ndk 27? If so, what is the
cmake command?

Thanks a bunch as always

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


Re: [osg-users] osg::Node can not be displayed front of the Earth on the screen

2018-03-02 Thread Trajce Nikolov NICK
if you need to draw anything on the center of the screen in front of
something else, then your problem is to create an ortho camera and have
your geometry there - something like HUD. The osghud example shows how to
do this. Just for a test, you can use the createHUD() function from that
sample to create your screen geometry in front of the osgEarth globe

On Fri, Mar 2, 2018 at 4:23 PM, Ali Ozdin <alinailoz...@gmail.com> wrote:

> I could not relate the example with my question. I am using osgEarth.
> Can you be more expressive what causes this?
>
> Thanks,
>
>
> Trajce Nikolov NICK wrote:
> > Hi Ali,
> >
> > have a look at the osghud example from the osg repo
> >
> >
> > On Fri, Mar 2, 2018 at 1:44 PM, Ali Ozdin < ()> wrote:
> >
> > > Hi,
> > >
> > > I drew an osg Node and I want to put it on the center of the screen
> like any labelControl. How can I do that? I put a sample code below.
> > >
> > > If I change the line from
> > >
> > > Code:
> > > viewer.setSceneData( mainGroup );
> > >
> > >  to
> > > Code:
> > > viewer.setSceneData( nn.get() );
> > >
> > >
> > > and remove these two lines
> > >
> > > Code:
> > > manipulator = new EarthManipulator(  arguments );
> > > viewer.setCameraManipulator( manipulator );
> > >
> > >
> > >
> > > I am only able to see the geometry which I draw. However if I
> setSceneData as mapNode and geometry which are in "mainGroup" and if my
> camera manipulator is EarthManipulator; I am only able to see the earth.
> > > To sum up, I want to see the earth in the back and I want to put my
> geometry front of the earth and on the center of the screen.
> > >
> > >
> > >
> > >
> > > Code:
> > > osg::ref_ptr createSceneGraph()
> > > {
> > > osg::ref_ptr geom = new osg::Geometry;
> > > osg::ref_ptr v = new osg::Vec3Array;
> > > geom->setVertexArray( v.get() );
> > >
> > > //horizontal
> > > v->push_back( osg::Vec3( -1.f, 1.f, 0.f ) );
> > > v->push_back( osg::Vec3( -0.6f, 1.f, 0.f ) );
> > > v->push_back( osg::Vec3( -0.4f, 1.f, 0.f ) );
> > > v->push_back( osg::Vec3( 0.f, 1.f, 0.f ) );
> > >
> > > //vertical
> > > v->push_back( osg::Vec3( -0.5f, 1.f, 0.5f ) );
> > > v->push_back( osg::Vec3( -0.5f, 1.f, 0.1f ) );
> > > v->push_back( osg::Vec3( -0.5f, 1.f, -0.5f ) );
> > > v->push_back( osg::Vec3( -0.5f, 1.f, -0.1f ) );
> > >
> > >
> > > osg::ref_ptr c = new osg::Vec4Array;
> > > geom->setColorArray( c.get() );
> > > geom->setColorBinding( osg::Geometry::BIND_OVERALL );
> > > c->push_back( osg::Vec4( 1.f, 1.f, 1.f, 1.f ) );
> > >
> > > osg::ref_ptr n = new osg::Vec3Array;
> > > geom->setNormalArray( n.get() );
> > > geom->setNormalBinding( osg::Geometry::BIND_OVERALL );
> > > n->push_back( osg::Vec3( 0.f, -1.f, 0.f ) );
> > >
> > > osg::LineWidth* linewdth = new osg::LineWidth();
> > > linewdth->setWidth(25.0);
> > > geom->getOrCreateStateSet()->setAttributeAndModes( linewdth,
> osg::StateAttribute::ON ) ;
> > > geom->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::LINES,
> 0, 8 ) );
> > >
> > > osg::ref_ptr geode = new osg::Geode;
> > > geode->addDrawable( geom.get() );
> > > return geode.get();
> > > }
> > >
> > > int main(int argc, char** argv)
> > > {
> > > osg::ArgumentParser arguments(,argv);
> > > viewer.setUpViewInWindow(100,100,500,500);
> > > viewer.getDatabasePager()->setUnrefImageDataAfterApplyPolicy( true,
> false );
> > > osgDB::Registry::instance()->getObjectWrapperManager()->
> findWrapper("osg::Image");
> > > manipulator = new EarthManipulator( arguments );
> > > viewer.setCameraManipulator( manipulator );
> > >
> > > osg::Group* mainGroup = new osg::Group();
> > > osg::Group* group = MapNodeHelper().load(arguments, );
> > > osg::ref_ptr nn = createSceneGraph();
> > >
> > > mainGroup->addChild(nn.get());
> > > mainGroup->addChild(group);
> > >
> > > viewer.setSceneData( mainGroup );
> > > viewer.run();
> > > }
> > >
> > >
> > >
> > > Thank you!
> > >
> > > Cheers,
> > > Ali
> > >
> > > --
> > &g

Re: [osg-users] osg::Node can not be displayed front of the Earth on the screen

2018-03-02 Thread Trajce Nikolov NICK
Hi Ali,

have a look at the osghud example from the osg repo

On Fri, Mar 2, 2018 at 1:44 PM, Ali Ozdin <alinailoz...@gmail.com> wrote:

> Hi,
>
> I drew an osg Node and I want to put it on the center of the screen like
> any labelControl. How can I do that? I put a sample code below.
>
> If I change the line from
>
> Code:
> viewer.setSceneData( mainGroup );
>
>  to
> Code:
> viewer.setSceneData( nn.get() );
>
>
> and remove these two lines
>
> Code:
> manipulator = new EarthManipulator(  arguments );
> viewer.setCameraManipulator( manipulator );
>
>
>
> I am only able to see the geometry which I draw. However if I setSceneData
> as mapNode and geometry which are in "mainGroup" and if my camera
> manipulator is EarthManipulator; I am only able to see the earth.
> To sum up, I want to see the earth in the back and I want to put my
> geometry front of the earth and on the center of the screen.
>
>
>
>
> Code:
> osg::ref_ptr createSceneGraph()
> {
> osg::ref_ptr geom = new osg::Geometry;
> osg::ref_ptr v = new osg::Vec3Array;
> geom->setVertexArray( v.get() );
>
> //horizontal
> v->push_back( osg::Vec3( -1.f, 1.f, 0.f ) );
> v->push_back( osg::Vec3( -0.6f, 1.f, 0.f ) );
> v->push_back( osg::Vec3( -0.4f, 1.f, 0.f ) );
> v->push_back( osg::Vec3( 0.f, 1.f, 0.f ) );
>
> //vertical
> v->push_back( osg::Vec3( -0.5f, 1.f, 0.5f ) );
> v->push_back( osg::Vec3( -0.5f, 1.f, 0.1f ) );
> v->push_back( osg::Vec3( -0.5f, 1.f, -0.5f ) );
> v->push_back( osg::Vec3( -0.5f, 1.f, -0.1f ) );
>
>
> osg::ref_ptr c = new osg::Vec4Array;
> geom->setColorArray( c.get() );
> geom->setColorBinding( osg::Geometry::BIND_OVERALL );
> c->push_back( osg::Vec4( 1.f, 1.f, 1.f, 1.f ) );
>
> osg::ref_ptr n = new osg::Vec3Array;
> geom->setNormalArray( n.get() );
> geom->setNormalBinding( osg::Geometry::BIND_OVERALL );
> n->push_back( osg::Vec3( 0.f, -1.f, 0.f ) );
>
> osg::LineWidth* linewdth = new osg::LineWidth();
> linewdth->setWidth(25.0);
> geom->getOrCreateStateSet()->setAttributeAndModes( linewdth,
> osg::StateAttribute::ON ) ;
> geom->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::LINES, 0, 8
> ) );
>
> osg::ref_ptr geode = new osg::Geode;
> geode->addDrawable( geom.get() );
> return geode.get();
> }
>
> int main(int argc, char** argv)
> {
> osg::ArgumentParser arguments(,argv);
> viewer.setUpViewInWindow(100,100,500,500);
> viewer.getDatabasePager()->setUnrefImageDataAfterApplyPolicy( true, false
> );
> osgDB::Registry::instance()->getObjectWrapperManager()->
> findWrapper("osg::Image");
> manipulator = new EarthManipulator( arguments );
> viewer.setCameraManipulator( manipulator );
>
> osg::Group* mainGroup = new osg::Group();
> osg::Group* group = MapNodeHelper().load(arguments, );
> osg::ref_ptr nn = createSceneGraph();
>
> mainGroup->addChild(nn.get());
> mainGroup->addChild(group);
>
> viewer.setSceneData( mainGroup );
> viewer.run();
> }
>
>
>
> Thank you!
>
> Cheers,
> Ali
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72998#72998
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


Re: [osg-users] Loading a SilverLining environment map into an OpenSceneGraph texture

2018-02-16 Thread Trajce Nikolov NICK
Hi,

you can get inspiration from the OpenIG project (http://openig.compro.net)
, there is a SilverLining plugin (
https://github.com/CCSI-CSSI/MuseOpenIG/tree/master/Plugin-SilverLining)
with reflections working together with Triton

On Thu, Feb 15, 2018 at 3:51 PM, Chris Hardy <hardy...@gmail.com> wrote:

> It turns out this is pretty easy, I just made a couple of silly
> uncaffeinated mistakes. In case anyone gets stuck in the same hole, all you
> have to do is create your own TextureObject and assign it to the
> TextureCubeMap.
>
> Perhaps there are some finer details missing in this solution but the
> output on the screen is at least accurate to what I want for the moment.
>
>
> Code:
>
> unsigned int handle;
> void* ptr = 
> atm->GetEnvironmentMap(ptr, 6);
>
> osg::TextureCubeMap* hdrEnvMap = new osg::TextureCubeMap;
> osg::Texture::TextureObject* textureObject = new
> osg::Texture::TextureObject(hdrEnvMap, (GLuint)ptr, GL_TEXTURE_CUBE_MAP);
> hdrEnvMap->setTextureObject(camera->getGraphicsContext()->getState()->getContextID(),
> textureObject);
>
>
>
>
> My reflections are the wrong way around but that's my own problem I
> suppose. :P
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72962#72962
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


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


[osg-users] DatabasePager insights

2018-02-12 Thread Trajce Nikolov NICK
Hi Robert,

I havn't yet read the code completely and I want to ask if you can write
word or two how this is working under the hood with PagedLODs - it will
help me (and I believe the community as well) a lot to understand the code
I will read.

Thanks a bunch as always!

Cheers,
Nick

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


Re: [osg-users] removing texture from stateset

2018-01-14 Thread Trajce Nikolov NICK
Hi Julien,

yes, removeTextureAttribute did the job. Thanks a bunch!!!  I should have
consulted the header too

Cheers,
Nick

On Sat, Jan 13, 2018 at 10:02 PM, Julien Valentin <
julienvalenti...@gmail.com> wrote:

> oups i post too fast
> I wanted to write
>
> Code:
> StateSet::removeTextureAttribute(unit,texatt)
>
>
>
>
> mp3butcher wrote:
> > Hi Nickolov
> > use
> >
> > Code:
> > StateSet::removeTextureAttribute(unit,texatt)
> >
> >
> > to remove a texture.
> > Moreover when you erase you iterator it invalidates it ...so don't do
> like this
> >
> > Cheers
> >
> >
> >
> > Trajce Nikolov NICK wrote:
> > > Hi Community,
> > >
> > > this should be simple, but I can not make it work. I have ive file
> with embedded texture and it is big file. All I want is to remove the
> texture and save it back. When I do this with the code bellow, and save the
> file, the file is not changing it's size. Any clue/hint?
> > >
> > >
> > > Thanks a bunch as always
> > >
> > >
> > > Nick
> > >
> > >
> > > code
> > > struct RemoveTextureVisitor : public osg::NodeVisitor
> > > {
> > > RemoveTextureVisitor()
> > > : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_
> CHILDREN)
> > > {
> > > }
> > >
> > >
> > > virtual void apply(osg::Node& node)
> > > {
> > > osg::ref_ptr ss = node.getStateSet();
> > > if (ss.valid())
> > > {
> > > osg::StateSet::AttributeList& attrs =
> ss->getAttributeList();
> > > osg::StateSet::AttributeList::iterator itr =
> attrs.begin();
> > > for (; itr != attrs.end(); ++itr)
> > > {
> > > const osg::StateSet::RefAttributePair&
> attrp = itr->second;
> > > const osg::ref_ptr&
> attr = attrp.first;
> > >
> > >
> > >     osg::ref_ptr texture =
> dynamic_cast<osg::Texture2D*>(attr.get());
> > > if (texture.valid())
> > > {
> > > attrs.erase(itr);
> > > break;
> > > }
> > >     }
> > > }
> > >
> > >
> > > traverse(node);
> > > }
> > > };
> > >
> > >
> > > --
> > > trajce nikolov nick
> > >
> > >  --
> > > Post generated by Mail2Forum
> >
>
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72751#72751
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


[osg-users] removing texture from stateset

2018-01-13 Thread Trajce Nikolov NICK
Hi Community,

this should be simple, but I can not make it work. I have ive file with
embedded texture and it is big file. All I want is to remove the texture
and save it back. When I do this with the code bellow, and save the file,
the file is not changing it's size. Any clue/hint?

Thanks a bunch as always

Nick

code
struct RemoveTextureVisitor : public osg::NodeVisitor
{
RemoveTextureVisitor()
: osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN)
{
}

virtual void apply(osg::Node& node)
{
osg::ref_ptr ss = node.getStateSet();
if (ss.valid())
{
osg::StateSet::AttributeList& attrs = ss->getAttributeList();
osg::StateSet::AttributeList::iterator itr = attrs.begin();
for (; itr != attrs.end(); ++itr)
{
const osg::StateSet::RefAttributePair& attrp = itr->second;
const osg::ref_ptr& attr = attrp.first;

osg::ref_ptr texture =
dynamic_cast<osg::Texture2D*>(attr.get());
if (texture.valid())
{
attrs.erase(itr);
break;
}
}
}

traverse(node);
}
};

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


Re: [osg-users] Link error while build plugins

2018-01-11 Thread Trajce Nikolov NICK
Hi,

I think you should link against gdal_i.lib as I can recall. There are two
gdal libs in some of the 3rd party packages

On Thu, Jan 11, 2018 at 12:46 PM, Julien Valentin <
julienvalenti...@gmail.com> wrote:

> Hi,
> You seams to have problem building gdal plugin...
> Which version of osg are you building?
> What 3rdParty package do you use?
> (if you're using min depends package perhaps it lacks some libs...)
> Cheers
>
>
> gabriella seth wrote:
> > Hi every:
> >
> >
> > There are some link error while build the plugins:
> >
> > It somelike Microsoft ODBC, my system is win10 64bit/msvc 2013.
> > What should i do?
> >
> >
> > Jieqian
> > 2018/1/8
> >
> >  --
> > Post generated by Mail2Forum
>
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72727#72727
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


Re: [osg-users] osgUtil::IntersectionVisitor eats all the memory

2018-01-09 Thread Trajce Nikolov NICK
Thanks Robert,

no circular reference since I am displaying that database in the viewer
nicely. Here is the struct (a bit odd but it is as is):

Group
|
PagedLOD PagedLOD PagedLOD  dozen of these
|
Quadtree (similar to VPB generated subtiles)

I was thinking the visitor is reading all of these by reading all of these
PagedLODs without taking the account the range from the eyepoint. So while
debuging I tried this:

struct MyIntersectionVisitor : public osgUtil::IntersectionVisitor
{
MyIntersectionVisitor(float range)
: IntersectionVisitor()
, _range(range)
{
}

virtual void apply(osg::PagedLOD& plod)
{
if (getDistanceFromEyePoint(plod.getCenter(), true) < _range)
{
osgUtil::IntersectionVisitor::apply(plod);
}
}

protected:
float _range;
};

but no luck. Is there a way to  flush all the pending and loaded nodes from
the DatabasePager?

On Tue, Jan 9, 2018 at 1:23 PM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Nick,
>
> This is really something you'd want to use a debug for - just run it
> and break the app before anything untoward happens.
>
> The code itself looks quite benign on a first reading, the only thing
> I can think of that might cause a memory issue would be if your scene
> graph had a circular reference in it so the traversal ends up in an
> infinite loop.
>
> Robert
>
> On 9 January 2018 at 12:12, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> > hi Robert, Community,
> >
> > I have the following code in a loop against very large quadtree based
> > database. And this code is eating all the memory, progressively and then
> the
> > system kills it . Any clue?
> >
> > Thanks a lot
> >
> > osg::ref_ptr picker;
> > osg::ref_ptr iv;
> >
> > osg::Vec3d getHOT(const osg::Vec3d& position, osgViewer::CompositeViewer&
> > viewer, osg::Vec3& normal, bool& valid)
> > {
> > osg::Vec3d result;
> >
> > osg::EllipsoidModel em;
> > osg::Vec3d up = em.computeLocalUpVector(position.x(), position.y(),
> > position.z());
> > up.normalize();
> >
> > osg::Vec3d s = position + up * 100;
> > osg::Vec3d e = osg::Vec3d(0, 0, 0);
> >
> > if (viewer.getView(0)->getSceneData())
> > {
> > #if 1
> > if (!picker.valid())
> > {
> > picker = new osgUtil::LineSegmentIntersector(s,e);
> > iv = new  MyIntersectionVisitor(RANGE);
> > }
> > picker->setStart(s);
> > picker->setEnd(e);
> > picker->getIntersections().clear();
> > iv->setIntersector(picker);
> > iv->reset();
> > iv->setUseKdTreeWhenAvailable(false);
> > //iv->setLODSelectionMode(osgUtil::IntersectionVisitor::
> USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION);
> > viewer.getView(0)->getSceneData()->accept(*iv);
> >
> > if (picker->containsIntersections())
> > {
> > osgUtil::LineSegmentIntersector::Intersections       hitList =
> > picker->getIntersections();
> > osgUtil::LineSegmentIntersector::Intersections::iterator hit =
> > hitList.begin();
> >
> > result = hit->getWorldIntersectPoint();
> > normal = hit->getWorldIntersectNormal();
> > valid = true;
> >
> > return result;
> > }
> > #endif
> > }
> > valid = false;
> >
> > return result;
> > }
> >
> > --
> > trajce nikolov nick
> >
> > ___
> > 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
>



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


[osg-users] osgUtil::IntersectionVisitor eats all the memory

2018-01-09 Thread Trajce Nikolov NICK
hi Robert, Community,

I have the following code in a loop against very large quadtree based
database. And this code is eating all the memory, progressively and then
the system kills it . Any clue?

Thanks a lot

osg::ref_ptr picker;
osg::ref_ptr iv;

osg::Vec3d getHOT(const osg::Vec3d& position, osgViewer::CompositeViewer&
viewer, osg::Vec3& normal, bool& valid)
{
osg::Vec3d result;

osg::EllipsoidModel em;
osg::Vec3d up = em.computeLocalUpVector(position.x(), position.y(),
position.z());
up.normalize();

osg::Vec3d s = position + up * 100;
osg::Vec3d e = osg::Vec3d(0, 0, 0);

if (viewer.getView(0)->getSceneData())
{
#if 1
if (!picker.valid())
{
picker = new osgUtil::LineSegmentIntersector(s,e);
iv = new  MyIntersectionVisitor(RANGE);
}
picker->setStart(s);
picker->setEnd(e);
picker->getIntersections().clear();
iv->setIntersector(picker);
iv->reset();
iv->setUseKdTreeWhenAvailable(false);
//iv->setLODSelectionMode(osgUtil::IntersectionVisitor::USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION);
viewer.getView(0)->getSceneData()->accept(*iv);

if (picker->containsIntersections())
{
osgUtil::LineSegmentIntersector::Intersections   hitList =
picker->getIntersections();
osgUtil::LineSegmentIntersector::Intersections::iterator hit =
hitList.begin();

result = hit->getWorldIntersectPoint();
normal = hit->getWorldIntersectNormal();
valid = true;

return result;
}
#endif
}
valid = false;

return result;
}

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


[osg-users] FBO setup failed

2017-12-22 Thread Trajce Nikolov NICK
Hi Robert, Community,

I have dozen of these

RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cd6
ContextData::incrementContextIDUsageCount(0) to 12

My setup is two Views sharing a scene, with dozen of cameras rendering to a
common texture array. What this means?

Thanks a bunch as always!

And Merry XMas
-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kmz files

2017-12-22 Thread Trajce Nikolov NICK
Thanks Jeff

On Fri, Dec 22, 2017 at 6:23 PM, Jeff Biggs <o...@simperative.com> wrote:

>
> Nick,
>
> I have used osgEarth to digest KML, Not sure if it will read the
> compressed KMZ form though.  osgEarth then parses the XML and I believe
> that it will read the collada (dae) file as long as the plugin has been
> built.
>
> https://github.com/gwaldron/osgearth/blob/master/src/
> osgEarthDrivers/kml/KML
>
> jeff
>
>
>
> On 12/22/17 10:58 AM, Trajce Nikolov NICK wrote:
>
> Hi Community,
>
> there was a tool called kmzconvert that suppose to convert kmz files to
> ive/osg. Anyone knows where can I get it? Or is there another way to have
> kmz files in OSG?
>
> Thanks a bunch!
>
> Nick
>
> --
> trajce nikolov nick
>
>
> ___
> osg-users mailing 
> listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
> --
> Jeff Biggs
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


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


[osg-users] kmz files

2017-12-22 Thread Trajce Nikolov NICK
Hi Community,

there was a tool called kmzconvert that suppose to convert kmz files to
ive/osg. Anyone knows where can I get it? Or is there another way to have
kmz files in OSG?

Thanks a bunch!

Nick

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


Re: [osg-users] osg and web

2017-12-13 Thread Trajce Nikolov NICK
Thanks Michael, that's it !!!

On Wed, Dec 13, 2017 at 3:43 PM, michael kapelko <korn...@gmail.com> wrote:

> Hi.
>
> Do you mean OpenSceneGraph in a web browser? If so, here's the guide:
> https://github.com/OGStudio/openscenegraph-cross-platform-
> guide/tree/master/1.10.SampleWeb
>
> On 13 December 2017 at 13:01, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> > Hi Community,
> >
> > I would like to learn about this technology and what is involved, how it
> > works along with osg. Any links, hints etc.?
> >
> > Thanks a bunch as always
> >
> > Nick
> >
> > --
> > trajce nikolov nick
> >
> > ___
> > 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
>



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


[osg-users] osg and web

2017-12-13 Thread Trajce Nikolov NICK
Hi Community,

I would like to learn about this technology and what is involved, how it
works along with osg. Any links, hints etc.?

Thanks a bunch as always

Nick

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


Re: [osg-users] dynamic cube map

2017-12-11 Thread Trajce Nikolov NICK
Hi Romulo,

more proper example is osgprerendercubemap - how to setup the RTT for
cubemaps. Then you can have a look again in the OpenIG project, in the
Triton plugin, line 70 - 114, that is the shader to generate HeighMap, for
your case instead of the world Z you put in the output Z from the camera
(the depth), and same for the normals. Here is the link for the code
snippet:

https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Plugin-Triton/IGPluginTriton.cpp

good luck ;-)

On Mon, Dec 11, 2017 at 8:19 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Romulo,
>
> I guess you should do a render to texture and make sure the texture format
> is with texels as floating points. Then custom shaders that will render
> normals and depths into these textures.
>
> I am on travel at the moment will help you more when I get back. Meanwhile
> you can do research. Start with the osgprerender example
>
> On Dec 11, 2017 7:13 PM, "Rômulo Cerqueira" <romulogcerque...@gmail.com>
> wrote:
>
>> Hi Nick,
>>
>> how can I encode the normal and depth data in the env texture?
>>
>> ...
>>
>> Thank you!
>>
>> Cheers,
>> Rômulo
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=72565#72565
>>
>>
>>
>>
>>
>> ___________
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>


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


Re: [osg-users] How to Save and Load the current scene graph data ?

2017-12-11 Thread Trajce Nikolov NICK
osgDB::writeNodeFile/readNodeFile

On Dec 11, 2017 6:50 PM, "Jishen Li"  wrote:

> Hi,
>
> If there a way to save the current scene graph data into disk and later
> load it in a different computer to restore it ?
>
> I tried google it a little bit, but didn't find good solution.
>
> ...
>
> Thank you!
>
> Cheers,
> Jishen
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72564#72564
>
>
>
>
>
> ___
> 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] dynamic cube map

2017-12-11 Thread Trajce Nikolov NICK
Hi Romulo,

I guess you should do a render to texture and make sure the texture format
is with texels as floating points. Then custom shaders that will render
normals and depths into these textures.

I am on travel at the moment will help you more when I get back. Meanwhile
you can do research. Start with the osgprerender example

On Dec 11, 2017 7:13 PM, "Rômulo Cerqueira" 
wrote:

> Hi Nick,
>
> how can I encode the normal and depth data in the env texture?
>
> ...
>
> Thank you!
>
> Cheers,
> Rômulo
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72565#72565
>
>
>
>
>
> ___
> 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


  1   2   3   4   5   6   7   8   9   >