Re: [osg-users] dynamic cube map

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

if the normal and the depth are encoded in the env texture I believe the
answer is yes. Are you encoding the normal and the depth into texture? if
so, can you provide snippet?

On Sun, Dec 10, 2017 at 6:38 AM, Rômulo Cerqueira <
romulogcerque...@gmail.com> wrote:

> Hi Nick,
>
> I have a deep look in your code and I have a doubt.
>
> The cube mapping results provides the reflected color. Is it possible to
> get the normal and depth instead of the reflected color?
>
> Best regards,
>
> ...
>
> Thank you!
>
> Cheers,
> Rômulo
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72562#72562
>
>
>
>
>
> ___
> 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] Exporting to 3D studio?

2017-12-08 Thread Trajce Nikolov NICK
Hi Bjorn,

the LightWave obj exporter can do the job with osgconv. We use this format
for interchange amond Blender, 3ds, Modo etc

Nick

On Fri, Dec 8, 2017 at 10:49 AM, Björn Blissing <bjorn.bliss...@vti.se>
wrote:

> Hi,
>
> Sorry, if this is a basic question. I have tried to find the online, but
> all search results only give me export options from 3D studio.
>
> I need to export a model from native OSG format into a format that can be
> imported into 3D studio Max. There is no need for animations or textures. I
> just need the geometry. Are there any available export formats that can be
> used via osgconv?
>
> Regards,
> Björn
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72550#72550
>
>
>
>
>
> ___
> 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] dynamic cube map

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

have a look at the OpenIG project sources, it has it implemented with GLSL

https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Plugin-ModelComposition/IGPluginModelComposition.cpp
Look here for "environmental", starting from line 395. Here you use texture
cache to set up the 6 textures and the #define for the shader composition

The GLSL part is here:
https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Resources/shaders/forwardplus_vs.glsl
https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Resources/shaders/forwardplus_ps.glsl
Again, it uses shader composition the code inside #if defined(ENVIRONMENTAL)

Shoot questions if you struggle

Hope this helps

Cheers,
Nick

On Wed, Dec 6, 2017 at 3:08 AM, Rômulo Cerqueira <romulogcerque...@gmail.com
> wrote:

> Hi Robert,
>
> my idea is to compute the secondary reflections by using dynamic cubemap.
> I need to get the normal and depth from cube map reflections. Is it
> possible?
>
> ...
>
> Thank you!
>
> Cheers,
> Rômulo
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72541#72541
>
>
>
>
>
> ___
> 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] OsgText compile issue with the newer versions of OSG

2017-11-21 Thread Trajce Nikolov NICK
Thanks Robert !!!

On Tue, Nov 21, 2017 at 3:01 PM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Nick,
>
> On 16 November 2017 at 17:05, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> >> Getting the coords of glyphs is something we'd need to add to
> > osgText::Text, such as Text::getGlyphCorners(int characterPosition,
> > osg::Vec3& bottomLeft,   osg::Vec3& bottomRight etc.).
> >
> > Right. This will do it.
>
> I have checked in:
>
> /** Get the coordinates of the character corners in local
> coordinates. Use Text::getMatrix() or Text::computeMatrix(..) to get
> the transform into model coordinates (see TextBase header.) */
> bool getCharacterCorners(unsigned int index, osg::Vec3&
> bottomLeft, osg::Vec3& bottomRight, osg::Vec3& topLeft, osg::Vec3&
> topRight) const;
>
> Note the comment about needing to transform this coords - this is
> required to handle the overall positioning of the text in model
> coordinates.
>
> 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] OsgText compile issue with the newer versions of OSG

2017-11-16 Thread Trajce Nikolov NICK
Thanks Robert,

> Getting the coords of glyphs is something we'd need to add to
osgText::Text, such as Text::getGlyphCorners(int characterPosition,
osg::Vec3& bottomLeft,   osg::Vec3& bottomRight etc.).

Right. This will do it.

On Thu, Nov 16, 2017 at 6:03 PM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Nick,
>
> Thanks for the links and explanation.
>
> The new implementation is completely different, it simply not an issue
> of making an old API public again, there is no way you can map the old
> to the new implementation for backwards compatibility as they are so
> different.  The new implementation shares a single vertex array for
> the whole osgText::Text object, the old implementation uses mutliple
> vertex arrays for different texture atlas and view combinations.
>
> Getting the coords of glyphs is something we'd need to add to
> osgText::Text, such as Text::getGlyphCorners(int characterPosition,
> osg::Vec3& bottomLeft,   osg::Vec3& bottomRight etc.).
>
> Robert.
>
> On 16 November 2017 at 16:54, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> > Hi Robert,
> >
> > that is part of a code I wrote that has history :-) and now is part of
> the
> > OpenIG project. Originally this was written like 6-7 (???) years ago and
> was
> > part of the osgWidget::Input too ( I had submission then for this ). The
> > purpose was to have a Line Edit as is known in any UI. OpenIG is using it
> > for typing commands as from terminal and here is the whole code
> > https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Core-
> OpenIG/Terminal.cpp
> > 
> >
> > This particular snippet Curtis is mentioning was changed over time
> (simple
> > changes that are handled with #ifdefs) and now we have the same case - I
> am
> > aware of the recent osgText refactors but don't know the details. The
> > purpose of this snippet is to get the glyphs coords of the edited text in
> > order to set the cursor position. That simple :-).
> >
> > The mentioned snippet is using the API for a decade that now become
> broken,
> > so I will vote to make it back compatible again - if it will be a simple
> > addition what I believe it is the case
> >
> > Please let me know your thoughts and what will be the best effort to fix
> > this issue
> >
> > Thanks a bunch as always!
> >
> > Cheers,
> > NIck
> >
> > On Wed, Nov 15, 2017 at 10:35 PM, Robert Osfield <
> robert.osfi...@gmail.com>
> > wrote:
> >>
> >> Hi Curtis,
> >>
> >> It might be that we need to add some extra API to osgText to help you
> >> do what you want to do.  As a general trend I would much rather have
> >> users no need to grapple with the internal implementation details of
> >> classes to do their work, if this requires some amendments to the
> >> public interface or just providing some advice to solve it another way
> >> then this will be preferable.
> >>
> >> At this point I can't really provide any specific advice as to what
> >> would be appropriate in hour case as the small code snippet really
> >> doesn't tell me anything about the what you are and why.  Could you
> >> provide a small compilable code example that illustrates what you were
> >> doing with older versions of the OSG.  From this I should be able to
> >> work out what you were doing and why, and then work out what would be
> >> appropriate to do next.
> >>
> >> Robert.
> >>
> >> On 15 November 2017 at 19:29, Curtis Rubel <cru...@compro.net> wrote:
> >> > Hello community,
> >> >
> >> >I was attempting to test the latest release of OSG 3.5.8 and am now
> >> > getting
> >> > some compiler errors.
> >> >
> >> > error: ‘const struct osgText::Text::GlyphQuads’ has no member named
> >> > ‘getCoords’
> >> >
> >> > coords.insert(coords.end(),gq.getCoords()->begin(),gq.
> getCoords()->end());
> >> >
> >> > Snippet of the code in question:
> >> >
> >> > Code:
> >> >
> >> >
> >> > std::vector  coords;
> >> >
> >> > osgText::Text::TextureGlyphQuadMap& tgqm =
> >> > const_cast<osgText::Text::TextureGlyphQuadMap&>(_text->
> getTextureGlyphQuadMap());
> >> >
> >> > const osgText::Text::GlyphQuads& gq = tgqmi->second;
> >> >
> >> >
> >> > coords.insert(coor

Re: [osg-users] OsgText compile issue with the newer versions of OSG

2017-11-16 Thread Trajce Nikolov NICK
Hi Robert,

that is part of a code I wrote that has history :-) and now is part of the
OpenIG project. Originally this was written like 6-7 (???) years ago and
was part of the osgWidget::Input too ( I had submission then for this ).
The purpose was to have a Line Edit as is known in any UI. OpenIG is using
it for typing commands as from terminal and here is the whole code
https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Core-OpenIG/Terminal.cpp


This particular snippet Curtis is mentioning was changed over time (simple
changes that are handled with #ifdefs) and now we have the same case - I am
aware of the recent osgText refactors but don't know the details. The
purpose of this snippet is to get the glyphs coords of the edited text in
order to set the cursor position. That simple :-).

The mentioned snippet is using the API for a decade that now become broken,
so I will vote to make it back compatible again - if it will be a simple
addition what I believe it is the case

Please let me know your thoughts and what will be the best effort to fix
this issue

Thanks a bunch as always!

Cheers,
NIck

On Wed, Nov 15, 2017 at 10:35 PM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Curtis,
>
> It might be that we need to add some extra API to osgText to help you
> do what you want to do.  As a general trend I would much rather have
> users no need to grapple with the internal implementation details of
> classes to do their work, if this requires some amendments to the
> public interface or just providing some advice to solve it another way
> then this will be preferable.
>
> At this point I can't really provide any specific advice as to what
> would be appropriate in hour case as the small code snippet really
> doesn't tell me anything about the what you are and why.  Could you
> provide a small compilable code example that illustrates what you were
> doing with older versions of the OSG.  From this I should be able to
> work out what you were doing and why, and then work out what would be
> appropriate to do next.
>
> Robert.
>
> On 15 November 2017 at 19:29, Curtis Rubel <cru...@compro.net> wrote:
> > Hello community,
> >
> >I was attempting to test the latest release of OSG 3.5.8 and am now
> getting
> > some compiler errors.
> >
> > error: ‘const struct osgText::Text::GlyphQuads’ has no member named
> ‘getCoords’
> >  coords.insert(coords.end(),gq.getCoords()->begin(),gq.
> getCoords()->end());
> >
> > Snippet of the code in question:
> >
> > Code:
> >
> >
> > std::vector  coords;
> >
> > osgText::Text::TextureGlyphQuadMap& tgqm = const_cast TextureGlyphQuadMap&>(_text->getTextureGlyphQuadMap());
> >
> > const osgText::Text::GlyphQuads& gq = tgqmi->second;
> >
> > coords.insert(coords.end(),gq.getCoords()->begin(),gq.
> getCoords()->end());
> >
> >
> >
> >
> >
> > We are using this code to control onscreen text command line input.
> > What would be the proper way to fix this code under the newer versions
> of OSG to
> > accomplish the same, if it is still possible in some way?
> >
> > Any hints would be appreciated.
> >
> > Thank you all as always...
> >
> > Cheers,
> > Curtis[/code]
> >
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=72393#72393
> >
> >
> >
> >
> >
> > ___________
> > 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] Access to gl context

2017-11-13 Thread Trajce Nikolov NICK
Hi guys,

here some snippet:

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

osgViewer::GraphicsHandleWin32 *hdl =
dynamic_cast<osgViewer::GraphicsHandleWin32*>(wins.at(0));
hdl->getWGLContext();

On Mon, Nov 13, 2017 at 1:45 PM, Christian Buchner <
christian.buch...@gmail.com> wrote:

>
> Is this the function you're looking for?
>
> osgViewer::GraphicsHandleWin32::getWGLContext
> <http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00355.html#abbf6db2b0a8d14f825dd43435862a941>()
>
>
> I am having some trouble (despite the powers of Google) to find any OSG
> example code using getWGLContext()
>
> Christian
>
>
> 2017-11-10 14:33 GMT+01:00 Poojan Prabhu <poojanpro...@gmail.com>:
>
>> Hi,
>>
>> We are using shared context, but have custom drawables that use Vertex
>> Array Objects. This causes a problem in the case of multiple windows (where
>> each is a separate gl context).
>>
>> We can manage/create vaos depending on the gl context id that we are
>> currently rendering with.
>>
>> But, we can't use context id as reported by render info, because that
>> represents the shared context id and not the HGLRC
>>
>> Prefer to avoid wglGetCurrentContext in each draw call obviously. And we
>> _do_ want to use shared contexts.
>>
>> How can we work around this so that we have access to the HGLRC or an id
>> representing it?
>>
>> Thank you!
>>
>> Cheers,
>> Poojan
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=72358#72358
>>
>>
>>
>>
>>
>> ___
>> 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] measuring a frame

2017-11-06 Thread Trajce Nikolov NICK
thanks Robert ! I am seeing there is an example too for the user stats.
Sometimes I am faster by shooting even sample questions to the user list
before doing the home work

Thanks again !

Nick

On Mon, Nov 6, 2017 at 9:37 AM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Nick,
>
> On 6 November 2017 at 00:56, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> > I am trying to measure the time needed to process a frame. My first and
> > somewhat naïve approach is to init the timer at the beginning of the
> frame
> > and get the result after the renderingTraversal. But, it seams (and that
> is
> > what I believe it is happening) the rendering traversal is containing the
> > swap buffers which is synced with the refresh rate (please correct me if
> I
> > am wrong). Is there something like preswap callback or something like
> this?
>
> Are you aware of the osg::Stats data structure and support built into
> osgViewer?  The StatsHandler.cpp that provides the on-screen stats
> enables stats collection and then gets the stats from the osg::Stats
> objects.  Various parts of the OSG check for the osg::Stats objects
> and then fill in the details when required.  The osg::Stats objects
> are designed to queried by users.  Just have a look at how
> src/osgViewer/StatsHandler.cpp sets things up.
>
> 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] measuring a frame

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

I am trying to measure the time needed to process a frame. My first and
somewhat naïve approach is to init the timer at the beginning of the frame
and get the result after the renderingTraversal. But, it seams (and that is
what I believe it is happening) the rendering traversal is containing the
swap buffers which is synced with the refresh rate (please correct me if I
am wrong). Is there something like preswap callback or something like this?

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] updatecallbacks in sg tree

2017-10-26 Thread Trajce Nikolov NICK
found it ... forgot to call traverse in the NodeCallback::apply

sorry for the noise

On Thu, Oct 26, 2017 at 3:09 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Community,
>
> this is probably simple question. Here is my scene:
>
> MatrixTransform (A)
> |
> MatrixTransform (B)
>
> B is child of. A and B have UpdateCallbacks. However the B callback is
> never called. What I miss?
>
> Thanks a bunch as always
>
> --
> 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] updatecallbacks in sg tree

2017-10-26 Thread Trajce Nikolov NICK
Hi Community,

this is probably simple question. Here is my scene:

MatrixTransform (A)
|
MatrixTransform (B)

B is child of. A and B have UpdateCallbacks. However the B callback is
never called. What I miss?

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] [3rd party] autodesk fbx sdk

2017-10-23 Thread Trajce Nikolov NICK
yea :) .. thanks guys!

On Mon, Oct 23, 2017 at 2:19 PM, Curtis Rubel <cru...@compro.net> wrote:

> Hi Nick,
>
>  I got a reply from AutoDesk seems they had it
> down for maintenance and its back up now at this
> link:
>
> http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112=10775847
>
> Cheers,
> Curtis
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72229#72229
>
>
>
>
>
> ___
> 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] [3rd party] autodesk fbx sdk

2017-10-20 Thread Trajce Nikolov NICK
Thanks a bunch Curtis. That will do it. I am on Windows at the moment.

Thanks again. Ping me privately

Cheers

On Fri, Oct 20, 2017 at 10:15 PM, Curtis Rubel <cru...@compro.net> wrote:

> NIck,
>
> I probably have a 2017 SDK around someplace for
> Linux and/or Windows.  If that will do let me know and
> I will look around on Monday when I get in to work...
>
> ...
> Cheers,
> Curtis
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72219#72219
>
>
>
>
>
> ___
> 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] [3rd party] autodesk fbx sdk

2017-10-20 Thread Trajce Nikolov NICK
Hi Curtis,

yea, same finding here. I had talk to their chat support and suddenly they
told me this issue is out of their competence. So let wait I guess

On Fri, Oct 20, 2017 at 4:26 PM, Curtis Rubel <cru...@compro.net> wrote:

> Hi Nick,
>
>I also tried the Autodesk website and the links they provide are broken
> and taking you to a "page not found" default now.   I did send their
> support people and email letting them know that it was broken.  Hopefully
> they will fix it soon.
>
> ...
>
> Cheers,
> Curtis
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72213#72213
>
>
>
>
>
> ___
> 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] [3rd party] autodesk fbx sdk

2017-10-19 Thread Trajce Nikolov NICK
Hi Community,

anyone aware where is this located these days? It seams Autodesk has
changed the sites hosting it

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] osgParticle (particle life time)`

2017-10-02 Thread Trajce Nikolov NICK
Hi Jannik,

I am doing this for the default particle template, not using operators on
single particles. But yes, I found that call too. For this I have to
rethink my code how to use this per particle fired. Learning osgParticle now

Thanks anyway

On Mon, Oct 2, 2017 at 10:17 PM, Jannik Heller <scr...@baseoftrash.de>
wrote:

> Hi Nick,
>
> I think what you're looking for would be Particle::kill():
>
>
> Code:
>
> /** Kill the particle on next update
> NOTE: after calling this function, the isAlive() method will
> still
> return true until the particle is updated again.
> */
> inline void kill();
>
>
>
>
> Does this not work?
>
> Cheers,
> Jannik[/code]
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72088#72088
>
>
>
>
>
> ___
> 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] osgParticle (particle life time)`

2017-09-30 Thread Trajce Nikolov NICK
Hi community,

if I set the particle life time to 0, I am seeing it is not killing the
particle, but instead it makes it live forever. Any hint how to kill it?

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


[osg-users] GPU particles

2017-08-31 Thread Trajce Nikolov NICK
Hi Community,

anyone aware of GPU particles library that can be easelly integrated with
OSG?

Thanks a bunch!

-- 
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] scene snapshot

2017-08-30 Thread Trajce Nikolov NICK
Hi Gianni, Robert,

yes, this will be like map view. I am familiar with the Camera interface
and the GL/GLU counterparts. The projection matrix should for sure be
ortho2D, just struggling with the view matrix how to set it up to have the
scene to fit exactly in ... thinking ...

Thanks for any hint

On Wed, Aug 30, 2017 at 11:57 AM, Gianni Ambrosio <g.ambrosio+...@gmail.com>
wrote:

> Hi Nick,
> I'm not sure my scenario is like mine but hope this code snippet may help:
>
>
> Code:
>
> void setViewTowardsXMinus()
> {
>nodeTrackerManipulator->setTransformation(computeEye(osg::Vec3d(
> nodeTrackerManipulator->getDistance(), 0.0, 0.0)), osg::Vec3d(0.0, 0.0,
> 0.0), nodeTrackerManipulator->getHomeUpPosition());
> }
>
> void setViewTowardsXPlus()
> {
>nodeTrackerManipulator->setTransformation(computeEye(osg::Vec3d(-
> nodeTrackerManipulator->getDistance(), 0.0, 0.0)), osg::Vec3d(0.0, 0.0,
> 0.0), nodeTrackerManipulator->getHomeUpPosition());
> }
>
> void setViewTowardsYMinus()
> {
>nodeTrackerManipulator->setTransformation(computeEye(osg::Vec3d(0.0,
> nodeTrackerManipulator->getDistance(), 0.0)), osg::Vec3d(0.0, 0.0, 0.0),
> nodeTrackerManipulator->getHomeUpPosition());
> }
>
> void setViewTowardsYPlus()
> {
>nodeTrackerManipulator->setTransformation(computeEye(osg::Vec3d(0.0,
> -nodeTrackerManipulator->getDistance(), 0.0)), osg::Vec3d(0.0, 0.0, 0.0),
> nodeTrackerManipulator->getHomeUpPosition());
> }
>
> void setViewTowardsZMinus()
> {
>nodeTrackerManipulator->setTransformation(computeEye(osg::Vec3d(0.0,
> 0.0, nodeTrackerManipulator->getDistance())), osg::Vec3d(0.0, 0.0, 0.0),
> nodeTrackerManipulator->getHomeUpPosition());
> }
>
> void setViewTowardsZPlus()
> {
>nodeTrackerManipulator->setTransformation(computeEye(osg::Vec3(0.0f,
> 0.0f, -nodeTrackerManipulator->getDistance())), osg::Vec3d(0.0, 0.0,
> 0.0), nodeTrackerManipulator->getHomeUpPosition());
> }
>
> osg::Vec3d computeEye(const osg::Vec3d& iEye)
> {
>osg::Vec3d eye = iEye;
>...
>double psi, theta, phi;
>graphicObject->getInitialRotation(psi, theta, phi);
>osg::Quat initAttitude = viosg::quatFromBody313(psi, theta, phi);
>eye = initAttitude * graphicObject->getTransformNode()->getAttitude()
> * eye;
>return eye;
> }
>
>
>
>
> Cheers,
> Gianni
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=71564#71564
>
>
>
>
>
> ___
> 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] scene snapshot

2017-08-30 Thread Trajce Nikolov NICK
Hi community,

this is easy but I am struggling with. Here is the story:

I have scene (terrain tile) and I want to take a snapshot in ortho (to make
a texture out of the scene snapshot). I have RTT camera and an image as an
attachment. The scene is added as a child to this camera. What would be the
settings for the Projection and the View matrix for the RTT camera?

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] Problem to load images

2017-08-10 Thread Trajce Nikolov NICK
Hi Robert,

I will ... I am in the middle of setting up my laptop with fresh install,
once I am ready I will do so

On Thu, Aug 10, 2017 at 5:08 PM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Nick,
>
> On 10 August 2017 at 15:34, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> I have the exact same behavior with 3.5.5 with png files. Curious what
>> this can be
>>
>>>
> And any information to help us work out what it might be??
>
> I can't help anyone with so little to go on.  Might as well kick tyres as
> it'll be just as useful.
>
> So please, run OSG_NOTiFY_LEVEL=DEBUG and let us know what the output is.
> Publish the problem image files and a code snippet that can reproduce the
> issue.  Also information on what OS/build tools/OSG version that work don't
> work as really useful.
>
> 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] Problem to load images

2017-08-10 Thread Trajce Nikolov NICK
Hi Robert, Romulo,

I have the exact same behavior with 3.5.5 with png files. Curious what this
can be

Nick

On Thu, Aug 10, 2017 at 7:53 AM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Rômulo,
>
> Given osgivewer --image is work then it suggests that the jpeg file itself
> is OK, and the the OSG's jpeg plugin is OK and being found on loading.
>
> This suggests the error coming from your application for some reason.
> Could you post a code snippet for others to review to see if we can spot
> the cause of the problem.
>
> Also enable verbose debugging to see if this reveals anything i.e.
>
> export OSG_NOTIFY_LEVEL=DEBUG
> osgviewer --image /home/romulo/textures/gray_texture_d.jpg
>
> Finally when posting error messages could you make sure you copy and paste
> them directly into the email to make it possible to grep the OSG sources
> for the error message.  This would help with pinpointing where the error
> message is being generated and might provide some additional clues.
>
> Robert.
>
>
>
> On 7 August 2017 at 23:36, Rômulo Cerqueira <romulogcerque...@gmail.com>
> wrote:
>
>> Hi,
>>
>> currently I have a problem to load and process image files in my OSG c++
>> code. I got the message:
>>
>>
>> Code:
>> Warning: Error in reading to "/home/romulo/textures/gray_texture_d.jpg".
>>
>>
>>
>> However, this image exists and I can open it using:
>>
>>
>> Code:
>> $ osgviewer --image /home/romulo/textures/gray_texture_d.jpg
>>
>>
>>
>> What might have been?
>>
>> ...
>>
>> Thank you!
>>
>> Cheers,
>> Rômulo[/code]
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=71379#71379
>>
>>
>>
>>
>>
>> ___
>> 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] OSG Delaunay and alternatives

2017-07-28 Thread Trajce Nikolov NICK
Thanks Alberto. I think I come across this one too. The old libtriangle
written in C? Ehm ... I would welcome more modern code - while reading
libtriangle, it hurt my head how it should be used. But thanks anyway

On Fri, Jul 28, 2017 at 4:32 PM, Alberto Luaces <alua...@udc.es> wrote:

> Trajce Nikolov NICK writes:
>
> > Hi Community,
> >
> > I am using the Delaunay triangulator from OSG. For simple cases it works
> fine, but not enough for real world ones. Any suggestion for constrained
> Delaunay triangulation library?
> >
> > Thanks a bunch as always!
>
> Hi, Nick, Triangle (https://www.cs.cmu.edu/~quake/triangle.html) is the
> one that usually comes to mind for that task.
>
> --
> 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] OSG Delaunay and alternatives

2017-07-28 Thread Trajce Nikolov NICK
Hi Community,

I am using the Delaunay triangulator from OSG. For simple cases it works
fine, but not enough for real world ones. Any suggestion for constrained
Delaunay triangulation library?

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] hardware instancing with VertexAttribs and VertexAttribsDivisor

2017-07-28 Thread Trajce Nikolov NICK
Hi Dario,

my work supposed to be part of an opensource project but the development
has ended without a chance to implement this.

Have a look here,
http://3dcgtutorials.blogspot.mk/2013/09/instancing-with-openscenegraph-part-ii.html

Also, instead of using OpenGL code for the VertexAttribsDivisor Robert
added (If I remember correctly) OSG wraps for it.

Hope this helps,

Cheers!
Nick


On Tue, Jul 25, 2017 at 11:10 AM, Dario Frost <fakko...@libero.it> wrote:

>
> Trajce Nikolov NICK wrote:
> > Hi Roman,
> > Once I complete some working version I will post my code, no problem.
> Maybe Sebastian can provide some snips from his NodeVisitor as well ;-)
> >
> > Nick
> >
>
>
> Hi,
> I know I am bringing this topic back to life but I am stuck for a very
> similar problem.
>
> Where can I find the code Nick developed?
> I am having tons of problems with instancing and custom attributes
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=71312#71312
>
>
>
>
>
> ___
> 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] Perform actions when a child node is added

2017-06-23 Thread Trajce Nikolov NICK
Hi Bruno,

What Robert suggested is the correct one. However, I was in your situation
where I had to do stuff on PagedLOD children change so I end up with a
working hack, and that was an Update callback monitoring the children. Just
an idea

On Sat, Jun 24, 2017 at 12:45 AM, Bruno Oliveira <
bruno.manata.olive...@gmail.com> wrote:

> I actually tried it already, in my nodes derived doth from osg::Group* and
> osg::PagedLOD*.
> However, overloading the PagedLOD's functions made my scene crash the app
> during the cull traversal (my overload was rewriting the node's center,
> radius and InitialBound...)
>
> 2017-06-23 15:18 GMT+01:00 Robert Osfield <robert.osfi...@gmail.com>:
>
>> HI Bruno,
>>
>> There is no "child added callback" mechanism in osg::Group, but you
>> can override the addChild and insertChild methods to catch attempts to
>> add children, deferring the implementation to the underlying
>> addChild/insertChild method and then doing what extra's you want,
>>
>> Robert.
>>
>> On 23 June 2017 at 11:31, Bruno Oliveira
>> <bruno.manata.olive...@gmail.com> wrote:
>> > Hello,
>> >
>> >
>> > I want to be able to perform some actions inside a node of my own, when
>> > someone adds a child node to it.
>> >
>> > Is this possible via some callback mechanism or so?
>> >
>> >
>> > --
>> >
>> > Also, another question. Using osgDB::Registry::ReadFileCallback, I can
>> only
>> > perform actions after a node is read and before it is added to me
>> scene. Is
>> > it possible to perform actions AFTER the node is read and added to the
>> > scene?
>> >
>> >
>> > Thanks.
>> >
>> > ___
>> > osg-users mailing list
>> > osg-users@lists.openscenegraph.org
>> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-opens
>> cenegraph.org
>> >
>> ___
>> 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] round earth to ECEF

2017-05-13 Thread Trajce Nikolov NICK
Thanks Nathan!! Good finding!

I spent some time thinking about this too. Round earth is the key issue
since it is the CS of the source database. I think with some calculus can
be converted to ECEF.

On Sat, May 13, 2017 at 3:20 AM, Nathan Mielcarek <nmielca...@gmail.com>
wrote:

> Hi Nick,
>
> I have found GeographicLib to be a good coordinate converter. It supports
> ECEF (Geocentric), although I'm not sure about the round earth format you
> referred to.
>
> https://geographiclib.sourceforge.io/
>
> Nathan
>
> On Fri, May 5, 2017 at 11:35 AM, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi community,
>>
>> I have Round Earth database (origin set to some geo location on the
>> ellipsoid) and I need it into ECEF (origin at the earth center). I havn't
>> spend too much time thinking about possible conversion and I am asking here
>> for some hints, suggestions  what it would take to write some
>> pos-processor .. Any word from you is highly welcome
>>
>> 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] round earth to ECEF

2017-05-05 Thread Trajce Nikolov NICK
Hi community,

I have Round Earth database (origin set to some geo location on the
ellipsoid) and I need it into ECEF (origin at the earth center). I havn't
spend too much time thinking about possible conversion and I am asking here
for some hints, suggestions  what it would take to write some
pos-processor .. Any word from you is highly welcome

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] what should I dirty when I change ColorArray on the fly?

2017-05-03 Thread Trajce Nikolov NICK
yes :) .. Thanks Glenn .. I totally missed that

On Wed, May 3, 2017 at 8:54 PM, Glenn Waldron <gwald...@gmail.com> wrote:

> Nick,
> If you have VBOs enabled, I think you just have to call dirty() on the
> color array itself.
>
>
> Glenn Waldron
>
> On Wed, May 3, 2017 at 2:43 PM, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi community,
>>
>> this is simple question. I am updating the Color array of a osg::Geometry
>> on the fly. It is not having effect. The Geometry is not using displaylist.
>> How/What should I do to have the color mods "updated" in the rendering
>> correctly?
>>
>> 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
>>
>>
>
> ___________
> 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] what should I dirty when I change ColorArray on the fly?

2017-05-03 Thread Trajce Nikolov NICK
Hi community,

this is simple question. I am updating the Color array of a osg::Geometry
on the fly. It is not having effect. The Geometry is not using displaylist.
How/What should I do to have the color mods "updated" in the rendering
correctly?

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 Coordinate system

2017-04-29 Thread Trajce Nikolov NICK
Hi,

Here you can find some snippets:
https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Plugin-CIGI/IGPluginCIGI.cpp

but you rotate it normaly as in flat earth and then apply the
transofrmation for that geo location:

osg::Matrixd l2w;
osg::EllipsoidModel em;
em.computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadians(lat),osg::DegreesToRadians(lon),alt,l2w);

osg::Quat hpr;
osg::Matrixd finalMatrix = osg::Matrixd::rotate(hpr) * l2w;

On Sat, Apr 29, 2017 at 7:03 AM, Vinoth Rajendran <
vinothrajendran4...@gmail.com> wrote:

> Hi,
>
> ...
>
> yaa,Now i am getting the Up Vector.But i unable to rotate correctly my
> object(entity) in scene with respect to Particular Axis.
>
>   if it is not geocentric(flat),if i want change the heading i can make
> rotate with respect to Z-axis,same pitch w.r.to X-Axis and Roll w.r.to
> Y-Axis.
>
>   But in geocentric how i can change heading,Pitch and Roll of my
> Entity ?
> Can anyone explain me please ?
>
> Thank you!
>
> Cheers,
> Vinoth
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70861#70861
>
>
>
>
>
> ___
> 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 Coordinate system

2017-04-28 Thread Trajce Nikolov NICK
Hi Vinoth,

have a look at the osg::EllipsoidModel in osg/CoordinateSystemNode .. It
has all the methods to get the up vectors for specific lat/lon

On Fri, Apr 28, 2017 at 2:50 PM, shayne.tueller <shayne.tuel...@comcast.net>
wrote:

> If you change to geocentric coordinates, the "up" vector is the normal to
> the spheriod at the XYZ location. I'm not sure what you mean by the Y
> coordinate.
>
>
> Sent via the Samsung Galaxy S7 active, an AT 4G LTE smartphone
>
>  Original message 
> From: Vinoth Rajendran <vinothrajendran4...@gmail.com>
> Date: 4/28/17 5:54 AM (GMT-07:00)
> To: osg-users@lists.openscenegraph.org
> Subject: [osg-users] osg Coordinate system
>
> Hi,
>
> ...
>
> i am using osg3.5.1 in my application.when i am running in flat terrain
> mode, Z axis is Up Vector in my Scene .if i am changing to Geocentric
> Mode,the Up Vector is Changing to Y axis.
>
> So how i can Change Up Vector in my Scene ?
>
> Thank you!
>
> Cheers,
> Vinoth
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70853#70853
>
>
>
>
>
> ___
> 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] How to get the camera's roll pitch and heading?

2017-04-01 Thread Trajce Nikolov NICK
Hi Judy,

you do something like this:

osg::Matrixd mx = view->getCamera()->getInverseViewMatrix();
osg::Quad q = mx.getRotate();

and you can use hpr = fromQuat(q)
fromQuat can be found here

https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Core-Base/Mathematics.cpp

On Sat, Apr 1, 2017 at 10:39 AM, Judy <515415...@qq.com> wrote:

> Hi Robert,
> As a beginner of openscenegraph,I have an urgent question that how to get
> the camera's heading pitch and yaw ?
> could you give me some suggestion about this question?
> Best regards!
> Judy Fan.
>
>
> ___
> 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] Shadows on "invisible" objects

2017-03-30 Thread Trajce Nikolov NICK
Hi Allessandro,

my case is a bit different, it is about invisible object to cast shadows on
visible objects. The second link with the shader hints gave me an idea
though...

Thank you so much for the links !!

Nick

On Thu, Mar 30, 2017 at 10:05 AM, Alessandro Terenzi <a.tere...@gmail.com>
wrote:

> Hi Nick,
> as far as I understand you'd like to cast shadows onto a geometry that is
> kind of invisible but still can receive shadows, is this right?
>
> Have you already read these?
>
> http://forum.openscenegraph.org/viewtopic.php?t=8912;
> highlight=invisible+shadow
>
> http://forum.openscenegraph.org/viewtopic.php?t=12628;
> highlight=invisible+shadow
>
> Hope these will help.
> Alessandro
>
> On Tue, Mar 28, 2017 at 9:06 AM, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi Community,
>>
>> I am trying to solve a problem where my scene is with shadow caster model
>> where I want to see only the shadows and have the shadow caster model
>> invisible. What would be the node masks game to achieve this? or some other
>> solution?
>>
>> 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


Re: [osg-users] wireframe darker wrt the surface color

2017-03-29 Thread Trajce Nikolov NICK
Try a simple shader then :-)

On Wed, Mar 29, 2017 at 10:51 AM, Gianni Ambrosio <g.ambrosio+...@gmail.com>
wrote:

> Hi Nick
>
> Trajce Nikolov NICK wrote:
> > Hi Gianni,
> >
> > you can do something like
> > getOrCreateStateSet()->setAttributeAndModes(new
> osg::Depth(osg::Depth::ALWAYS, 0.0, 1.0, false), osg::StateAttribute::ON);
> >
>
> I tried the line you suggested with lights on or off but I have in every
> case a gray wireframe. While I would like to have a darker/lighter yellow
> wireframe on a yellow surface, and a darker/lighter green wireframe on a
> green surface.
>
> Gianni
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70594#70594
>
>
>
>
>
> ___
> 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] wireframe darker wrt the surface color

2017-03-28 Thread Trajce Nikolov NICK
Hi Gianni,

you can do something like
getOrCreateStateSet()->setAttributeAndModes(new
osg::Depth(osg::Depth::ALWAYS, 0.0, 1.0, false), osg::StateAttribute::ON);

On Tue, Mar 28, 2017 at 10:09 AM, Gianni Ambrosio <g.ambrosio+...@gmail.com>
wrote:

> Hi Sebastian
> I tried as follows:
>
> stateset->setMode(GL_DEPTH, osg::StateAttribute::OVERRIDE |
> osg::StateAttribute::OFF);
>
> but it behaves the same. Probably I was not clear but I'm not sure this is
> something related to depth. Isn't it a matter of light or material?
>
> Please give a look at the attached movie. Depending on light inclination
> the wireframe is darker or lighter but at a certain point the wireframe has
> exactly the same color of the undarlying surface and for that reason it is
> not visible.
> I would like to see always the wireframe, it doesn't matter if it is
> darker or lighter but always and with the same base color of the underlying
> 3D surface.
>
> Hope this is clearer now.
>
>
> Cheers,
> Gianni
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70573#70573
>
>
>
>
> ___
> 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] Shadows on "invisible" objects

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

I am trying to solve a problem where my scene is with shadow caster model
where I want to see only the shadows and have the shadow caster model
invisible. What would be the node masks game to achieve this? or some other
solution?

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] [3rdParty/maybe OSG general] osgoculusviewer and View matrix

2017-03-23 Thread Trajce Nikolov NICK
Hi Bjorn,

I am all good now ... The issue at the end was not setting the projection
matrices properly. This was part of larger app debug where we use your code
so I was shooting almost blindly chasing a bug (still haven't figured it
out yet) but the bug is (after all debugging in osgoculusviewer) somewhere
else. Your code rocks solid ! :-)

Thanks for pinging me though!

Cheers,
Nick

On Thu, Mar 23, 2017 at 9:28 PM, Björn Blissing <bjorn.bliss...@vti.se>
wrote:

> Hi Nick,
>
> Sorry, I have missed this message.
>
> I do not really get your issue by the description.
>
> If I understand you correctly you are changing the m_cameraRTTLeft and
> cameraRTTRight to use osg::Camera::ABSOLUTE_RF instead of
> osg::Camera::RELATIVE_RF. And this change is causing some issues.
>
> What types of issues are you seeing?
>
> Regards,
>
> Björn
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70531#70531
>
>
>
>
>
> ___
> 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] bounding box collisions (without osgbullet)

2017-03-13 Thread Trajce Nikolov NICK
Hi Sebastian,

it is for simulation, i have a moving entity and a terrain (with buildings
etc). Now I am not after triangle level intersection, but after Entity BBox
collision with the terrain (enough is true false). I was thinking to do it
really very simple by having LOS rays from the entity center to the corners
of the BBox. The entity can move in any direction

On Mon, Mar 13, 2017 at 9:41 PM, Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de> wrote:

> Hi Nick,
>
> basically this is not an easy task. What exactly do you expect as a
> collision result?
> I've implemented a triangle-box collision with MTD (minimal transform
> distance = vector describing how to push the box to get it exactly away
> from the colliding triangle). OSG has all the math facilities to do this,
> but I guess you'll save a lot of headache using pyhsics etc. for dynamics.
> So maybe try to explain the problem you're trying to solve a bit more in
> detail.
>
> Cheers
> Sebastian
>
> no one on this?
>
> On Sun, Mar 12, 2017 at 9:53 PM, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi community,
>>
>> what would be the best way to implement bbox collision with terrain, from
>> what is already in OSG (no bullet etc)?
>>
>> thanks a bunch as always,
>> Nick
>>
>> --
>> trajce nikolov nick
>>
>
>
>
> --
> 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] bounding box collisions (without osgbullet)

2017-03-13 Thread Trajce Nikolov NICK
no one on this?

On Sun, Mar 12, 2017 at 9:53 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi community,
>
> what would be the best way to implement bbox collision with terrain, from
> what is already in OSG (no bullet etc)?
>
> thanks a bunch as always,
> 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] bounding box collisions (without osgbullet)

2017-03-12 Thread Trajce Nikolov NICK
Hi community,

what would be the best way to implement bbox collision with terrain, from
what is already in OSG (no bullet 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] need help

2017-03-02 Thread Trajce Nikolov NICK
Hi,

have a look at the osggeometry example. Probably you will need to have a
quad with the tiff image on it and you can then draw a line

On Thu, Mar 2, 2017 at 9:57 AM, Venky Balu <venkybrothers.b...@gmail.com>
wrote:

> HI ,
> i am new to OSG i have to develop an application that contain tiff image
> on that image i have to draw line .
> but i am not able to draw line on image.
> could you please suggest me how to solve this.
>
> Regards,
> venkat
> 9840564652
>
> ___
> 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] [3rdParty/maybe OSG general] osgoculusviewer and View matrix

2017-03-01 Thread Trajce Nikolov NICK
Hi all,

in my app that is extension of osgoculusviewer I am using the ViewMatrix to
compute some shader stuff. In one View (no slaves) setup it works ok, with
the slaves it doesn't. Long story and debug, but I nailed it down to the
ViewMatrix that is causing me issues.

In my debug of the osgoculusviewer I have changed the left/right RTT
cameras to osg::Camera::ABSOLUTE_RF to control my ViewMatrix by myself and
simply m_cameraRTTLeft->setViewMatrixAsLookAt(...) is buggy. This RTT
camera is slave camera.

Anyone with some help, those who knows this project? The above is enough to
reproduce

Cheers and thanks a bunch as always!

Nick

p.s. Bjorn?

-- 
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] intersection tests

2017-02-19 Thread Trajce Nikolov NICK
Hi Robert, Julien,

it is my bad :( .. Again, and I apologize for the noise.

I studied the code, understood it, and it is just perfect and works great.
The story is that in the system setup there is a HOT Server (with a copy of
the database) and IG channels (with their own copy of the databases). The
IG channels have the terrain rotated and the HOT server does not, thus
inconsistency leading me to wrong assumptions and chasing a ghost

Please ignore and thanks for the patience with me

Good thing is, this lead me to learn a bit of more OSG code :)

Cheers!
Nick

On Sun, Feb 19, 2017 at 9:15 AM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> On 18 February 2017 at 21:25, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> > yes ...
> >
> > Now, digging into the bits of the IntersectionVisitor::apply(
> osg::Transform&
> > transform) I am seeing it it keeps a stack of the ModelMatrices and they
> are
> > correct, as the visitor traverse the scene it premult the matrices from
> the
> > MatrixTransforms, to this is ok  the code (the osg code) looks just
> > perfect to me just there is a small bug sitting somewhere :)
>
> Could it simply be a precision issue?
> ___
> 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] intersection tests

2017-02-18 Thread Trajce Nikolov NICK
yes ...

Now, digging into the bits of the
IntersectionVisitor::apply(osg::Transform& transform) I am seeing it it
keeps a stack of the ModelMatrices and they are correct, as the visitor
traverse the scene it premult the matrices from the MatrixTransforms, to
this is ok  the code (the osg code) looks just perfect to me just there
is a small bug sitting somewhere :)

On Sat, Feb 18, 2017 at 10:19 PM, Julien Valentin <
julienvalenti...@gmail.com> wrote:

> Hi nick
> okay you're casting ray in world coordinates on model in world
> coordinates...
> I haven't understood
> Then You should not consider the CoordinateFrames as matrix are the same.
> After a look at osgViewer::View::comuteIntersections i noticed
> intersecrionvisitor is created by this  line
>
> Code:
> osg::ref_ptr< osgUtil::LineSegmentIntersector > picker = new osgUtil::
> LineSegmentIntersector(osgUtil::Intersector::MODEL, startVertex,
> endVertex);
>
>
> Perhaps your problem came from here...
>
> cheers
>
>
> Trajce Nikolov NICK wrote:
> > Thanks Julien for your time to give it a look
> >
> > I went further, debugging view->computeIntersections(). The osgpick is
> my starting point and my code is only a mimic of what 
> osgViewer::View::computeIntersection
> is doing, using the IntersectionVisitor
> >
> >
> > A good sample for reproduction is to have some code (I will post it here
> soon) that will load two models (terrain and building - can be the lz.osg
> and the cow.osg from the dataset) place the model somewhere on the terrain
> and rotate the root (the terrain) a bit, and use the osgpick sample. This
> is fast that come to me minds now, although it might not work the same
> since picking from the screen coords and picking in "world space" have
> different CoordinateFrames for the LineSegmentIntersector used that is
> managed differently
> >
> >
> > On Sat, Feb 18, 2017 at 9:33 PM, Julien Valentin < ()> wrote:
> >
> > > Hi nick
> > > At first glance, I don't see any problem with your code...
> > > If you just want to code a mousepicker
> > > osgViewer::View::computeIntersections(screenx,
> screeny,outintersections))
> > >  would fit your needs.
> > >
> > > Code:
> > > // class to handle events with a pick
> > > class PickHandler : public osgGA::GUIEventHandler
> > > {
> > > public:
> > > bool PickHandler::handle(const osgGA::GUIEventAdapter&
> ea,osgGA::GUIActionAdapter& aa)
> > > {
> > > switch(ea.getEventType())
> > > {
> > > case(osgGA::GUIEventAdapter::DOUBLECLICK):
> > > {
> > > osgViewer::View* view = dynamic_cast<osgViewer::View*>();
> > > if (view){
> > > osgUtil::LineSegmentIntersector::Intersections inter;
> > > if(view->computeIntersections(ea.getX(),ea.gety(),inter){
> > > ...blablabla...
> > > }
> > > }
> > > }
> > >
> > >
> > >
> > >
> > > Perhaps you should try it before debugging deeper
> > >
> > > Further, I would recommend the polytopeintersector for general purpose
> picking (it works for points primitives too)
> > >
> > > Hope it helps
> > >
> > >
> > > Cheers
> > >
> > >
> > >
> > > Trajce Nikolov NICK wrote:
> > >
> > > > It has to do with MatrixTransforms and probably the
> IntersectionVisitor. I had my scene rotated a bit and it was buggy. With
> identity matrix on top works well ... Trying to debug if I can find
> something
> > > >
> > > > On Thu, Feb 16, 2017 at 8:31 PM, Trajce Nikolov NICK < ()> wrote:
> > > >
> > > >
> > > > > Hi Community,
> > > > >
> > > > > I am experiencing some bad results from various intersection
> tests. I have a database with buildings and for some reason the
> intersection tests are failing to get me the roofs of the buildings ...
> > > > >
> > > > >
> > > > > Here some snippets of my tries:
> > > > >
> > > > >
> > > > > http://pastebin.com/s7aZk8wA (http://pastebin.com/s7aZk8wA) (
> http://pastebin.com/s7aZk8wA (http://pastebin.com/s7aZk8wA))
> > > > >
> > > > > http://pastebin.com/1s99SGZc (http://pastebin.com/1s99SGZc) (
> http://pastebin.com/1s99SGZc (http://pastebin.com/1s99SGZc))
> > > > >
> > > > > http://pastebin.com/UtkqPRce (http://pastebin.com/UtkqPRce) (
> ht

Re: [osg-users] intersection tests

2017-02-18 Thread Trajce Nikolov NICK
Thanks Julien for your time to give it a look

I went further, debugging view->computeIntersections(). The osgpick is my
starting point and my code is only a mimic of what
osgViewer::View::computeIntersection is doing, using the IntersectionVisitor

A good sample for reproduction is to have some code (I will post it here
soon) that will load two models (terrain and building - can be the lz.osg
and the cow.osg from the dataset) place the model somewhere on the terrain
and rotate the root (the terrain) a bit, and use the osgpick sample. This
is fast that come to me minds now, although it might not work the same
since picking from the screen coords and picking in "world space" have
different CoordinateFrames for the LineSegmentIntersector used that is
managed differently

On Sat, Feb 18, 2017 at 9:33 PM, Julien Valentin <julienvalenti...@gmail.com
> wrote:

> Hi nick
> At first glance, I don't see any problem with your code...
> If you just want to code a mousepicker
> osgViewer::View::computeIntersections(screenx,screeny,outintersections))
>  would fit your needs.
>
> Code:
> // class to handle events with a pick
> class PickHandler : public osgGA::GUIEventHandler
> {
> public:
> bool PickHandler::handle(const osgGA::GUIEventAdapter&
> ea,osgGA::GUIActionAdapter& aa)
> {
> switch(ea.getEventType())
> {
> case(osgGA::GUIEventAdapter::DOUBLECLICK):
> {
> osgViewer::View* view = dynamic_cast<osgViewer::View*>();
> if (view){
> osgUtil::LineSegmentIntersector::Intersections inter;
> if(view->computeIntersections(ea.getX(),ea.gety(),inter){
> ...blablabla...
> }
> }
> }
>
>
>
>
> Perhaps you should try it before debugging deeper
>
> Further, I would recommend the polytopeintersector for general purpose
> picking (it works for points primitives too)
>
> Hope it helps
>
>
> Cheers
>
>
>
> Trajce Nikolov NICK wrote:
> > It has to do with MatrixTransforms and probably the IntersectionVisitor.
> I had my scene rotated a bit and it was buggy. With identity matrix on top
> works well ... Trying to debug if I can find something
> >
> > On Thu, Feb 16, 2017 at 8:31 PM, Trajce Nikolov NICK < ()> wrote:
> >
> > > Hi Community,
> > >
> > > I am experiencing some bad results from various intersection tests. I
> have a database with buildings and for some reason the intersection tests
> are failing to get me the roofs of the buildings ...
> > >
> > >
> > > Here some snippets of my tries:
> > >
> > >
> > > http://pastebin.com/s7aZk8wA (http://pastebin.com/s7aZk8wA)
> > >
> > > http://pastebin.com/1s99SGZc (http://pastebin.com/1s99SGZc)
> > >
> > > http://pastebin.com/UtkqPRce (http://pastebin.com/UtkqPRce)
> > >
> > >
> > >
> > > What I am missing here?
> > >
> > >
> > > Thanks for every hint as always!
> > > Cheers!
> > >
> > > --
> > > trajce nikolov nick
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> > --
> > trajce nikolov nick
> >
> >  --
> > Post generated by Mail2Forum
>
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70269#70269
>
>
>
>
>
> ___
> 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] intersection tests

2017-02-17 Thread Trajce Nikolov NICK
It has to do with MatrixTransforms and probably the IntersectionVisitor. I
had my scene rotated a bit and it was buggy. With identity matrix on top
works well ... Trying to debug if I can find something

On Thu, Feb 16, 2017 at 8:31 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Community,
>
> I am experiencing some bad results from various intersection tests. I have
> a database with buildings and for some reason the intersection tests are
> failing to get me the roofs of the buildings ...
>
> Here some snippets of my tries:
>
> http://pastebin.com/s7aZk8wA
> http://pastebin.com/1s99SGZc
> http://pastebin.com/UtkqPRce
>
> What I am missing here?
>
> Thanks for every hint as always!
> Cheers!
>
> --
> 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] intersection tests

2017-02-16 Thread Trajce Nikolov NICK
Hi Community,

I am experiencing some bad results from various intersection tests. I have
a database with buildings and for some reason the intersection tests are
failing to get me the roofs of the buildings ...

Here some snippets of my tries:

http://pastebin.com/s7aZk8wA
http://pastebin.com/1s99SGZc
http://pastebin.com/UtkqPRce

What I am missing here?

Thanks for every hint as always!
Cheers!

-- 
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] OSVR and Steam (with the osg sample)

2017-02-10 Thread Trajce Nikolov NICK
Thanks Jan .. Yes indeed, this become OSVR specific .. I will write you
off-list

On Fri, Feb 10, 2017 at 2:20 PM, Jan Ciger <jan.ci...@gmail.com> wrote:

> Hello Trajce,
>
> On Fri, Feb 10, 2017 at 2:08 PM, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi community,
>>
>> me again. I am struggling (really first days with this). I know similar
>> topics were discussed here so I hope someone will give some hint
>>
>> I did my home work, web search for answers but no luck. Anyone with
>> steps/hints how to make these working together with the OSG
>> OSVR-Tracker-Viewer? Or links?
>>
>> Thanks a lot
>>
>> p.s. Jan Ciger? :)
>>
>
>
> What exactly are you fighting with?
>
> I don't know much about the HMD support in OSVR, but integration of
> trackers is fairly simple - you open a client and then you poll for new
> data. I haven't played with OSVR-Tracker-Viewer but I imagine that the code
> is along these lines, perhaps calling OSVR from a callback on a node.
>
> Feel free to contact me off-list if it is something OSVR-specific.
>
> Regards,
>
> Jan
>
>
>
>
> _______
> 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] [3rdParty] OSVR and Steam (with the osg sample)

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

me again. I am struggling (really first days with this). I know similar
topics were discussed here so I hope someone will give some hint

I did my home work, web search for answers but no luck. Anyone with
steps/hints how to make these working together with the OSG
OSVR-Tracker-Viewer? Or links?

Thanks a lot

p.s. Jan Ciger? :)

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


[osg-users] [3rdParty] HTC Vive and OSGOpenVRViewer

2017-02-10 Thread Trajce Nikolov NICK
Hi Community,

I have this up and running and I am seeing it working only from one eye
position, like the HMD positional change is not taken into account, only
the orientation. I have calibrated my setup for some space and what I want
to achieve is simply walking through the calibrated area with visual
feedback.

Any hints from those who know a bit more of this project?

Thanks a bunch as always and take my apologize for using this list with
sort of non-osg issue

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 build (master) failed with VS2013 upate 5 3rd party libs x64

2017-02-09 Thread Trajce Nikolov NICK
Hi community,

I just tried to build the master with the mentioned dependencies and it
fails in zconf.h here:

Error 1 error C1083: Cannot open include file: 'unistd.h': No such file or
directory 
d:\dev\openscenegraph-3rdparty-vs2013.5-v120-x64-v10-small\3rdparty_x86_x64\x64\include\zconf.h
454 1 osgDB

#ifndef Z_SOLO
#  if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
#include  /* for SEEK_*, off_t, and _LFS64_LARGEFILE
*/

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


[osg-users] osgVolume intro

2017-02-09 Thread Trajce Nikolov NICK
Hi Community,

I am entering osgVolume for first time. Someone with some hints for this
core feature? Anything is welcome

And 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] combining Quats

2017-02-01 Thread Trajce Nikolov NICK
Hi again list

Actually the math is present in the osgGA::TerrainManipulator (void
TerrainManipulator::clampOrientation()) and it works just great with some
mods (the 3D transforms for nodes are bit different then for the View
matrix.  I am all set.

Sebastian, thanks a lot !

Cheers,
Nick

On Wed, Feb 1, 2017 at 12:43 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Thanks Sebastian!
>
> I will write you off-list
>
> On Wed, Feb 1, 2017 at 12:36 PM, Sebastian Messerschmidt <
> sebastian.messerschm...@gmx.de> wrote:
>
>> Hi Trajce,
>>
>> based on Euler with optional smoothing (to avoid jaggy movement), this
>> algorithm will adapt a local pose conserving heading. The smoothing part is
>> mainly to get a smooth transition between adjacend terrain normals. Sorry
>> for the cluttered code.
>>
>> 
>> IN: gmtl::Vec3d local_normal; gmtl::EulerAngleXZYd
>> orientation;
>>
>>
>> //extract heading
>> const gmtl::Quatd quat  = gmtl::make(orientation);
>>
>> gmtl::Vec3d heading = gmtl::xform(heading, quat,
>> gmtl::Vec3d(0.0,1.0,0.0));
>> //project heading to plane and normalize
>> heading = gmtl::makeNormal(gmtl::Vec3d(heading[0], heading[1],
>> 0.0));
>> // get a vector perpendicular to projected heading and the normal
>> const gmtl::Vec3d perpendicular = gmtl::makeCross(local_normal,
>> heading);
>> const gmtl::Vec3d perpendicular_2 =
>> gmtl::makeCross(perpendicular, local_normal);
>> // construct a new orientation leaving the heading untouched
>> orientation = gmtl::EulerAngleZXYd  (
>>
>>   orientation[0]
>>
>>   ,gmtl::Math::aSin(perpendicular_2[2])
>>
>>   ,gmtl::Math::aTan2(perpendicular[2], local_normal[2])
>>
>>   );
>> if (smooth_factor < 1.0)
>> {
>> gmtl::Quatd target_quat = gmtl::makeRot(ori
>> entation);
>> target_quat = gmtl::slerp(target_quat, smooth_factor,
>> quat, target_quat);
>> orientation = gmtl::makeRot> ZXYd>(gmtl::makeRot(target_quat));
>> }
>> 
>>
>> Cheers
>> Sebastian
>>
>> P.S. If you got further questions, simply drop me a private message/email.
>>
>>
>>
>>
>> Am 2/1/2017 um 11:27 AM schrieb Trajce Nikolov NICK:
>>
>>> Hi Sebastian,
>>>
>>> the code will be welcome. I was expecting that the proper way is to go
>>> through Eulers
>>>
>>> Thanks a lot!
>>>
>>>
>>> On Wed, Feb 1, 2017 at 9:48 AM, Sebastian Messerschmidt
>>> <sebastian.messerschm...@gmx.de <mailto:sebastian.messerschm...@gmx.de>>
>>>
>>> wrote:
>>>
>>> Hi Trajce,
>>>
>>> Did I miss the question :-) If it is working: fine. :-)
>>>
>>> In general you are extracting the heading I guess (with the
>>> modelOrientation) and put it on top the tilted normal, which will
>>> put you on in this pose. The problem might be, that you introduce
>>> unwanted roll with this. I can give you some code (not based on OSG,
>>> but you'll get the idea) adapting a EulerAngle pose to a terrain
>>> normal using a local tangent plane.
>>>
>>> Cheers
>>> Sebastian
>>>
>>>
>>>
>>>
>>> Hi community,
>>>
>>> this is sort of easy math question (btw, I missed that part in my
>>> classes ;-) ) I want to check it with you.
>>>
>>> It is about node following terrain. my node is MatrixTransform
>>> and I
>>> have to set it in world coordinates. The node has it's own
>>> rotation and
>>> I just need to take the terrain normal into account. Here is the
>>> pseudocode that produces some acceptable results (not sure if
>>> they are
>>> correct though, thus asking you for hints)
>>>
>>> Vec3 terrainNormal;
>>>
>>> Quat terrainOrientation;
>>> terrainOrientation.makeRotate(Vec3(0,0,1), terrainNormal);
>>>
>>> Quat modelOrientation;
>>> modelOrientation.makeRotate(Vec3(0,1,0), whatever);
>>>
>>> Quat q;
>>> q = terrainOrientation * modelOrientation; // not sure about this
>>>
>>> MatrixTra

Re: [osg-users] combining Quats

2017-02-01 Thread Trajce Nikolov NICK
Thanks Sebastian!

I will write you off-list

On Wed, Feb 1, 2017 at 12:36 PM, Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de> wrote:

> Hi Trajce,
>
> based on Euler with optional smoothing (to avoid jaggy movement), this
> algorithm will adapt a local pose conserving heading. The smoothing part is
> mainly to get a smooth transition between adjacend terrain normals. Sorry
> for the cluttered code.
>
> 
> IN: gmtl::Vec3d local_normal; gmtl::EulerAngleXZYd
> orientation;
>
>
> //extract heading
> const gmtl::Quatd quat  = gmtl::make(orientation);
>
> gmtl::Vec3d heading = gmtl::xform(heading, quat,
> gmtl::Vec3d(0.0,1.0,0.0));
> //project heading to plane and normalize
> heading = gmtl::makeNormal(gmtl::Vec3d(heading[0], heading[1],
> 0.0));
> // get a vector perpendicular to projected heading and the normal
> const gmtl::Vec3d perpendicular = gmtl::makeCross(local_normal,
> heading);
> const gmtl::Vec3d perpendicular_2 = gmtl::makeCross(perpendicular,
> local_normal);
> // construct a new orientation leaving the heading untouched
> orientation = gmtl::EulerAngleZXYd  (
>
>   orientation[0]
>
>   ,gmtl::Math::aSin(perpendicular_2[2])
>
>   ,gmtl::Math::aTan2(perpendicular[2], local_normal[2])
>
>   );
> if (smooth_factor < 1.0)
> {
> gmtl::Quatd target_quat = gmtl::makeRot(ori
> entation);
> target_quat = gmtl::slerp(target_quat, smooth_factor,
> quat, target_quat);
> orientation = gmtl::makeRot ZXYd>(gmtl::makeRot(target_quat));
> }
> 
>
> Cheers
> Sebastian
>
> P.S. If you got further questions, simply drop me a private message/email.
>
>
>
>
> Am 2/1/2017 um 11:27 AM schrieb Trajce Nikolov NICK:
>
>> Hi Sebastian,
>>
>> the code will be welcome. I was expecting that the proper way is to go
>> through Eulers
>>
>> Thanks a lot!
>>
>>
>> On Wed, Feb 1, 2017 at 9:48 AM, Sebastian Messerschmidt
>> <sebastian.messerschm...@gmx.de <mailto:sebastian.messerschm...@gmx.de>>
>>
>> wrote:
>>
>> Hi Trajce,
>>
>> Did I miss the question :-) If it is working: fine. :-)
>>
>> In general you are extracting the heading I guess (with the
>> modelOrientation) and put it on top the tilted normal, which will
>> put you on in this pose. The problem might be, that you introduce
>> unwanted roll with this. I can give you some code (not based on OSG,
>> but you'll get the idea) adapting a EulerAngle pose to a terrain
>> normal using a local tangent plane.
>>
>> Cheers
>> Sebastian
>>
>>
>>
>>
>> Hi community,
>>
>> this is sort of easy math question (btw, I missed that part in my
>> classes ;-) ) I want to check it with you.
>>
>> It is about node following terrain. my node is MatrixTransform
>> and I
>> have to set it in world coordinates. The node has it's own
>> rotation and
>> I just need to take the terrain normal into account. Here is the
>> pseudocode that produces some acceptable results (not sure if
>> they are
>> correct though, thus asking you for hints)
>>
>> Vec3 terrainNormal;
>>
>> Quat terrainOrientation;
>>     terrainOrientation.makeRotate(Vec3(0,0,1), terrainNormal);
>>
>> Quat modelOrientation;
>> modelOrientation.makeRotate(Vec3(0,1,0), whatever);
>>
>> Quat q;
>> q = terrainOrientation * modelOrientation; // not sure about this
>>
>> MatrixTransform mxt = ...
>> mxt->setMatrix(Matrixd:;rotate(q) * ...);
>>
>> Any hints?
>>
>> Thanks a bunch as always!
>> Nick
>>
>>
>> --
>> trajce nikolov nick
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> <mailto:osg-users@lists.openscenegraph.org>
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opens
>> cenegraph.org
>> <http://lists.openscenegraph.org/listinfo.cgi/osg-users-open
>> scenegraph.org>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.or

Re: [osg-users] combining Quats

2017-02-01 Thread Trajce Nikolov NICK
Hi Sebastian,

the code will be welcome. I was expecting that the proper way is to go
through Eulers

Thanks a lot!


On Wed, Feb 1, 2017 at 9:48 AM, Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de> wrote:

> Hi Trajce,
>
> Did I miss the question :-) If it is working: fine. :-)
>
> In general you are extracting the heading I guess (with the
> modelOrientation) and put it on top the tilted normal, which will put you
> on in this pose. The problem might be, that you introduce unwanted roll
> with this. I can give you some code (not based on OSG, but you'll get the
> idea) adapting a EulerAngle pose to a terrain normal using a local tangent
> plane.
>
> Cheers
> Sebastian
>
>
>
>
> Hi community,
>>
>> this is sort of easy math question (btw, I missed that part in my
>> classes ;-) ) I want to check it with you.
>>
>> It is about node following terrain. my node is MatrixTransform and I
>> have to set it in world coordinates. The node has it's own rotation and
>> I just need to take the terrain normal into account. Here is the
>> pseudocode that produces some acceptable results (not sure if they are
>> correct though, thus asking you for hints)
>>
>> Vec3 terrainNormal;
>>
>> Quat terrainOrientation;
>> terrainOrientation.makeRotate(Vec3(0,0,1), terrainNormal);
>>
>> Quat modelOrientation;
>> modelOrientation.makeRotate(Vec3(0,1,0), whatever);
>>
>> Quat q;
>> q = terrainOrientation * modelOrientation; // not sure about this
>>
>> MatrixTransform mxt = ...
>> mxt->setMatrix(Matrixd:;rotate(q) * ...);
>>
>> Any hints?
>>
>> 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] combining Quats

2017-02-01 Thread Trajce Nikolov NICK
Hi community,

this is sort of easy math question (btw, I missed that part in my classes
;-) ) I want to check it with you.

It is about node following terrain. my node is MatrixTransform and I have
to set it in world coordinates. The node has it's own rotation and I just
need to take the terrain normal into account. Here is the pseudocode that
produces some acceptable results (not sure if they are correct though, thus
asking you for hints)

Vec3 terrainNormal;

Quat terrainOrientation;
terrainOrientation.makeRotate(Vec3(0,0,1), terrainNormal);

Quat modelOrientation;
modelOrientation.makeRotate(Vec3(0,1,0), whatever);

Quat q;
q = terrainOrientation * modelOrientation; // not sure about this

MatrixTransform mxt = ...
mxt->setMatrix(Matrixd:;rotate(q) * ...);

Any hints?

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] different result rotating Vec3d for Quat or Matrixd

2017-01-24 Thread Trajce Nikolov NICK
Hi,

> osg::Vec3d localEyeOffset2 = rotationMatrix * eyeOffset;

if you swap the order of the matrix and the vector will you get the same
result?

On Tue, Jan 24, 2017 at 11:25 AM, Gianni Ambrosio <g.ambrosio+...@gmail.com>
wrote:

> Hi,
> may be this is a newbie question but I would like to understand the reason
> of this behaviour.
>
> I have to calculate the coordinate of a 3D point wrt a different
> coordinate reference. The new coordinate reference is simply rotated wrt
> the first one. I tried two different implementations with different results.
>
> osg::Vec3d eyeOffset(0.0, 0.0, 300.0);
> osg::Quat rotation(osg::DegreesToRadians(0.0), osg::Z_AXIS,
> osg::DegreesToRadians(0.0),  osg::Y_AXIS, osg::DegreesToRadians(45.0),
> osg::X_AXIS);
> osg::Vec3d localEyeOffset = rotation * eyeOffset;
> osg::Matrixd rotationMatrix(rotation);
> osg::Vec3d localEyeOffset2 = rotationMatrix * eyeOffset;
>
> I expected to have the same result for localEyeOffset and localEyeOffset2,
> while this is what I get:
> localEyeOffset is (0.0, -212.132, 212.132)
> localEyeOffset2 is (0.0, 212.132, 212.132)
>
> Can you explain me why?
>
> Regards,
> Gianni
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70034#70034
>
>
>
>
>
> ___
> 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] osgQt and osg (CMake)

2017-01-17 Thread Trajce Nikolov NICK
Hi again,

only thing I just spotted is the missing Find3rdPartyDependencies.cmake in
the osgQt/CMakeModules. Cmake complains about this. To make it right this
file has to be copied from the OSG/CmakeModules into osgQt/CmakeModules. It
is Windows specific based on the code from the osgQt/CMakeLists.txt

# 3rd Party Dependency Stuff
IF(WIN32)
INCLUDE(Find3rdPartyDependencies)
ENDIF()

On Tue, Jan 17, 2017 at 2:54 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Mathieu, Paul, Robert,
>
> I must apologize for the noise again :-(,  I was working on some other git
> repo I found the link in this list
> https://github.com/robertosfield/osgQt
> <https://github.com/openscenegraph/osgQt>
>
> This one https://github.com/openscenegraph/osgQt is just fine, I just
> gave it a try, so we are all good :-)
>
> I am sorry again, I should have read the whole thread not just pick up the
> first link
> Nick
>
> On Tue, Jan 17, 2017 at 11:19 AM, Mathieu MARACHE <
> mathieu.mara...@gmail.com> wrote:
>
>>
>> Hi,
>>
>> Could you please post a Pull request on the osgQt project also ? It would
>> benefit every one this way !
>>
>> https://github.com/openscenegraph/osgQt
>>
>> Thanks
>>
>> Le mar. 17 janv. 2017 à 03:29, Trajce Nikolov NICK <
>> trajce.nikolov.n...@gmail.com> a écrit :
>>
>>> Hi Paul,
>>>
>>> sure. Just give me some time since I have hacked it fast for me test
>>> purposes. Let do it proper :-). Will ping you shortly with the updated
>>> files.
>>>
>>> Cheers,
>>> Nick
>>>
>>> On Tue, Jan 17, 2017 at 2:51 AM, Paul McIntosh <
>>> paul.mcint...@internetscooter.com> wrote:
>>>
>>>
>>>
>>>
>>> Trajce Nikolov NICK wrote:
>>>
>>>
>>> > Hi Robert,
>>>
>>>
>>> >
>>>
>>>
>>> > what I tried to say and it fixed it was to call INCLUDE(
>>> FindOpenSceneGraph ) in the main CMakeLists.txt and use the
>>> OSG_INCLUDE_DIRS and OSG_LIBRARIES in the project CMakeLists.txt
>>>
>>>
>>> >
>>>
>>>
>>> >
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Trajce could you post the new CMakelists.txt? I am having a go at fixing
>>> up the readme to focus only on osgQT and testing it out on Windows.
>>>
>>>
>>>
>>>
>>>
>>> Cheers,
>>>
>>>
>>>
>>>
>>>
>>> Paul
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> Read this topic online here:
>>>
>>>
>>> http://forum.openscenegraph.org/viewtopic.php?p=69978#69978
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ___
>>>
>>>
>>> osg-users mailing list
>>>
>>>
>>> osg-users@lists.openscenegraph.org
>>>
>>>
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opens
>>> cenegraph.org
>>>
>>>
>>>
>>>
>>>
>>> --
>>> trajce nikolov nick
>>>
>>>
>>>
>>>
>>> ___
>>>
>>> osg-users mailing list
>>>
>>> osg-users@lists.openscenegraph.org
>>>
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opens
>>> cenegraph.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] osgQt and osg (CMake)

2017-01-17 Thread Trajce Nikolov NICK
Hi Mathieu, Paul, Robert,

I must apologize for the noise again :-(,  I was working on some other git
repo I found the link in this list
https://github.com/robertosfield/osgQt
<https://github.com/openscenegraph/osgQt>

This one https://github.com/openscenegraph/osgQt is just fine, I just gave
it a try, so we are all good :-)

I am sorry again, I should have read the whole thread not just pick up the
first link
Nick

On Tue, Jan 17, 2017 at 11:19 AM, Mathieu MARACHE <mathieu.mara...@gmail.com
> wrote:

>
> Hi,
>
> Could you please post a Pull request on the osgQt project also ? It would
> benefit every one this way !
>
> https://github.com/openscenegraph/osgQt
>
> Thanks
>
> Le mar. 17 janv. 2017 à 03:29, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> a écrit :
>
>> Hi Paul,
>>
>> sure. Just give me some time since I have hacked it fast for me test
>> purposes. Let do it proper :-). Will ping you shortly with the updated
>> files.
>>
>> Cheers,
>> Nick
>>
>> On Tue, Jan 17, 2017 at 2:51 AM, Paul McIntosh <paul.mcintosh@
>> internetscooter.com> wrote:
>>
>>
>>
>>
>> Trajce Nikolov NICK wrote:
>>
>>
>> > Hi Robert,
>>
>>
>> >
>>
>>
>> > what I tried to say and it fixed it was to call INCLUDE(
>> FindOpenSceneGraph ) in the main CMakeLists.txt and use the
>> OSG_INCLUDE_DIRS and OSG_LIBRARIES in the project CMakeLists.txt
>>
>>
>> >
>>
>>
>> >
>>
>>
>>
>>
>>
>>
>>
>>
>> Trajce could you post the new CMakelists.txt? I am having a go at fixing
>> up the readme to focus only on osgQT and testing it out on Windows.
>>
>>
>>
>>
>>
>> Cheers,
>>
>>
>>
>>
>>
>> Paul
>>
>>
>>
>>
>>
>> --
>>
>>
>> Read this topic online here:
>>
>>
>> http://forum.openscenegraph.org/viewtopic.php?p=69978#69978
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ___
>>
>>
>> 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] osgQt and osg (CMake)

2017-01-16 Thread Trajce Nikolov NICK
Hi Paul,

sure. Just give me some time since I have hacked it fast for me test
purposes. Let do it proper :-). Will ping you shortly with the updated
files.

Cheers,
Nick

On Tue, Jan 17, 2017 at 2:51 AM, Paul McIntosh <
paul.mcint...@internetscooter.com> wrote:

>
> Trajce Nikolov NICK wrote:
> > Hi Robert,
> >
> > what I tried to say and it fixed it was to call INCLUDE(
> FindOpenSceneGraph ) in the main CMakeLists.txt and use the
> OSG_INCLUDE_DIRS and OSG_LIBRARIES in the project CMakeLists.txt
> >
> >
>
>
> Trajce could you post the new CMakelists.txt? I am having a go at fixing
> up the readme to focus only on osgQT and testing it out on Windows.
>
> Cheers,
>
> Paul
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69978#69978
>
>
>
>
>
> ___
> 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] osgQt and osg (CMake)

2017-01-13 Thread Trajce Nikolov NICK
Hi Robert,

what I tried to say and it fixed it was to call INCLUDE( FindOpenSceneGraph
) in the main CMakeLists.txt and use the OSG_INCLUDE_DIRS and OSG_LIBRARIES
in the project CMakeLists.txt

On Fri, Jan 13, 2017 at 9:31 AM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Nick,
>
> CMake itself has a whole set of find*.cmake scripts for the OSG. There
> is uber one FindOpenSceneGraph.cmake and a series of findosg.cmake,
> findosgUtil.cmake etc.
>
> Robert.
>
> On 10 January 2017 at 00:08, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> > Hi Robert,
> >
> > since now osgQt is separate project, should it be osg dependent and have
> osg
> > as dependency in CMake as any other OSG based project so the user can set
> > OSG (and osg versions one might uses)? I have few OSG versions on my
> system
> > and just gave a try on osgQt with CMake and in short I am missing
> > FindOSG.cmake and the ability to set up the OSG I want (as in any other
> OSG
> > based project). How this suppose to work now ? I am on Windows & Ubuntu,
> the
> > testingwas done on Windows
> >
> > Thanks a lot 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] osgQt and osg (CMake)

2017-01-12 Thread Trajce Nikolov NICK
> osgQt is now a separated project? what do you mean?

robert put it into separate project on github out of the OSG core

On Wed, Jan 11, 2017 at 10:02 AM, Rollastre Prostit <rollas...@gmail.com>
wrote:

> Sorry to step in, but... osgQt is now a separated project? what do you
> mean?
>
> We are very worried about how bad OSG and QT5 perform together. They were
> doing very good with qt4. But now... well, it was understandable when qt5
> appeared. There was a big change and some time is needed to adapt. But...
> well, we are now already with qt5.7 and things don't seem to improve. Not
> many news so far. Only some blog entries demonstrating how to integrate it
> with, say, discrete results... and now this one mentioning "osgQt is a
> separate project". Is Qt support somehow discontinued officially or
> something?
>
> On 10-Jan-17 1:08 AM, Trajce Nikolov NICK wrote:
>
> Hi Robert,
>
> since now osgQt is separate project, should it be osg dependent and have
> osg as dependency in CMake as any other OSG based project so the user can
> set OSG (and osg versions one might uses)? I have few OSG versions on my
> system and just gave a try on osgQt with CMake and in short I am missing
> FindOSG.cmake and the ability to set up the OSG I want (as in any other OSG
> based project). How this suppose to work now ? I am on Windows & Ubuntu,
> the testingwas done on Windows
>
> Thanks a lot as always!
>
> Cheers,
> Nick
>
> --
> 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


[osg-users] osgQt and osg (CMake)

2017-01-09 Thread Trajce Nikolov NICK
Hi Robert,

since now osgQt is separate project, should it be osg dependent and have
osg as dependency in CMake as any other OSG based project so the user can
set OSG (and osg versions one might uses)? I have few OSG versions on my
system and just gave a try on osgQt with CMake and in short I am missing
FindOSG.cmake and the ability to set up the OSG I want (as in any other OSG
based project). How this suppose to work now ? I am on Windows & Ubuntu,
the testingwas done on Windows

Thanks a lot 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] [vpb] Buildings

2017-01-09 Thread Trajce Nikolov NICK
Hi Rambabu,

have a look at these commercial tools, they place feature modeld
(buildings, trees .. etc) from shape files into OpenFlight database:
TerraVista (www.presagis.com), TrianBuilder (www.triangraphics.de)

Nick

On Mon, Jan 9, 2017 at 2:00 PM, Rambabu Repaka <ramboram...@gmail.com>
wrote:

> Hi,Sorry Robert and all forum members who helped me a lot to my questions.
> I will properly ask  questions from know onwards.Can anyone tell me about
> how to place the Buildings,Trees etc on the Terrain.Buildings are in .shp
> format,Terrain is in .flt format,Positioning of the Buildings is adjusted
> by the ig data which is in the format of pitch,rolling and Heading using
> any best tool in osg.
>
> ...
>
>
> Thank you!
>
> Cheers,
> Rambabu
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69938#69938
>
>
>
>
>
> ___
> 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] [vpb] VirtualPlanetBuilder

2017-01-04 Thread Trajce Nikolov NICK
Hi Bhanu,

use the OpenIG forum ... I will post replies there ... Also, make your
questions more meaningful ;-)

Cheers,
Nick

On Wed, Jan 4, 2017 at 12:46 PM, Bhanu Chandra <bhanuchandra...@gmail.com>
wrote:

> Hi,
>
> ...
> i am trying to replace my  terrain with default terrain in
> Application-A320 in MuseOpenIg. I am getting too smaller terrain. Can any
> one help me.
>  I getting both elevation and imagery files from earth explorer and using
> VirtualPlanetBuilder tool, i generated  terrain file.
>
> Thank you!
>
> Cheers,
> Bhanu
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69854#69854
>
>
>
>
>
> ___
> 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] Draw vertex as Circle with color given by some Vec4 array

2017-01-03 Thread Trajce Nikolov NICK
Hi Bruno,

As I am recalling how this is to be done is something like this:

Let say you want to pass colors as vertex attributes:

const size_t vertexAttribLocation = 5;

osg::Vec4Array* colors = new ...
osg::Geometry* geometry = new ...

geometry->setVertexAttribArray(vertexAttribLocation
,colors,osg::Array::BIND_PER_VERTEX);

osg::Program* program = new ...
program->addBindAttribLocation("colors", vertexAttribLocation );

and then in your GLSL you just call it by the name "colors"

#version 120
attribute vec4 colors;
void main(void) 

you do the same for the radius and you may do it for the vertices itself
although based on your GLSL version you can use gl_Vertex too

Hope this helps
Nick



On Mon, Jan 2, 2017 at 11:10 PM, Bruno Oliveira <
bruno.manata.olive...@gmail.com> wrote:

> Hi Nick,
> thanks for your answer. I read the osgvertexattributes.cpp example and did
> not quite get it at first. Do you know if there are any further
> documentation or snippets I could read?
>
> Or maybe if you have quick snippets it could spare me some valuable time.
>
> 2017-01-02 20:56 GMT+00:00 Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com>:
>
>> Hi Bruno,
>>
>> yes, you can pass VertexAttributes to the program and look them up in the
>> shader. You can pass the centers as Vec3Array, Vec4Array for colors and
>> probably encode the radius into float array or the vertex.w() from the
>> vertex array.
>>
>> Do a search through the examples for how to set up your program with
>> VertexAttributes ... Ping me if you if troubles, I might be able to give
>> some snippets
>>
>> Cheers,
>> Nick
>>
>> On Mon, Jan 2, 2017 at 8:21 PM, Bruno Oliveira <
>> bruno.manata.olive...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>>
>>> I have an array of 3d points that I want to render in a scene. I want to
>>> render them as circles, centered on each point coordinates, with a given
>>> radius and a color that is given by a color array I have in memory.
>>>
>>> For now, I am creating a node for each point, that consists of a
>>> PrimitiveSet (polygon) that I iterate around the point center. (Check code
>>> below).
>>>
>>>
>>> Now I know this can be done with Shaders. I can draw the circle directly
>>> in the fragment shader with this example (http://www.geeks3d.com/201307
>>> 05/shader-library-circle-disc-fake-sphere-in-glsl-opengl-glslhacker/).
>>>
>>> But I need to pass the vertex centers and respective colors. Is it
>>> possible to pass a osg::Vec3Array* with vertex centers and a
>>> osg::Vec4Array* of colors directly to a Shader, so that I can , in a single
>>> compiled Shader program, handle all point positions and colors?
>>>
>>> Here is teh code for drawing the circle, I use this for each vertex:
>>>
>>> osg::Vec3Array* getArray(const float radius, const int points, const
>>> osg::Vec3& center) {
>>> auto array = new osg::Vec3Array();
>>> const float ratio = (float(2.0*osg::PI) / float(points));
>>> for (int i = 0; i < points; i++) {
>>> const float angle = float(i) * ratio;
>>> array->push_back(osg::Vec3(
>>> center.x() + radius*cosf( angle ),
>>> center.y() + radius*sinf( angle ),
>>> center.z())
>>> );
>>> }
>>> return array;
>>> }
>>>
>>> osg::Geometry* getGeometry(const float radius, const int points, const
>>> osg::Vec3& center) {
>>> osg::Geometry* geom = new osg::Geometry();
>>>
>>> geom->setVertexArray(getArray(radius, points, center));
>>> geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POLYGON,
>>> 0, points));
>>>
>>> return geom;
>>> }
>>>
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opens
>>> cenegraph.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] Draw vertex as Circle with color given by some Vec4 array

2017-01-02 Thread Trajce Nikolov NICK
Hi Bruno,

yes, you can pass VertexAttributes to the program and look them up in the
shader. You can pass the centers as Vec3Array, Vec4Array for colors and
probably encode the radius into float array or the vertex.w() from the
vertex array.

Do a search through the examples for how to set up your program with
VertexAttributes ... Ping me if you if troubles, I might be able to give
some snippets

Cheers,
Nick

On Mon, Jan 2, 2017 at 8:21 PM, Bruno Oliveira <
bruno.manata.olive...@gmail.com> wrote:

> Hello,
>
>
> I have an array of 3d points that I want to render in a scene. I want to
> render them as circles, centered on each point coordinates, with a given
> radius and a color that is given by a color array I have in memory.
>
> For now, I am creating a node for each point, that consists of a
> PrimitiveSet (polygon) that I iterate around the point center. (Check code
> below).
>
>
> Now I know this can be done with Shaders. I can draw the circle directly
> in the fragment shader with this example (http://www.geeks3d.com/
> 20130705/shader-library-circle-disc-fake-sphere-in-glsl-opengl-glslhacker/).
>
>
> But I need to pass the vertex centers and respective colors. Is it
> possible to pass a osg::Vec3Array* with vertex centers and a
> osg::Vec4Array* of colors directly to a Shader, so that I can , in a single
> compiled Shader program, handle all point positions and colors?
>
> Here is teh code for drawing the circle, I use this for each vertex:
>
> osg::Vec3Array* getArray(const float radius, const int points, const
> osg::Vec3& center) {
> auto array = new osg::Vec3Array();
> const float ratio = (float(2.0*osg::PI) / float(points));
> for (int i = 0; i < points; i++) {
> const float angle = float(i) * ratio;
> array->push_back(osg::Vec3(
> center.x() + radius*cosf( angle ),
> center.y() + radius*sinf( angle ),
> center.z())
> );
> }
> return array;
> }
>
> osg::Geometry* getGeometry(const float radius, const int points, const
> osg::Vec3& center) {
> osg::Geometry* geom = new osg::Geometry();
>
> geom->setVertexArray(getArray(radius, points, center));
> geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POLYGON,
> 0, points));
>
> return geom;
> }
>
>
> ___________
> 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] View::computeIntersections

2017-01-02 Thread Trajce Nikolov NICK
ehm ... dirtyBound(); fixed it .. sorry for the noise ... ;-)

Happy New Year

On Mon, Jan 2, 2017 at 6:32 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Community,
>
> I come across some odd issue by using this. In short, the story is that I
> have some sort of elevation manipulator (make hills, valleys with the mouse
> on some terrain model, interactively). And I have a center of impact with
> some radius, and simply by moving the mouse, I fire this intersection test,
> get the world point, set it as a center and trigger the vertices within the
> radius up/down. And this works correct and nice on existing model (the
> lz.osg model from the OSG-Data).
>
> I have extended the tool to generate generic terrains - heightfield +
> texture. And I can trigger again the elevation vertices anywhere and I see
> it nicely visually (calling vertices->getBufferObject()->dirty();).
> However the intersection test fails for my new "hills" for this generated
> terrain skin.
>
> I have no clue what is going on, it seam to me that the intersector is
> using some sort of cache or such ... Any hint on this?
>
> I hope I made it clear. Obviously I can not post video for the scenario
>
> Thanks a lot for any idea
>
> 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] View::computeIntersections

2017-01-02 Thread Trajce Nikolov NICK
Hi Community,

I come across some odd issue by using this. In short, the story is that I
have some sort of elevation manipulator (make hills, valleys with the mouse
on some terrain model, interactively). And I have a center of impact with
some radius, and simply by moving the mouse, I fire this intersection test,
get the world point, set it as a center and trigger the vertices within the
radius up/down. And this works correct and nice on existing model (the
lz.osg model from the OSG-Data).

I have extended the tool to generate generic terrains - heightfield +
texture. And I can trigger again the elevation vertices anywhere and I see
it nicely visually (calling vertices->getBufferObject()->dirty();). However
the intersection test fails for my new "hills" for this generated terrain
skin.

I have no clue what is going on, it seam to me that the intersector is
using some sort of cache or such ... Any hint on this?

I hope I made it clear. Obviously I can not post video for the scenario

Thanks a lot for any idea

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] mygui integration (for Wang Rui)

2016-12-31 Thread Trajce Nikolov NICK
Guys, if you keep the english someone else might jump in and help you ;-)
...

I have successfully integrated MyGUI in OpenIG, based on Rui's code. Here
is reference:
https://github.com/CCSI-CSSI/MuseOpenIG/tree/master/Plugin-UI

Happy New Year !

On Sat, Dec 31, 2016 at 5:45 PM, Denis Colesnicov <eugus...@gmail.com>
wrote:

> ну я нашел короче это (http://fr.sfml-dev.org/
> forums/index.php?topic=6651.0). Если смогу сделать бинд на SFGUI так OSG
> всё ещо в теме.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69816#69816
>
>
>
>
>
> ___
> 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] Texture projection on terrain and gl_TextureMatrix[0...7]

2016-12-22 Thread Trajce Nikolov NICK
Hi Ekaterina,

post your code ... We can fix it when time permits ;-)

On Thu, Dec 22, 2016 at 4:27 PM, Christian Buchner <
christian.buch...@gmail.com> wrote:

> Just some wild guesses:
>
> You might have to enable blending in the state set, and set an appropriate
> blend function as (depending on whether your projective texturing is done
> in a 2nd render pass or not)
>
> On hardware that does not support opengl border colors
> (ARB_texture_border_clamp) in hardware, you might have to explicitly set
> the texture's border pixels to a transparent color, turning a 512x512 image
> into effectively a 510x510 one.
>
> Christian
>
>
> 2016-12-22 16:03 GMT+01:00 Ekaterina Fokina <ekaterina.fok...@tum.de>:
>
>> Thank you your answers!
>>
>> Attached there is a printscreen what I get.
>> For the terrain I am using lz.osgt and the image for the texture file is
>> osg128.png.
>>
>> I set the border to transparent, but unfortunatelly it didn´t help...
>>
>> Guys, could you please give me a hint how is it possible to relocate the
>> projected image on the terrain to a specific location on that terrain?
>> I am still confused how to set the texture coordinats uning shaders.
>>
>> Thank you!
>>
>> Cheers,
>> Ekaterina
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=69738#69738
>>
>>
>>
>>
>> ___
>> 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] osgTerrain::TerrainTile not in parental list (??)

2016-12-06 Thread Trajce Nikolov NICK
Thanks Robert ! Very well explained !

Cheers!
Nick

On Tue, Dec 6, 2016 at 10:17 AM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Nick,
>
> On 6 December 2016 at 05:38, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> > Hi Robert, Community,
> >
> > This might sounds stupid so I am apologize upfront. I spent some time
> > reading the code of TerrainTile and I am seeing it as a Group (right?).
> When
> > using NodeVisitors I am seeing the TerrainTiles as part of the scene.
> When I
> > want to use it as ordinary Group it is not.
> >
> > For example, I have this scene:
> > PagedLOD->Group->TerrainTile->MatrixTransform->Geode
> >
> > MatrixTransform is reporting 0 numParents and
> Geode->getParentalNodePaths is
> > up to the MatrixTransform
> >
> > I am confused. I am after replacing the TerrainTile with my own
> Group/Node
>
> The TerrainTile "has a" TerrainTechnique, and it's the concrete
> TerrainTechnique (such as GeometryTechnique) to take the elevant and
> image layers assigned to the TerrailTile and create a local subgraph
> capable of rendering that data.
>
> It's entirely up to the TerrainTechnique how it creates and manages
> it's own local subgraph graph, and typically won't directly assign it
> to the main scene graph, rather it it's self contained within the
> TerrainTechnique, this means the parent can be null for the topmost
> node in the local subgraph.  This subgraph is still traversed because
> TerrainTile calls TerrainTechnique on each traversal, and the
> TerrainTechnique implementation can decide how best to do the
> traversal of it's local subgraph.
>
> The fact that the local subraphs are traversed means that the
> NodeVisitor's that are doing the traversal will collect the full
> NodePath from the root of the scene graph down through the TerrainTile
> to the local subgraph, so if you want  the parental chain then a
> visitor will provide this for you.
>
> 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] osgTerrain::TerrainTile not in parental list (??)

2016-12-05 Thread Trajce Nikolov NICK
Hi Robert, Community,

This might sounds stupid so I am apologize upfront. I spent some time
reading the code of TerrainTile and I am seeing it as a Group (right?).
When using NodeVisitors I am seeing the TerrainTiles as part of the scene.
When I want to use it as ordinary Group it is not.

For example, I have this scene:
PagedLOD->Group->TerrainTile->MatrixTransform->Geode

MatrixTransform is reporting 0 numParents and Geode->getParentalNodePaths
is up to the MatrixTransform

I am confused. I am after replacing the TerrainTile with my own Group/Node

Thanks for any hint

-- 
trajce nikolov nick

p.s. I know I am bombing you with these topics lately but very close to a
great milestone, so I am really thankful for any hint
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] replace tile with my own Node in VPB generated QuadTree

2016-12-03 Thread Trajce Nikolov NICK
Thanks Sebastion, Robert,

I did indeed dump the part of the scene into osgt and here is the hierarchy
(GeometryTechnique used):
PagedLOD->Group->TerrainTile (4x these)->MatrixTransform->Geode

After some experiments I am successful now in injecting my own node (simply
replaced the Geode with my own Geometry). I am after replacing the
TerrainTile with Group or MatrixTransform. Havn't looked into TerrainTile
but probably this contains some transformation (which one, the local to
ECEF??) since simply replacing it by Group is not working

Also, In my replacement of the original VPB Geode, I am using Geometry
where I am generating normals with osgUtil::SmoothingVisitor, and these are
wrong in the final output as well. Any clue?

Thanks a bunch for so far

Nick

On Sat, Dec 3, 2016 at 5:04 PM, Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de> wrote:

> Hi Nick,
>
> Hi Robert, Community,
>
> I am hacking the VPB process again :-).
>
> The story is this: I transform tiles back from ECEF to local, do something
> with the Geometry and I want to replace the tile with my own Node. Spent
> already hours reading and trying to understand the SceneGraph with all this
> transforms, and I am failing.
>
>
>
> Any words of how these tiles in the QuadTree are represented? I mean the
> tree and the transforms, I know the facts that they are coming from
> TerrainTiles with proper Locators, but after when the GeometryTechnique is
> applied.
>
> I worked it out some years ago, where I needed to capture the
> transformations for a query-representation. Basically you will have a
> height field-layer inside the terrain-tile, which describes itself via a
> Locator and the height-values in a normalized coordinate frame. IIRC the
> complete ECEF-Transform is captured inside the locator. It simply assumes
> the height-field as being centered around the geographic position when
> creating the world-geometry.
> Some snippet to retrieve the world-coordinates of the terrain-tile's
> center:
> 
> osgTerrain::TerrainTile& terrain_tile = dynamic_cast TerrainTile&>(node);
> osgTerrain::HeightFieldLayer* hf_layer= dynamic_cast HeightFieldLayer*>(terrain_tile.getElevationLayer());
> osgTerrain::Locator* locator = terrain_tile.getLocator();
> osg::EllipsoidModel* es = locator->getEllipsoidModel();
>
> //compute center transform
> osg::Vec3d center_model;
> tile ->convertLocalToModel(osg::Vec3d(0.5,0.5,0.0), center_model);
>
> 
> I'm not quite sure which coordinate frame is used in the quadtree itself,
> but it should be easy enough to put some subgraph to an osgt to inspect.
>
> Cheers
> Sebastian
>
>
> Thanks so much for any word on this. It is the last bump in my current dev
>
> Cheers,
> Nick
>
> --
> 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


[osg-users] replace tile with my own Node in VPB generated QuadTree

2016-12-02 Thread Trajce Nikolov NICK
Hi Robert, Community,

I am hacking the VPB process again :-).

The story is this: I transform tiles back from ECEF to local, do something
with the Geometry and I want to replace the tile with my own Node. Spent
already hours reading and trying to understand the SceneGraph with all this
transforms, and I am failing.

Any words of how these tiles in the QuadTree are represented? I mean the
tree and the transforms, I know the facts that they are coming from
TerrainTiles with proper Locators, but after when the GeometryTechnique is
applied.

Thanks so much for any word on this. It is the last bump in my current dev

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] Latitude and longitude

2016-12-01 Thread Trajce Nikolov NICK
Hi Bhanu,

have a look at osg/CoordinateSystemNode for the osg::EllipsoidModel ...
This class is doing the conversion

On Thu, Dec 1, 2016 at 1:52 PM, Bhanu Chandra <bhanuchandra...@gmail.com>
wrote:

> Hi,
>
> How to set lat & lan positions to the osg screen.
> ...
>
> Thank you!
>
> Cheers,
> Bhanu
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69566#69566
>
>
>
>
>
> ___
> 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] Reverse engineer the VPB tile generation process

2016-11-30 Thread Trajce Nikolov NICK
Nevermind ... I did it with Quat from the tile geocentric up to local Z ...
Please ignore

On Wed, Nov 30, 2016 at 6:33 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Robert, Community,
>
> I spent today some time to learn about the final output of the VPB tools
> and the terrain techniques (I am ok with the basic one for this moment, the
> GeometryTechnique). So the tiles are in quadtree fashion, and the generated
> geometry resides into Geodes, which is obvious. And this is for geocentric
> databases.
>
> My goal is: to bring the tiles back to "source space". I can get the
> nodepath of every single Geode representing a tile, get the localToWorld
> matrix and apply its inverse to the Tile vertices - to have the tile back
> to (0,0,0) from its ellipsoid position/orientation.
>
> When I do this, I am seeing the tiles back to (0,0,0) but they keep
> oriented as on the ellipsoid, so I am after a hint where is this geocentric
> orientation applied and how to "revert" it back
>
> Thanks for any hint
>
> 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] Reverse engineer the VPB tile generation process

2016-11-30 Thread Trajce Nikolov NICK
Hi Robert, Community,

I spent today some time to learn about the final output of the VPB tools
and the terrain techniques (I am ok with the basic one for this moment, the
GeometryTechnique). So the tiles are in quadtree fashion, and the generated
geometry resides into Geodes, which is obvious. And this is for geocentric
databases.

My goal is: to bring the tiles back to "source space". I can get the
nodepath of every single Geode representing a tile, get the localToWorld
matrix and apply its inverse to the Tile vertices - to have the tile back
to (0,0,0) from its ellipsoid position/orientation.

When I do this, I am seeing the tiles back to (0,0,0) but they keep
oriented as on the ellipsoid, so I am after a hint where is this geocentric
orientation applied and how to "revert" it back

Thanks 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] IntersectionVisitor and USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION

2016-11-29 Thread Trajce Nikolov NICK
Hi again Robert,

attached is the mods to make it work with USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION
 too when traversing the PagedLODs. For my end it works. I would make a
pull request but stuck with 3.5.5 and it is two additional lines of code.
Please review...

Thanks and cheers!
Nick

On Tue, Nov 29, 2016 at 11:34 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Robert,
>
> USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION seams to not have effect no matter
> if it is selected or not. I traced the code and as is written now
> IntersectionVisitor::apply(osg::PagedLOD& plod) is working always with
> the highest res.
>
> // Perform an intersection test only on children that display
> // at the maximum resolution.
>
> I need this functionality to be able to pick on the level of detail based
> on the distance from the eyepoint. I am seeing there is a override for that
> but it is never used
>
> float IntersectionVisitor::getDistanceToEyePoint(const osg::Vec3& pos,
> bool /*withLODScale*/) const
> {
> if (_lodSelectionMode==USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION)
> {
> return (pos-getEyePoint()).length();
> }
> else
> {
> return 0.0f;
> }
> }
>
> If you are very busy and give some hints I can try to implement this
> functionality
>
> Thanks a lot!
>
> --
> trajce nikolov nick
>



-- 
trajce nikolov nick
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

using namespace osgUtil;


///
//
//  IntersectorGroup
//

IntersectorGroup::IntersectorGroup()
{
}

void IntersectorGroup::addIntersector(Intersector* intersector)
{
_intersectors.push_back(intersector);
}

void IntersectorGroup::clear()
{
_intersectors.clear();
}

Intersector* IntersectorGroup::clone(osgUtil::IntersectionVisitor& iv)
{
IntersectorGroup* ig = new IntersectorGroup;

// now copy across all intersectors that arn't disabled.
for(Intersectors::iterator itr = _intersectors.begin();
itr != _intersectors.end();
++itr)
{
if (!(*itr)->disabled())
{
ig->addIntersector( (*itr)->clone(iv) );
}
}

return ig;
}

bool IntersectorGroup::enter(const osg::Node& node)
{
if (disabled()) return false;

bool foundIntersections = false;

for(Intersectors::iterator itr = _intersectors.begin();
itr != _intersectors.end();
++itr)
{
if ((*itr)->disabled()) (*itr)->incrementDisabledCount();
else if ((*itr)->enter(node)) foundIntersections = true;
else (*itr)->incrementDisabledCount();
}

if (!foundIntersections)
{
// need to call leave to clean up the DisabledCount's.
leave();
return false;
}

// we have found at least one suitable intersector, so return true
return true;
}

void IntersectorGroup::leave()
{
for(Intersectors::iterator itr = _intersectors.begin();
itr != _intersectors.end();
++itr)
{
if ((*itr)->disabled()) (*itr)->decrementDisabledCount();
}
}

void IntersectorGroup::intersect(osgUtil::IntersectionVisitor& iv, osg::Drawable* drawable)
{
if (disabled()) return;

unsigned int numTested = 0;
for(Intersectors::iterator itr = _intersectors.begin();
itr != _intersectors.end();
++itr)
{
if (!(*itr)->disabled())
{
(*itr)->intersect(iv, drawable);

++numTested;
}
}

// OSG_NOTICE<<"Number testing "<<numTested<<std::endl;

}

void IntersectorGroup::reset()
{
Intersector::reset();

for(Intersectors::iterator itr = _intersectors.begin();
itr != _intersectors.end();
++itr)
{
(*itr)->reset();
}
}

bool IntersectorGroup::containsIntersections()
{
for(Intersectors::iterator itr = _intersectors.begin();
itr != _intersectors.end();
++itr)
{
if ((*itr)->containsIntersections()) return true;
}
return false;
}



[osg-users] IntersectionVisitor and USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION

2016-11-29 Thread Trajce Nikolov NICK
Hi Robert,

USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION seams to not have effect no matter if
it is selected or not. I traced the code and as is written now
IntersectionVisitor::apply(osg::PagedLOD& plod) is working always with the
highest res.

// Perform an intersection test only on children that display
// at the maximum resolution.

I need this functionality to be able to pick on the level of detail based
on the distance from the eyepoint. I am seeing there is a override for that
but it is never used

float IntersectionVisitor::getDistanceToEyePoint(const osg::Vec3& pos, bool
/*withLODScale*/) const
{
if (_lodSelectionMode==USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION)
{
return (pos-getEyePoint()).length();
}
else
{
return 0.0f;
}
}

If you are very busy and give some hints I can try to implement this
functionality

Thanks a lot!

-- 
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] isolate specific LOD from a VPB generated database

2016-11-29 Thread Trajce Nikolov NICK
Hi Nickolai,

maybe I was not that clear 

The isolated LOD tiles need to still be part of the master quadtree - it
means with the proper transforms above in the graph. I am thinking more in
a way how to lie the CullVisitor and "freeze" the eyepoint that is used for
LOD switching, without use of LOD subclasses and do stuff custom way

On Tue, Nov 29, 2016 at 8:37 PM, Nickolai Medvedev <raizel@yandex.ru>
wrote:

> Hi, Nick.
>
>
> Code:
> osg::ref_ptr visible_group = new osg::Group;
>
> visible_group->addChild(lod.get());
>
> viewer.setSceneData(visible_group.get());
>
>
>
> I hope, I correctly understood...
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69541#69541
>
>
>
>
>
> ___
> 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] isolate specific LOD from a VPB generated database

2016-11-29 Thread Trajce Nikolov NICK
Thanks Robert.

Clear on forcing the loading as in the LOS intersection utilities. Let say
I load my area of interest at the LOD I want, how to force OSG now to
render only that LOD ? Any hints on this?

Thanks so much !

Nick

On Tue, Nov 29, 2016 at 7:55 PM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Nick,
>
> On 29 November 2016 at 18:20, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> > I need the idea this time :-)  This hurts my head for few days
> already
> > :-)
> >
> > As the subject says, I have VPB database, geocentric. And this is quad
> tree
> > with many LODs and it is PagedLOD based. How to isolate specific LOD and
> > display only that LOD? Quite challenging, uhm ...
>
> There isn't any specific support for this in the OSG so you'll need to
> implement it yourself.  Essentially you'll need to traverse down the
> database loading subgraphs until you get to the level of interest then
> do your operations on that.  The closest example code to doing this
> would probably be the intersection utilities in osgSim such as
> osgSim::LineOfSight - these intersection utilities have a helper class
> that does the loading as the intersection utility drills down into the
> dataset.
>
> The other approach you could take would be to use the naming of the
> tiles on disk as a cue to what subgraphs contain the PagedLOD you are
> looking for.
>
> 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] isolate specific LOD from a VPB generated database

2016-11-29 Thread Trajce Nikolov NICK
Hi Community,

I need the idea this time :-)  This hurts my head for few days already
:-)

As the subject says, I have VPB database, geocentric. And this is quad tree
with many LODs and it is PagedLOD based. How to isolate specific LOD and
display only that LOD? Quite challenging, uhm ...

Thanks for any input!

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 check if pagedLod already exists in databasepager with same filename

2016-11-29 Thread Trajce Nikolov NICK
Hi Simone,

just a fast thought ... Maybe you make a simple std::map to keep track of
what has been loaded and what is new

On Tue, Nov 29, 2016 at 1:37 PM, Simone Rapposelli <
simone.rappose...@gmail.com> wrote:

> Hi Robert,
>
> thank you for your fast reply.
> My problem is that osgDB::ReaderWriter::ReadResult readNode(const
> std::string , const osgDB::ReaderWriter::Options *options) gets
> called even if a PagedLod with the same fileName has been previously
> loaded: for example, this happens if I move to any position on the viewer
> and then come back.
> Thus, inside this function I need to check if any of the PagedLod
> currently loaded in DatabasePager has the same fileName of the passed
> argument: in this case I could avoid to reload data already in memory.
>
> Thank you!
>
> Cheers,
> Simone
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69524#69524
>
>
>
>
>
> ___
> 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] VPB and terrain normals

2016-11-24 Thread Trajce Nikolov NICK
Thanks Nickolai ! :)

On Thu, Nov 24, 2016 at 7:15 PM, Nickolai Medvedev <raizel@yandex.ru>
wrote:

> Hi, Nick! :)
>
> You try to create the implementation of a terrain?
> Try this example.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69496#69496
>
>
>
>
> ___
> 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] VPB and terrain normals

2016-11-24 Thread Trajce Nikolov NICK
Thanks Robert for the good explanation (as always ;-) ). I was looking for
the piece of the code in VPB that generates the normals, was curious about
the algo. But found it in the osgUtil::SmoothingVisitor .. This one is
actually generating very nice results.

Thanks again!

Cheers,
Nick

On Thu, Nov 24, 2016 at 4:49 PM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> On 24 November 2016 at 14:32, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> > anyone with a knowledge if VPB is generating normals for the terrain skin
> > and can point me to the code snippet where these normals are being
> > calculated?
>
> By default VirtualPlanetBuilder creates paged databases that use
> osgTerrain::TerrainTile for the representation and rendering of the
> individual terrain tiles. The height field component
> (HeightFieldLayer) is uses an osg::HeightField internally to store all
> the heights, no normals are stored.
>
> The normals used for rendering at created by the TerrainTechnique, if
> you use the default osgTerrain::GeometryTechnhique then it'll create
> an osg::Geometry with vertices, normals and texcoords to do the
> rendering.  If you use the DisplacementMappingTechnique then it'll be
> the shaders that that will compute the normals in the vertex shader.
>
> 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] VPB and terrain normals

2016-11-24 Thread Trajce Nikolov NICK
Hi Community,

anyone with a knowledge if VPB is generating normals for the terrain skin
and can point me to the code snippet where these normals are being
calculated?

Thanks a lot 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] How to render the image without reducing its size.?

2016-11-22 Thread Trajce Nikolov NICK
Hi Uma,

you can use TextureRectangle instead of Texture2D. Then your UV mapping is
in the range of s:0-imageWidth, t:0-imageHeight and the image will preserve
its original size

On Tue, Nov 22, 2016 at 2:06 PM, Christian Buchner <
christian.buch...@gmail.com> wrote:

>
> Your OpenGL implementation might signal a maximum texture size of 4096.
>
> Which is why there is no alternative to downsizing it.
>
> There is also an OSG_MAX_TEXTURE_SIZE environment variable. I am not sure
> what its default value is, or if it has a default at all. Have you tried
> forcing this to 8192?
>
> Christian
>
>
>
> 2016-11-22 13:58 GMT+01:00 Uma Devi Selvaraj <umaselvam1...@gmail.com>:
>
>> Hi,
>>
>>I have simple code that renders image using osgviewer. I am able to
>> render the image successfully with the code. My problem now is the size of
>> the image is reduced. for example the original size of the image is 4683 *
>> 3035, the image is reduced to 4096 * 3035. Is this expected behaviour or is
>> there anything I need to add in my code. I have added my code.
>>
>>
>> //required header files
>>
>> int main(int argc,char**argv)
>> {
>>
>> osg::ref_ptr image;
>> image = osgDB::readImageFile("C:\\Users\\mcw\\Desktop\\DemModel.tif.
>> gdal");
>> std::cout << "Image info are " << image->s() << "\n" <t()
>> <<"\n" <r() << std::endl;
>> if (!(image.valid()))
>> {
>> std::cout << "Unable to read image file " << std::endl;
>> getchar();
>> return 0;
>> }
>>
>> osg::ref_ptr geode =(osg::createGeodeForImage(ima
>> ge));
>>
>> osg::Texture2D *texture = new osg::Texture2D();
>> texture->setFilter(osg::Texture::MIN_FILTER,
>> osg::Texture::LINEAR);
>> texture->setFilter(osg::Texture::MAG_FILTER,
>> osg::Texture::LINEAR);
>> texture->setWrap(osg::Texture::WRAP_R, osg::Texture::REPEAT);
>> texture->setResizeNonPowerOfTwoHint(false);
>> texture->setImage(image);
>> texture->setBorderColor(osg::Vec4d(0.4f, 0.5f, 0.6f, 1.0f));
>> osg::StateSet* stateset = new osg::StateSet;
>>
>> stateset->setTextureAttributeAndModes(0, texture,
>> osg::StateAttribute::ON);
>>
>> geode->setStateSet(stateset);
>> osgViewer::Viewer viewer;
>> viewer.setSceneData(geode.get());
>> getchar();
>> return viewer.run();
>>
>> }
>>
>> ...
>>
>> Thank you!
>>
>> Cheers,
>> Uma
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=69470#69470
>>
>>
>>
>>
>>
>> ___
>> 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] Draw geometry that keeps its size in screen even with user manipulation (scaling, etc)

2016-11-21 Thread Trajce Nikolov NICK
> Do I need to add an autotransform for each circle?

Probably yes ... Give it a shot

On Mon, Nov 21, 2016 at 6:10 PM, Bruno Oliveira <
bruno.manata.olive...@gmail.com> wrote:

> Thank you Tracje,
>
> however I tried using that. My node has, for instance, 10 circles that
> represent points and that are at a certain distance. I use autotransform on
> the whole node of 10 circles with "setAutoScaleToScreen(true);" but what
> happens is that when I zoom my scene, the distance between the circles does
> not change.
> Do I need to add an autotransform for each circle?
>
> 2016-11-21 16:20 GMT+00:00 Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com>:
>
>> Hi Bruno,
>>
>> maybe you can have a look at osg::AutoTransform
>>
>> On Mon, Nov 21, 2016 at 4:08 PM, Bruno Oliveira <
>> bruno.manata.olive...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I am drawing some basic shapes/geometries (in this case, some rectangles
>>> or circles), but need them to have fixed size in screen pixel coordinates,
>>> even when the user manipulates the scene.
>>>
>>> For instance, I want to draw rectangles that are 10-pixel wide, and keep
>>> these 10 pixels even when the user zooms in or zooms out the scene.
>>>
>>> How can I do this?
>>>
>>>
>>> ( I think this can't be accomplished with osg::Transform::ABSOLUTE_RF,
>>> since I want the shapes to translate/rotate when user manipulates the scene)
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opens
>>> cenegraph.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] Draw geometry that keeps its size in screen even with user manipulation (scaling, etc)

2016-11-21 Thread Trajce Nikolov NICK
Hi Bruno,

maybe you can have a look at osg::AutoTransform

On Mon, Nov 21, 2016 at 4:08 PM, Bruno Oliveira <
bruno.manata.olive...@gmail.com> wrote:

> Hello,
>
> I am drawing some basic shapes/geometries (in this case, some rectangles
> or circles), but need them to have fixed size in screen pixel coordinates,
> even when the user manipulates the scene.
>
> For instance, I want to draw rectangles that are 10-pixel wide, and keep
> these 10 pixels even when the user zooms in or zooms out the scene.
>
> How can I do this?
>
>
> ( I think this can't be accomplished with osg::Transform::ABSOLUTE_RF,
> since I want the shapes to translate/rotate when user manipulates the scene)
>
> ___
> 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] slice Geometry with plane

2016-11-17 Thread Trajce Nikolov NICK
Hi Sebastian,

it is not only for display, I need handle of the sliced Geometry, something
like what DBGS are doing, to cut triangulated cultural features on tile
boundaries.

But thank you anyway

On Fri, Nov 18, 2016 at 8:39 AM, Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de> wrote:

> Hi Trajce,
>
> If you only need to display it, maybe clipplanes is what you are after.
> They also work fine with modern shader pipelines, where you can transform
> them inside the vertex shader to your liking.
>
> Cheers
> Sebastian
>
>
> Hi Community,
>>
>> is something like this available in OSG?
>>
>> Thanks 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] slice Geometry with plane

2016-11-17 Thread Trajce Nikolov NICK
Hi Community,

is something like this available in OSG?

Thanks 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] osgUtil::Delaunay* question (where is the triangulation of the constraints?)

2016-11-12 Thread Trajce Nikolov NICK
Thanks anyway Robert,

I was counting from someone else from the community too, someone that might
have experience with this piece of the code.

I went to reading the code indeed and I managed it.

Nick

p.s. osgUtil::Delaunay* are really cool written classes!

On Sat, Nov 12, 2016 at 10:38 AM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi Nick,
>
> The original author of DelaunayTriangulator hasn't been an active
> member of the OSG for decade so it's unfortunately a case of reading
> the code to work out what is happening.
>
> I'm afraid it doesn't make much sense for me to go read your code,
> read the DelaunayTriangulator code and work out what is going on, then
> try to communicate my findings to you, it's just way more efficient to
> dive into the code yourself.
>
> Robert.
>
> On 11 November 2016 at 18:18, Trajce Nikolov NICK
> <trajce.nikolov.n...@gmail.com> wrote:
> > Hi Community,
> >
> > I hope you will help this time too. Struggling again :-).
> >
> > I am trying to add cultural features to terrain models, nothing fancy
> (yet!
> > :-) ) it is simple. Code will describe it more how I am doing it but it
> is
> > the very basic, elevations array to be triangulated with some
> constraints.
> > And it works nicely. However when I want to cut the triangulated
> constraint
> > from the terrain, and add this cut triangles as separate primitive set,
> > constraint->getTriangles() is empty. Based on the doxygen in the header
> I am
> > expecting to have these triangles there:
> >
> > /** Get the filling primitive. One:
> >  * triangulate must have bneen called and
> >  * two:  triangle list is filled when
> >  * DelaunayTriangulator::removeInternalTriangles is called.
> >  * These return the triangles removed from the delaunay
> triangulation by
> >  * DelaunayTriangulator::removeInternalTriangles. */
> > inline const osg::DrawElementsUInt *getTriangles() const { return
> > prim_tris_.get(); }
> >
> > No triangles when calling this and this is the snippet:
> >
> > osg::ref_ptr triangulator = new
> > osgUtil::DelaunayTriangulator;
> >
> > osg::ref_ptr polyline = getPolylineVertices(line);
> > osg::ref_ptr polylineEdges = getEdges(polyline);
> >
> > constraint->setVertexArray(polylineEdges);
> > constraint->addPrimitiveSet(new osg::DrawArrays(GL_LINE_LOOP, 0,
> > polylineEdges->size()));
> >
> > triangulator->addInputConstraint(constraint);
> > triangulator->setInputPointArray(_points);
> > triangulator->triangulate();
> > triangulator->removeInternalTriangles(constraint);
> >
> > osg::ref_ptr geometry = new osg::Geometry;
> > geometry->setVertexArray(_points);
> > geometry->addPrimitiveSet(triangulator->getTriangles()); // triangles
> with
> > constraint cut
> > geometry->addPrimitiveSet(constraint->getTriangles()); // no triangles
> >
> > 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] osgUtil::Delaunay* question (where is the triangulation of the constraints?)

2016-11-11 Thread Trajce Nikolov NICK
Hi Community,

I hope you will help this time too. Struggling again :-).

I am trying to add cultural features to terrain models, nothing fancy (yet!
:-) ) it is simple. Code will describe it more how I am doing it but it is
the very basic, elevations array to be triangulated with some constraints.
And it works nicely. However when I want to cut the triangulated constraint
from the terrain, and add this cut triangles as separate primitive set,
constraint->getTriangles() is empty. Based on the doxygen in the header I
am expecting to have these triangles there:

/** Get the filling primitive. One:
 * triangulate must have bneen called and
 * two:  triangle list is filled when
 * DelaunayTriangulator::removeInternalTriangles is called.
 * These return the triangles removed from the delaunay triangulation by
 * DelaunayTriangulator::removeInternalTriangles. */
inline const osg::DrawElementsUInt *getTriangles() const { return
prim_tris_.get(); }

No triangles when calling this and this is the snippet:

osg::ref_ptr triangulator = new
osgUtil::DelaunayTriangulator;

osg::ref_ptr polyline = getPolylineVertices(line);
osg::ref_ptr polylineEdges = getEdges(polyline);

constraint->setVertexArray(polylineEdges);
constraint->addPrimitiveSet(new osg::DrawArrays(GL_LINE_LOOP, 0,
polylineEdges->size()));

triangulator->addInputConstraint(constraint);
triangulator->setInputPointArray(_points);
triangulator->triangulate();
triangulator->removeInternalTriangles(constraint);

osg::ref_ptr geometry = new osg::Geometry;
geometry->setVertexArray(_points);
geometry->addPrimitiveSet(triangulator->getTriangles()); // triangles with
constraint cut
geometry->addPrimitiveSet(constraint->getTriangles()); // no triangles

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] World to local coordinates

2016-11-11 Thread Trajce Nikolov NICK
Hi Rambabu,

Robert is right. We all learn from the OSG examples and from reading the
code and when we struggle we fire questions on this list and the community
responds - that is how we all gain and share OSG knowledge. It is normal
that you have to do your homework first - to look for it in the examples
code - trust me, often I find myself "lazy" and "paranoid" so I shoot
questions fast too ;-)

Have a look at the osgsimulation example code. It flies the cessna model
around the planet. That is what you need I think and you will see there how
to properly use osg::EllipsoidModel. Give it a try

Cheers!
Nick

On Fri, Nov 11, 2016 at 10:14 AM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> On 11 November 2016 at 09:07, Rambabu Repaka <ramboram...@gmail.com>
> wrote:
> > Thanks robert and Iam working on the EllipsoidModel.
> > One Doubt Is it possible to view  the osg model like cessan.osg using
> latitude and longitude readings at exact position.
>
> Stop being so lazy and read the code examples, read the headers, it's all
> there.
>
> If you have a problem with your specific implementation then post the code.
> ___
> 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] World to local coordinates

2016-11-10 Thread Trajce Nikolov NICK
Hi,

have a look at osg::EllipsoidModel in osg/CoordinateSystemNode .. it has
all you need for conversion from lat/lon/alt to ECEF

On Thu, Nov 10, 2016 at 11:35 AM, Rambabu Repaka <ramboram...@gmail.com>
wrote:

> Hi,Iam new to osg can anyone share the code for using latitude and
> longitude readings to view a model.
>
> ...
>
> Thank you!
>
> Cheers,
> Rambabu
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69303#69303
>
>
>
>
>
> ___
> 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] source data samples for VPB

2016-11-08 Thread Trajce Nikolov NICK
> You know how to divide a terrain into pieces, that i could
simplify, and then write into LODs? You understand what I want to do?
If yes, i would glad, if you help me.

I think that is what VPB is doing automatically for you, create PagedLOD
tiles. I started (again after years) with VPB just recently so give me some
time I might write you soon

On Tue, Nov 8, 2016 at 8:59 PM, Nickolai Medvedev <raizel@yandex.ru>
wrote:

> |-)  Unfortunately, Nick, my English is still bad.
>
>
> Oh, and one more thing...
>
> Site, where i get heightmaps:
>
> http://terrain.party/
>
>
> You know how to divide a terrain into pieces, that i could
> simplify, and then write into LODs? You understand what I want to do?
> If yes, i would glad, if you help me.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69280#69280
>
>
>
>
>
> ___
> 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] source data samples for VPB

2016-11-08 Thread Trajce Nikolov NICK
Thanks Nickolai ;-)

p.s. I see your english improved since then ;-)

On Tue, Nov 8, 2016 at 3:36 PM, Nickolai Medvedev <raizel@yandex.ru>
wrote:

> Hi, Nick!
>
> If you create something like a game, i don't advise to use VPB.
>
> I created own example. Now need to divide terrain into parts, then
> simplify, then write into LODs.
>
> Here my test program:
> http://forum.openscenegraph.org/viewtopic.php?t=16155
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69274#69274
>
>
>
>
>
> ___
> 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] source data samples for VPB

2016-11-08 Thread Trajce Nikolov NICK
Hi Community,

anyone knowing where can I find some sample source data to try VPB?

Thanks a lot as always!

-- 
trajce nikolov nick
___
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   10   >